LinearNFW

class dysmalpy.models.LinearNFW(z=0, cosmo=FlatLambdaCDM(H0=70.0 km / (Mpc s), Om0=0.3, Tcmb0=0.0 K, Neff=3.04, m_nu=None, Ob0=None), **kwargs)[source]

Bases: DarkMatterHalo

Same as NFW except with the virial mass in linear units

Parameters:
  • mvirial (float) – Virial mass in solar units

  • conc (float) – Concentration parameter

  • fdm (float) – Dark matter fraction

  • z (float) – Redshift

  • cosmo (cosmology object) – The cosmology to use for modelling. If this model component will be attached to a Galaxy make sure the respective cosmologies are the same. Default is FlatLambdaCDM with H0=70., and Om0=0.3.

Notes

Model formula:

The mass density follows Navarro, Frenk, & White (1995) [1]:

\[\rho = \frac{\rho_0}{(r/r_s)(1 + r/r_s)^2}\]

\(r_s\) is the scale radius defined as \(r_{\rm vir}/c\). \(\rho_0\) is the normalization parameter.

References

Attributes Summary

conc

fdm

mvirial

param_names

Names of the parameters that describe models of this type.

Methods Summary

calc_rho0([rvirial])

Normalization of the density distribution

calc_rvir()

Calculate the virial radius based on virial mass and redshift

enclosed_mass(r)

Enclosed mass as a function of radius

evaluate(r, mvirial, conc, fdm)

Mass density as a function of radius

Attributes Documentation

conc = DysmalParameter('conc', value=5.0, bounds=(2, 20), prior=<dysmalpy.parameters.UniformPrior object>)
fdm = DysmalParameter('fdm', value=-99.9, fixed=True, bounds=(0, 1), prior=<dysmalpy.parameters.UniformPrior object>)
mvirial = DysmalParameter('mvirial', value=10.0, bounds=(100000.0, 1e+20), prior=<dysmalpy.parameters.UniformPrior object>)
param_names = ('mvirial', 'fdm', 'conc')

Names of the parameters that describe models of this type.

The parameters in this tuple are in the same order they should be passed in when initializing a model of a specific type. Some types of models, such as polynomial models, have a different number of parameters depending on some other property of the model, such as the degree.

When defining a custom model class the value of this attribute is automatically set by the Parameter attributes defined in the class body.

Methods Documentation

calc_rho0(rvirial=None)[source]

Normalization of the density distribution

Returns:

rho0 – Mass density normalization in \(M_{\odot}/\rm{kpc}^3\)

Return type:

float

calc_rvir()[source]

Calculate the virial radius based on virial mass and redshift

Returns:

rvir – Virial radius

Return type:

float

Notes

Formula:

\[M_{\rm vir} = 100 \frac{H(z)^2 R_{\rm vir}^3}{G}\]

This is based on Mo, Mao, & White (1998) [1] which defines the virial radius as the radius where the mean mass density is \(200\rho_{\rm crit}\). \(\rho_{\rm crit}\) is the critical density for closure at redshift, \(z\).

enclosed_mass(r)[source]

Enclosed mass as a function of radius

Parameters:

r (float or array) – Radius or radii in kpc

Returns:

menc – Enclosed mass in solar units

Return type:

float or array

evaluate(r, mvirial, conc, fdm)[source]

Mass density as a function of radius