halox.halo.einasto: The Einasto profile#

halox provides utility functions to compute properties of halos with an Einasto profile. For examples, see Einasto Profiles.

EinastoHalo(m_delta, c_delta, z, alpha, cosmo)

Properties of a dark matter halo following an Einasto profile.

a_from_nu(M, z, cosmo[, n_k_int, delta_sc])

Einasto alpha parameter from the Gao et al. 2008 peak height relation.

class halox.halo.einasto.EinastoHalo(m_delta, c_delta, z, alpha, cosmo, delta=200)[source]#

Properties of a dark matter halo following an Einasto profile. Units in Mpc and solar masses

Parameters:
  • m_delta (float) – Mass at overdensity delta [h-1 Msun]

  • c_delta (float) – Concentration at overdensity delta

  • z (float) – Redshift

  • alpha (float) – Einasto profile alpha parameter.

  • cosmo (jc.Cosmology) – Underlying cosmology

  • delta (float) – Density contrast in units of critical density at redshift z, defaults to 200.

density(r)[source]#

Einasto 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]

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]

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]

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

Notes

This conversion assumes an NFW profile.

halox.halo.einasto.a_from_nu(M, z, cosmo, n_k_int=5000, delta_sc=1.686)[source]#

Einasto alpha parameter from the Gao et al. 2008 peak height relation.

Parameters:
  • M (Array) – Virial 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

  • delta_sc (float) – Spherical collapse overdensity, default 1.686

Returns:

Einasto alpha parameter

Return type:

Array

Notes

This assumes that the input mass is the virial mass.