halox.lss: Large-scale structure calculations#
halox provides a JAX implementation of large-scale structure calculations including RMS variance computations, mass-to-radius conversions, and overdensity transformations.
Cosmology calculations (e.g. power spectra) rely on jax-cosmo.
For examples, see Large-Scale Structure quantities.
|
Compute RMS variance of density fluctuations in spheres of radius R at redshift z. |
|
Compute RMS variance of density fluctuations within the Lagrangian radius of a halo with mass M at redshift z. |
|
Convert critical overdensity to mean overdensity. |
|
Convert mean overdensity to critical overdensity. |
|
Convert mass to Lagrangian radius. |
|
Peak height \(\nu = \delta_{sc} / \sigma(M, z)\). |
- halox.lss.sigma_R(R, z, cosmo, k_min=1e-05, k_max=100.0, n_k_int=5000)[source]#
Compute RMS variance of density fluctuations in spheres of radius R at redshift z.
- Parameters:
R (Array) – Radius [h-1 Mpc]
z (Array) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
k_min (float) – Minimum k for integration [h Mpc-1], default 1e-5
k_max (float) – Maximum k for integration [h Mpc-1], default 1e2
n_k_int (int) – Number of k-space integration points for \(\sigma(R,z)\), default 5000
- Returns:
RMS variance \(\sigma(R,z)\)
- Return type:
Array
- halox.lss.sigma_M(M, z, cosmo, k_min=1e-05, k_max=100.0, n_k_int=5000, emu=None)[source]#
Compute RMS variance of density fluctuations within the Lagrangian radius of a halo with mass M at redshift z.
When
emuis provided, the emulator is used instead of the analytical integral and thek_min,k_max,n_k_intparameters are ignored.- Parameters:
M (Array) – Mass [h-1 Msun]
z (Array) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
k_min (float) – Minimum k for integration [h Mpc-1], default 1e-5
k_max (float) – Maximum k for integration [h Mpc-1], default 1e2
n_k_int (int) – Number of k-space integration points for \(\sigma(R,z)\), default 5000
emu (SigmaMEmulator, optional) – Trained emulator for \(\sigma(M)\). If provided, the emulator is used instead of the analytical integral.
- Returns:
RMS variance \(\sigma(M,z)\)
- Return type:
Array
See also
halox.emus.SigmaMEmulatorEmulator for \(\sigma(M,z)\).
- halox.lss.overdensity_c_to_m(delta_c, z, cosmo)[source]#
Convert critical overdensity to mean overdensity.
- Parameters:
delta_c (float) – Overdensity with respect to critical density
z (float) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
- Returns:
Overdensity with respect to mean matter density
- Return type:
float
- halox.lss.overdensity_m_to_c(delta_m, z, cosmo)[source]#
Convert mean overdensity to critical overdensity.
- Parameters:
delta_m (float) – Overdensity with respect to mean matter density
z (float) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
- Returns:
Overdensity with respect to critical density
- Return type:
float
- halox.lss.mass_to_lagrangian_radius(M, cosmo)[source]#
Convert mass to Lagrangian radius.
Computes the radius of a sphere containing mass M at the mean matter density of the universe at z=0.
- Parameters:
M (Array) – Mass [h-1 Msun]
cosmo (jc.Cosmology) – Underlying cosmology
- Returns:
Lagrangian radius [h-1 Mpc]
- Return type:
Array
- halox.lss.peak_height(M, z, cosmo, n_k_int=5000, k_min=1e-05, k_max=100.0, delta_sc=1.68647, emu=None)[source]#
Peak height \(\nu = \delta_{sc} / \sigma(M, z)\).
- Parameters:
M (Array) – Mass [h-1 Msun]
z (Array) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
n_k_int (int) – Number of k-space integration points for \(\sigma(R,z)\), default 5000
k_min (float) – Minimum k for integration [h Mpc-1], default 1e-5
k_max (float) – Maximum k for integration [h Mpc-1], default 1e2
delta_sc (float) – Spherical collapse overdensity, default 1.68647
emu (SigmaMEmulator, optional) – Trained emulator for \(\sigma(M)\).
- Returns:
Peak height \(\nu\)
- Return type:
Array
See also
halox.emus.SigmaMEmulatorEmulator for \(\sigma(M,z)\).