py21cmmc.core.CoreCMB#

class py21cmmc.core.CoreCMB(verbose=0, z_extrap_min=0, z_extrap_max=20, z_HeI=4, z_HeII=3, use_21cmfast=True, user_params=None, flag_options=None, astro_params=None, cosmo_params=None, regenerate=True, change_seed_every_iter=False, ctx_variables=('brightness_temp', 'xH_box'), initial_conditions_seed=None, global_params=None, **io_options)[source]#

A Core Module that computes Cl^TT,TE,EE and phiphi (the lensing potentials).

Notes

This core calls the CLASS CMB code and takes as an input the reionization history from 21cmFAST and a few cosmological parameters.

Parameters:
  • z_extrap_min (float) – Minimal z for reionization in CLASS. It should basically always be set to 0.

  • z_extrap_max (float) – Maximal z for reionization in CLASS. It depends on the reionization model.

  • z_HeI (float) – Redshift of the first helium reionization. CLASS models helium reionzation with a tanh centered around zHeI.

  • z_HeII (float) – Redshift of the second helium reionization. CLASS models helium reionzation with a tanh centered around zHeII.

  • use_21cmfast (float) – Whether or not using EoR history from 21cmfast.

Methods

__init__([verbose, z_extrap_min, ...])

build_model_data(ctx)

Compute the CMB power spectra from a ionization history.

convert_model_to_mock(ctx)

Generate random mock data.

get_cl(cosmo[, l_max])

Return the \(C_{\\ell}\) from the cosmological code in \(\\mu {\\rm K}^2\).

prepare_storage(ctx, storage)

Add variables to dict which cosmoHammer will automatically store with the chain.

setup()

Perform any post-init setup of the object.

simulate_mock(ctx)

Generate all mock data and add it to the context.

Attributes

chain

Reference to the LikelihoodComputationChain containing this core.

core_primary

The first core that appears in the requirements.

parameter_names

Names of the parameters of the full chain.

required_cores