halomod.profiles.PowerLawWithExpCut¶
- class halomod.profiles.PowerLawWithExpCut(cm_relation, mdef=<hmf.halos.mass_definitions.SOMean object>, z=0.0, cosmo=FlatLambdaCDM(name='Planck15', H0=<Quantity 67.74 km / (Mpc s)>, Om0=0.3075, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.0486), **model_parameters)[source]¶
Bases:
ProfileInf
A simple power law with exponential cut-off.
Default is taken to be the z=1 case of [1].
Notes
This is an empirical form proposed with the formula
\[\rho(r) = \rho_s * R_s^b / r^b * e^{-ar/R_s}\]References
[1]Spinelli, M. et al., “The atomic hydrogen content of the post-reionization Universe”, https://ui.adsabs.harvard.edu/abs/2020MNRAS.493.5434S/abstract.
- cdf(r, c=None, m=None, coord='r')¶
The cumulative distribution function, \(m(<x)/m_v\).
- Parameters:
r (float or array_like) – The radial location – units defined by
coord
c (float or array_like, optional) – The halo_concentration. Only used if m not provided
m (float or array_like, optional) – The mass of the halo. Defines the halo_concentration if provided.
coord (str, {
"x"
,"r"
,"s"
}) – What the radial coordinate represents.r
represents physical co-ordinates [units Mpc/h].x
is in units of the scale radius (r_vir = c), ands
is in units of the virial radius (r_vir = 1).
- cm_relation(m: [<class 'float'>, <class 'numpy.ndarray'>]) [<class 'float'>, <class 'numpy.ndarray'>] ¶
The halo_concentration-mass relation.
- classmethod get_models() Dict[str, Type] ¶
Get a dictionary of all implemented models for this component.
- halo_mass_to_radius(m, at_z=False)¶
Return the halo radius corresponding to
m
.Note that this is the radius corresponding to the halo at redshift zero, even if the redshift of the profile is not zero.
- halo_radius_to_mass(r, at_z=False)¶
Return the halo mass corresponding to
r
.
- lam(r, m, norm=None, c=None, coord='r')¶
The density profile convolved with itself.
- Parameters:
r (float or array of floats) – The radial location(s). The units vary according to
coord
m (float or array of floats) – The mass(es) of the halo(s)
norm (str, {
None
,``m``,``rho``}) – Normalisation of the density.c (float or array of floats, default
None
) – Concentration(s) of the halo(s). Must be same length asm
.coord (str, {
r
,``x``,``s``}) – What the radial coordinate represents.r
represents physical co-ordinates [units Mpc/h].x
is in units of the scale radius (r_vir = c), ands
is in units of the virial radius (r_vir = 1).
- populate(n, m, c=None, centre=None, rng=None)¶
Populate a halo with the current halo profile of mass
m
withn
tracers.- Parameters:
n (int) – Number of tracers to place down
m (float) – Mass of the halo.
c (float, optional) – Concentration of the halo. Will be calculated if not given.
centre (3-array) – (x,y,z) co-ordinates of centre of halo. Default is zero.
- Returns:
pos – Array of positions of the tracers, centred around (0,0,0).
- Return type:
(N,3)-array
- rho(r, m, norm=None, c=None, coord='r')¶
The density at radius r of a halo of mass m.
- Parameters:
r (float or array of floats) – The radial location(s). The units vary according to
coord
m (float or array of floats) – The mass(es) of the halo(s)
norm (str, {
None
,``m``,``rho``}) – Normalisation of the density.c (float or array of floats, default
None
) – Concentration(s) of the halo(s). Must be same length asm
.coord (str, {
r
,``x``,``s``}) – What the radial coordinate represents.r
represents physical co-ordinates [units Mpc/h].x
is in units of the scale radius (r_vir = c), ands
is in units of the virial radius (r_vir = 1).
- scale_radius(m: float | ndarray, at_z: bool = False) float | ndarray ¶
Return the scale radius for a halo of mass m.
The scale radius is defined as \(r_s = r_vir(m) / c(m)\).
- Parameters:
m – Mass of the halo(s), in units of
M_sun / h
.at_z – If true, return the redshift-dependent configuration-space scale radius of the halo. Otherwise, return the redshift-independent Lagrangian-space scale radius (based on an initial density patch).
- Returns:
The scale radius, same type as
m
.- Return type:
r_s
- u(k, m, norm='m', c=None, coord='k')¶
The fourier-transform of the density halo_profile.
- Parameters:
k (float or array of floats) – The radial wavenumber(s). The units vary according to
coord
m (float or array of floats) – The mass(es) of the halo(s)
norm (str, {
None
,``m``,``rho``}) – Normalisation of the density.c (float or array of floats, default
None
) – Concentration(s) of the halo(s). Must be same length asm
.coord (str, {
k
,``kappa``}) – What the radial coordinate represents.r
represents physical co-ordinates [units Mpc/h].x
is in units of the scale radius (r_vir = c), ands
is in units of the virial radius (r_vir = 1).
- virial_velocity(m=None, r=None)¶
Return the virial velocity for a halo of mass
m
.Either m or r must be passed. If both are passed,
m
is preferentially used.- Parameters:
m (array_like, optional) – Masses of halos.
r (array_like, optional) – Radii of halos.