py21cmfast.wrapper.classy_interface¶
Module for computing quantities with CLASS.
Attributes¶
Classes¶
Initialize EH transfer function. |
Functions¶
|
Compute the root-mean-square of a field at given redshifts. |
|
Find the redshift of kinematic decoupling. |
|
Get the transfer function of a field at a given redshift. |
|
Run CLASS with specified input parameters. |
Module Contents¶
- py21cmfast.wrapper.classy_interface.compute_rms(classy_output, kind='d_m', redshifts=0, smoothing_radius=0)[source]¶
Compute the root-mean-square of a field at given redshifts.
- Parameters:
classy_output (
classy.Class) – An object containing all the information from the CLASS calculation.kind (str, optioanl) – The type of field for which the rms shall be computed. Options are:
“d_b”, “d_cdm”, “d_m”: density field of baryons, cold dark matter, or all matter (including massive neutrinos).
“v_b”, “v_cdm”: magnitude of the velocity vector field of baryons or CDM (this is gauge dependent).
“v_cb”: magnitude of the relative velocity vector field between baryons and CDM (this is gauge independent).
Default is “d_m”.
redshifts (np.array or a float, optional) – The redshifts at which the rms shall be computed. Default is 0.
smoothing_radius (float, optional) – If non-zero, the field will be smoothed with a top hat filter (in real space) with comoving radius that is set to R_smooth. Can also be passed as type ‘astropy.units.quantity.Quantity’ with length unit. Default is 0.
- Returns:
rms (np.array) – Array of the rms of the desired field at the given redshifts.
- Parameters:
classy_output (classy.Class)
kind (str)
redshifts (collections.abc.Sequence[float])
smoothing_radius (float)
- Return type:
collections.abc.Sequence[float]
- py21cmfast.wrapper.classy_interface.find_redshift_kinematic_decoupling(classy_output)[source]¶
Find the redshift of kinematic decoupling.
For simplicity, we approximate the redshift of kinematic decoupling to be the same redshift of recombination, which is defined as the moment when x_e = n_e/(n_H + n_He) = 0.1. For LCDM with Planck 2018 parameters, this corresponds to z_dec ~ 1070.
- Parameters:
classy_output (
classy.Class) – An object containing all the information from the CLASS calculation.- Returns:
z_dec (float) – Redshift of kinematic decoupling.
- Parameters:
classy_output (classy.Class)
- Return type:
float
- py21cmfast.wrapper.classy_interface.get_transfer_function(classy_output, kind='d_m', z=0)[source]¶
Get the transfer function of a field at a given redshift.
- Parameters:
classy_output (
classy.Class) – An object containing all the information from the CLASS calculation.kind (str, optioanl) – The type of field for which the rms shall be computed. Options are: * “d_b”, “d_cdm”, “d_m”: density field of baryons, cold dark matter, or all matter (including massive neutrinos). * “v_b”, “v_cdm”: magnitude of the velocity vector field of baryons or CDM (this is gauge dependent). * “v_cb”: magnitude of the relative velocity vector field between baryons and CDM (this is gauge independent). Default is “d_m”.
z (float, optional) – The redshift at which the transfer function shall be computed. Default is 0.
- Returns:
transfer (np.array) – Array of the desired transfer function at the given redshift.
- Parameters:
classy_output (classy.Class)
kind (str)
z (float)
- Return type:
collections.abc.Sequence[float]