py21cmfast.wrapper.cfuncs¶
Low-level python wrappers of C functions.
Attributes¶
Functions¶
|
Compute a the luminosity function over a given number of bins and redshifts. |
|
Compute the turnover masses for both ACGs and MCGs at a given redshift. |
|
Compute the optical depth to reionization under the given model. |
|
Convert a halo catalogue's mass and RNG fields to halo properties. |
|
Get the collapsed fraction from the backend, given a density and condition sigma. |
|
Evaluate the global number of ionising photons per baryon, expected at a range of densities. |
|
Evaluate the global number of ionising photons per baryon, expected at a range of redshifts. |
|
Evaluate the conditional star formation rate density (in units of M_sun/s/Mpc^3) expected at a range of densities. |
|
Evaluate the global star formation rate density (in units of M_sun/s/Mpc^3) expected at a range of redshifts. |
|
Evaluate the conditional X-ray emissivity (in units of erg/s/Mpc^3) expected at a range of densities. |
|
Get the expected number and mass of halos given a condition. |
|
Get the expected number and mass of halos given a condition. |
|
Evaluate the variance of a mass scale. |
|
Determine condition masses for backend routines. |
|
Get the critical collapse density given a mass, redshift and parameters. |
|
Get the critical density from sigma and growth factor. |
|
Get the expected number of halos in a given box. |
|
Get the growth factor at a given redshift. |
|
Compute the required size of the memory buffer to hold a halo list. |
|
Evaluate the matter density power spectrum (at z=0) at a certain scale from the 21cmFAST backend. |
|
Evaluate the vcb power spectrum (at kinematic decoupling) at a certain scale from the 21cmFAST backend. |
|
Evaluate conditional mass function integrals at a range of mass intervals. |
|
Return the value of the conditional halo mass function at given parameters. |
|
Return the value of the unconditional halo mass function at given parameters. |
|
Construct a halo sample given a descendant catalogue and redshifts. |
Module Contents¶
- py21cmfast.wrapper.cfuncs.compute_luminosity_function(*, redshifts: collections.abc.Sequence[float], inputs: py21cmfast.wrapper.inputs.InputParameters, nbins: int = 100, mturnovers: numpy.ndarray | None = None, mturnovers_mini: numpy.ndarray | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None, component: Literal['both', 'acg', 'mcg'] = 'both') tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray][source]¶
Compute a the luminosity function over a given number of bins and redshifts.
- Parameters:
redshifts (array-like) – The redshifts at which to compute the luminosity function.
inputs (
InputParameters) – The input parameters defining the simulation run.nbins (int, optional) – The number of luminosity bins to produce for the luminosity function.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.component (str, {‘both’, ‘acg’, ‘mcg}) – The component of the LF to be calculated. Forced to be ‘acg’ if USE_MINI_HALOS is False.
- Returns:
Muvfunc (np.ndarray) – Magnitude array (i.e. brightness). Shape [nredshifts, nbins]
Mhfunc (np.ndarray) – Halo mass array. Shape [nredshifts, nbins]
lfunc (np.ndarray) – Number density of haloes corresponding to each bin defined by Muvfunc. Shape [nredshifts, nbins].
- Parameters:
redshifts (collections.abc.Sequence[float])
nbins (int)
mturnovers (numpy.ndarray | None)
mturnovers_mini (numpy.ndarray | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
component (Literal['both', 'acg', 'mcg'])
- Return type:
tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]
- py21cmfast.wrapper.cfuncs.compute_mturns(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshifts: float | collections.abc.Sequence[float], J_LW_21: float | collections.abc.Sequence[float], v_cb: float | collections.abc.Sequence[float], ionisation_rate_G12: float | collections.abc.Sequence[float], z_reion: float | collections.abc.Sequence[float]) tuple[float, float][source]¶
Compute the turnover masses for both ACGs and MCGs at a given redshift.
- Parameters:
redshifts (array-like) – The redshifts at which to compute the turnover masses.
J_LW_21 (array-like) – The Lyman-Werner flux in units of 1e-21 erg/s/Hz/cm^2/sr at the given redshifts.
v_cb (array-like) – The amplitude of the relative velocity between dark matter and baryons in units of km/s at the given redshifts.
ionisation_rate_G12 (array-like) – The ionisation rate in units of 1e-12 s^-1 at the given redshifts.
z_reion (array-like) – The reionisation redshift at the given redshifts.
- Returns:
M_turn_a (array-like) – The turnover mass for atomic cooling halos at the given redshifts.
M_turn_m (array-like) – The turnover mass for molecular cooling halos at the given redshifts.
- Raises:
ValueError : – If the input arrays do not have the same shape.
- Parameters:
redshifts (float | collections.abc.Sequence[float])
J_LW_21 (float | collections.abc.Sequence[float])
v_cb (float | collections.abc.Sequence[float])
ionisation_rate_G12 (float | collections.abc.Sequence[float])
z_reion (float | collections.abc.Sequence[float])
- Return type:
tuple[float, float]
- py21cmfast.wrapper.cfuncs.compute_tau(*, redshifts: collections.abc.Sequence[float], global_xHI: collections.abc.Sequence[float], inputs: py21cmfast.wrapper.inputs.InputParameters, z_re_HeII: float = 3.0) float[source]¶
Compute the optical depth to reionization under the given model.
- Parameters:
redshifts (array-like) – Redshifts defining an evolution of the neutral fraction.
global_xHI (array-like) – The mean neutral fraction at redshifts.
inputs (
InputParameters) – Defines the input parameters of the runz_re_HeII (float, optional) – The redshift at which helium reionization occurs.
- Returns:
tau (float) – The optical depth to reionization
- Raises:
ValueError : – If redshifts and global_xHI have inconsistent length or if redshifts are not in ascending order.
- Parameters:
redshifts (collections.abc.Sequence[float])
global_xHI (collections.abc.Sequence[float])
z_re_HeII (float)
- Return type:
float
- py21cmfast.wrapper.cfuncs.convert_halo_properties(*, redshift: float, inputs: py21cmfast.wrapper.inputs.InputParameters, halo_masses: numpy.typing.NDArray[numpy.floating], star_rng: numpy.typing.NDArray[numpy.floating], sfr_rng: numpy.typing.NDArray[numpy.floating], xray_rng: numpy.typing.NDArray[numpy.floating], halo_coords: numpy.typing.NDArray[numpy.floating] | None = None, vcb_grid: numpy.typing.NDArray[numpy.floating] | None = None, J_21_LW_grid: numpy.typing.NDArray[numpy.floating] | None = None, z_re_grid: numpy.typing.NDArray[numpy.floating] | None = None, Gamma12_grid: numpy.typing.NDArray[numpy.floating] | None = None)[source]¶
Convert a halo catalogue’s mass and RNG fields to halo properties.
Assumes no feedback (Lyman-Werner, reionization).
- Returns a dict of 12 properties per halo:
halo mass stellar mass (ACG) star formation rate (ACG) xray luminosity (combined) ionising emissivity (combined) escape-fraction weighted SFR (combined) stellar mass (MCG) star formation rate (MCG) ACG turnover mass MCG turnover mass Reionization turnover mass Metallicity
- Parameters:
redshift (float)
halo_masses (numpy.typing.NDArray[numpy.floating])
star_rng (numpy.typing.NDArray[numpy.floating])
sfr_rng (numpy.typing.NDArray[numpy.floating])
xray_rng (numpy.typing.NDArray[numpy.floating])
halo_coords (numpy.typing.NDArray[numpy.floating] | None)
vcb_grid (numpy.typing.NDArray[numpy.floating] | None)
J_21_LW_grid (numpy.typing.NDArray[numpy.floating] | None)
z_re_grid (numpy.typing.NDArray[numpy.floating] | None)
Gamma12_grid (numpy.typing.NDArray[numpy.floating] | None)
- py21cmfast.wrapper.cfuncs.evaluate_FgtrM_cond(inputs: py21cmfast.wrapper.inputs.InputParameters, densities: numpy.typing.NDArray[numpy.floating], redshift: float, R: float)[source]¶
Get the collapsed fraction from the backend, given a density and condition sigma.
- Parameters:
densities (numpy.typing.NDArray[numpy.floating])
redshift (float)
R (float)
- py21cmfast.wrapper.cfuncs.evaluate_Nion_cond(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, radius: float, densities: numpy.typing.NDArray[numpy.floating], l10mturns_acg: numpy.typing.NDArray[numpy.floating] | None = None, l10mturns_mcg: numpy.typing.NDArray[numpy.floating] | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None)[source]¶
Evaluate the global number of ionising photons per baryon, expected at a range of densities.
- Parameters:
inputs (
InputParameters) – The input parameters defining the simulation run.redshift (float) – The redshift at which to compute Nion.
radius (float) – The radius of the region at which to compute the conditional Nion.
densities (array-like) – The densities at which to compute the conditional Nion.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.
- Returns:
nion (np.ndarray) – The conditional number of ionising photons per baryon at the given redshift and radius for ACGs.
nion_mini (np.ndarray or None) – The conditional number of ionising photons per baryon at the given redshift and radius for MCGs. Will be None if USE_MINI_HALOS is False.
- Parameters:
redshift (float)
radius (float)
densities (numpy.typing.NDArray[numpy.floating])
l10mturns_acg (numpy.typing.NDArray[numpy.floating] | None)
l10mturns_mcg (numpy.typing.NDArray[numpy.floating] | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
Notes
This function estimates the conditional N_ion by using the global turnover masses. In reality, these turnover masses do not depend solely on redshift, but also on the local density field, as well on its environment and history. Since it is impossible to well-define the conditional N_ion in given region by only providing redshift and density, we approximate the used turnover masses in this calculation to be the global ones.
- py21cmfast.wrapper.cfuncs.evaluate_Nion_z(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshifts: numpy.typing.NDArray[numpy.floating], log10mturns: numpy.typing.NDArray[numpy.floating] | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None)[source]¶
Evaluate the global number of ionising photons per baryon, expected at a range of redshifts.
- Parameters:
inputs (
InputParameters) – The input parameters defining the simulation run.redshifts (array-like) – The redshifts at which to compute Nion.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.
- Returns:
nion (np.ndarray) – The global number of ionising photons per baryon at the given redshifts for ACGs.
nion_mini (np.ndarray or None) – The global number of ionising photons per baryon at the given redshifts for MCGs. Will be None if USE_MINI_HALOS is False.
- Parameters:
redshifts (numpy.typing.NDArray[numpy.floating])
log10mturns (numpy.typing.NDArray[numpy.floating] | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
- py21cmfast.wrapper.cfuncs.evaluate_SFRD_cond(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, radius: float, densities: numpy.typing.NDArray[numpy.floating], log10mturns: numpy.typing.NDArray[numpy.floating] | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None)[source]¶
Evaluate the conditional star formation rate density (in units of M_sun/s/Mpc^3) expected at a range of densities.
- Parameters:
inputs (
InputParameters) – The input parameters defining the simulation run.redshift (float) – The redshift at which to compute the SFRD.
radius (float) – The radius of the region at which to compute the conditional SFRD.
densities (array-like) – The densities at which to compute the conditional SFRD.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.
- Returns:
sfrd (np.ndarray) – The conditional star formation rate density at the given redshift and radius for ACGs.
sfrd_mini (np.ndarray or None) – The conditional star formation rate density at the given redshift and radius for MCGs. Will be None if USE_MINI_HALOS is False.
- Parameters:
redshift (float)
radius (float)
densities (numpy.typing.NDArray[numpy.floating])
log10mturns (numpy.typing.NDArray[numpy.floating] | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
Notes
This function estimates the conditional SFRD by using the global turnover masses. In reality, these turnover masses do not depend solely on redshift, but also on the local density field, as well on its environment and history. Since it is impossible to well-define the conditional SFRD in given region by only providing redshift and density, we approximate the used turnover masses in this calculation to be the global ones.
- py21cmfast.wrapper.cfuncs.evaluate_SFRD_z(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshifts: numpy.typing.NDArray[numpy.floating], log10mturns: numpy.typing.NDArray[numpy.floating] | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None)[source]¶
Evaluate the global star formation rate density (in units of M_sun/s/Mpc^3) expected at a range of redshifts.
- Parameters:
inputs (
InputParameters) – The input parameters defining the simulation run.redshifts (array-like) – The redshifts at which to compute the SFRD.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.
- Returns:
sfrd (np.ndarray) – The global star formation rate density at the given redshifts for ACGs.
sfrd_mini (np.ndarray or None) – The global star formation rate density at the given redshifts for MCGs. Will be None if USE_MINI_HALOS is False.
- Parameters:
redshifts (numpy.typing.NDArray[numpy.floating])
log10mturns (numpy.typing.NDArray[numpy.floating] | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
- py21cmfast.wrapper.cfuncs.evaluate_Xray_cond(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, radius: float, densities: numpy.typing.NDArray[numpy.floating], log10mturns: numpy.typing.NDArray[numpy.floating] | None = None, lightcone: py21cmfast.drivers.lightcone.LightCone | None = None, global_evolution: py21cmfast.drivers.global_evolution.GlobalEvolution | None = None)[source]¶
Evaluate the conditional X-ray emissivity (in units of erg/s/Mpc^3) expected at a range of densities.
- Parameters:
inputs (
InputParameters) – The input parameters defining the simulation run.redshift (float) – The redshift at which to compute the conditional X-ray emissivity.
radius (float) – The radius of the region at which to compute the conditional X-ray emissivity.
densities (array-like) – The densities at which to compute the conditional X-ray emissivity.
lightcone (
LightConeor None, optional) – The lightcone object to use for the computation. If None, the function will consider global_evolution for the global m_turnover values, otherwise they will be extracted from the given lightcone.global_evolution (
GlobalEvolutionor None, optional) – The global evolution object to use for the computation. If None, the function will run a global evolution to estimate the global m_turnover values, otherwise they will be extracted from the given global evolution.
- Returns:
xray_emissivity (np.ndarray) – The conditional X-ray emissivity at the given redshift and radius for ACGs and MCGs combined.
- Parameters:
redshift (float)
radius (float)
densities (numpy.typing.NDArray[numpy.floating])
log10mturns (numpy.typing.NDArray[numpy.floating] | None)
lightcone (py21cmfast.drivers.lightcone.LightCone | None)
global_evolution (py21cmfast.drivers.global_evolution.GlobalEvolution | None)
Notes
This function estimates the conditional X-ray emissivity by using the global turnover masses. In reality, these turnover masses do not depend solely on redshift, but also on the local density field, as well on its environment and history. Since it is impossible to well-define the conditional X-ray emissivity in given region by only providing redshift and density, we approximate the used turnover masses in this calculation to be the global ones.
- py21cmfast.wrapper.cfuncs.evaluate_condition_integrals(inputs: py21cmfast.wrapper.inputs.InputParameters, cond_array: numpy.typing.NDArray[numpy.floating], redshift: float, redshift_prev: float | None = None)[source]¶
Get the expected number and mass of halos given a condition.
If USE_INTERPOLATION_TABLES is set to ‘hmf-interpolation’: Will crash if the table has not been initialised, only cond_array is used, and the rest of the arguments are taken from when the table was initialised.
- Parameters:
cond_array (numpy.typing.NDArray[numpy.floating])
redshift (float)
redshift_prev (float | None)
- py21cmfast.wrapper.cfuncs.evaluate_inverse_table(inputs: py21cmfast.wrapper.inputs.InputParameters, cond_array: numpy.typing.NDArray[numpy.floating], probabilities: numpy.typing.NDArray[numpy.floating], redshift: float, redshift_prev: float | None = None)[source]¶
Get the expected number and mass of halos given a condition.
- Parameters:
cond_array (numpy.typing.NDArray[numpy.floating])
probabilities (numpy.typing.NDArray[numpy.floating])
redshift (float)
redshift_prev (float | None)
- py21cmfast.wrapper.cfuncs.evaluate_sigma(*, inputs: py21cmfast.wrapper.inputs.InputParameters, masses: numpy.typing.NDArray[numpy.floating])[source]¶
Evaluate the variance of a mass scale.
Uses the 21cmfast backend
- Parameters:
masses (numpy.typing.NDArray[numpy.floating])
- py21cmfast.wrapper.cfuncs.get_condition_mass(inputs: py21cmfast.wrapper.inputs.InputParameters, R: float)[source]¶
Determine condition masses for backend routines.
Returns either mass contained within a radius, or mass of the Lagrangian cell on HII_DIM
- Parameters:
R (float)
- py21cmfast.wrapper.cfuncs.get_delta_crit(*, inputs: py21cmfast.wrapper.inputs.InputParameters, mass: float, redshift: float)[source]¶
Get the critical collapse density given a mass, redshift and parameters.
- Parameters:
mass (float)
redshift (float)
- py21cmfast.wrapper.cfuncs.get_delta_crit_nu(hmf_int_flag: int, sigma: float, growth: float)[source]¶
Get the critical density from sigma and growth factor.
- Parameters:
hmf_int_flag (int)
sigma (float)
growth (float)
- py21cmfast.wrapper.cfuncs.get_expected_nhalo(*, redshift: float, inputs: py21cmfast.wrapper.inputs.InputParameters) int[source]¶
Get the expected number of halos in a given box.
- Parameters:
redshift (float) – The redshift at which to calculate the halo list.
inputs (
InputParameters) – The input parameters of the run
- Returns:
n_halo (float) – The expected number of halos in the box at the given redshift under the given model.
- Raises:
ValueError : – If the matter options do not have a discrete halo model.
- Parameters:
redshift (float)
- Return type:
int
- py21cmfast.wrapper.cfuncs.get_growth_factor(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float)[source]¶
Get the growth factor at a given redshift.
- Parameters:
redshift (float)
- py21cmfast.wrapper.cfuncs.get_halo_catalog_buffer_size(*, redshift: float, inputs: py21cmfast.wrapper.inputs.InputParameters, min_size: int = 1000000) int[source]¶
Compute the required size of the memory buffer to hold a halo list.
- Parameters:
redshift (float) – The redshift at which to calculate the halo list.
inputs (
InputParameters) – The input parameters of the runmin_size (int, optional) – A minimum size to be used as the buffer.
- Parameters:
redshift (float)
min_size (int)
- Return type:
int
- py21cmfast.wrapper.cfuncs.get_matter_power_values(*, inputs: py21cmfast.wrapper.inputs.InputParameters, k_values: collections.abc.Sequence[float])[source]¶
Evaluate the matter density power spectrum (at z=0) at a certain scale from the 21cmFAST backend.
- Parameters:
k_values (collections.abc.Sequence[float])
- py21cmfast.wrapper.cfuncs.get_vcb_power_values(*, inputs: py21cmfast.wrapper.inputs.InputParameters, k_values: collections.abc.Sequence[float])[source]¶
Evaluate the vcb power spectrum (at kinematic decoupling) at a certain scale from the 21cmFAST backend.
- Parameters:
k_values (collections.abc.Sequence[float])
- py21cmfast.wrapper.cfuncs.integrate_chmf_interval(inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, lnm_lower: numpy.typing.NDArray[numpy.floating], lnm_upper: numpy.typing.NDArray[numpy.floating], cond_values: numpy.typing.NDArray[numpy.floating], redshift_prev: float | None = None)[source]¶
Evaluate conditional mass function integrals at a range of mass intervals.
- Parameters:
redshift (float)
lnm_lower (numpy.typing.NDArray[numpy.floating])
lnm_upper (numpy.typing.NDArray[numpy.floating])
cond_values (numpy.typing.NDArray[numpy.floating])
redshift_prev (float | None)
- py21cmfast.wrapper.cfuncs.return_chmf_value(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, mass_values: collections.abc.Sequence[float], delta_values: collections.abc.Sequence[float], condmass_values: collections.abc.Sequence[float])[source]¶
Return the value of the conditional halo mass function at given parameters.
- Parameters:
inputs (InputParameters) – The input parameters defining the simulation run.
redshift (float) – The redshift at which to evaluate the halo mass function.
mass_values (float) – The mass values at which to evaluate the halo mass function.
delta (float) – The overdensity at which to evaluate the halo mass function.
cond_mass (float) – The condition mass at which to evaluate the halo mass function.
- Parameters:
redshift (float)
mass_values (collections.abc.Sequence[float])
delta_values (collections.abc.Sequence[float])
condmass_values (collections.abc.Sequence[float])
- py21cmfast.wrapper.cfuncs.return_uhmf_value(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, mass_values: collections.abc.Sequence[float])[source]¶
Return the value of the unconditional halo mass function at given parameters.
- Parameters:
inputs (InputParameters) – The input parameters defining the simulation run.
redshift (float) – The redshift at which to evaluate the halo mass function.
mass_values (float) – The mass values at which to evaluate the halo mass function.
- Parameters:
redshift (float)
mass_values (collections.abc.Sequence[float])
- py21cmfast.wrapper.cfuncs.sample_halos_from_conditions(*, inputs: py21cmfast.wrapper.inputs.InputParameters, redshift: float, cond_array, redshift_prev: float | None = None, buffer_size: int | None = None)[source]¶
Construct a halo sample given a descendant catalogue and redshifts.
- Parameters:
redshift (float)
redshift_prev (float | None)
buffer_size (int | None)