halox.halo.nfw: The NFW profile#
halox provides utility functions to compute properties of halos with a Navarro-Frenk-White (NFW) profile.
For examples, see NFW Profiles.
Note
halox.halo.nfw is also accessible as halox.nfw for backward compatibility with older code.
|
Properties of a dark matter halo following a Navarro-Frenk-White density profile. |
|
Convert between overdensity definitions assuming an NFW profile. |
- class halox.halo.nfw.NFWHalo(m_delta, c_delta, z, cosmo, delta=200.0)[source]#
Properties of a dark matter halo following a Navarro-Frenk-White density profile.
- Parameters:
m_delta (float) – Mass at overdensity delta [h-1 Msun]
c_delta (float) – Concentration at overdensity delta
z (float) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
delta (float) – Density contrast in units of critical density at redshift z, defaults to 200.
- density(r)[source]#
NFW density profile \(\rho(r)\).
- Parameters:
r (Array [h-1 Mpc]) – Radius
- Returns:
Density at radius r
- Return type:
Array [h2 Msun Mpc-3]
- enclosed_mass(r)[source]#
Enclosed mass profile \(M(<r)\).
- Parameters:
r (Array [h-1 Mpc]) – Radius
- Returns:
Enclosed mass at radius r
- Return type:
Array [h-1 Msun]
- potential(r)[source]#
Potential profile \(\phi(r)\).
- Parameters:
r (Array [h-1 Mpc]) – Radius
- Returns:
Potential at radius r
- Return type:
Array [km2 s-2]
- circular_velocity(r)[source]#
Circular velocity profile \(v_c(r)\).
The circular velocity is related to the enclosed mass by: \(v_c^2(r) = GM(<r)/r\)
- Parameters:
r (Array [h-1 Mpc]) – Radius
- Returns:
Circular velocity at radius r
- Return type:
Array [km s-1]
- velocity_dispersion(r)[source]#
Radial velocity dispersion profile \(\sigma_r(r)\).
Uses the Jeans equation assuming isotropic orbits: \(\sigma_r^2(r) = \frac{1}{\rho(r)} \int_r^{\infty} \rho(s) \frac{GM(<s)}{s^2} ds\)
For NFW halos, this has an analytical solution.
- Parameters:
r (Array [h-1 Mpc]) – Radius
- Returns:
Radial velocity dispersion at radius r
- Return type:
Array [km s-1]
- surface_density(r)[source]#
Projected surface density profile \(\Sigma(r)\).
The projected surface density is obtained by integrating the 3D density profile along the line of sight: \(\Sigma(r) = 2 \int_r^{\infty} \frac{\rho(s) s ds} {\sqrt{s^2 - r^2}}\)
For NFW halos, this has an analytical solution.
- Parameters:
r (Array [h-1 Mpc]) – Projected radius
- Returns:
Surface density at projected radius r
- Return type:
Array [h Msun Mpc-2]
- to_delta(delta_new)[source]#
Convert halo properties to a different overdensity definition.
- Parameters:
delta_new (float) – New density contrast in units of critical density at redshift z
- Return type:
tuple[Array,Array,Array]- Returns:
Array [h-1 Msun] – Mass at new overdensity
Array [h-1 Mpc] – Radius at new overdensity
Array – Concentration at new overdensity
- halox.halo.nfw.delta_delta(M, c, z, cosmo, delta_old, delta_new)[source]#
Convert between overdensity definitions assuming an NFW profile.
- Parameters:
M (Array) – Halo mass at
delta_oldoverdensity [h-1 Msun]c (Array) – Concentration at
delta_oldoverdensityz (Array) – Redshift
cosmo (jc.Cosmology) – Underlying cosmology
delta_old (float) – Input overdensity in units of critical density at redshift z
delta_new (float) – Output overdensity in units of critical density at redshift z
- Return type:
tuple[Array,Array,Array]- Returns:
Array [h-1 Msun] – Halo mass at
delta_newoverdensityArray [h-1 Mpc] – Halo radius at
delta_newoverdensityArray – Concentration at
delta_newoverdensity