TwoPowerHalo
- class dysmalpy.models.TwoPowerHalo(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
Two power law density model for a dark matter halo
- Parameters:
mvirial (float) – Virial mass in logarithmic solar units
conc (float) – Concentration parameter
alpha (float) – Power law index at small radii
beta (float) – Power law index at large radii
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 aGalaxy
make sure the respective cosmologies are the same. Default isFlatLambdaCDM
with H0=70., and Om0=0.3.
Notes
Model formula:
The mass density follows Equation 2.64 of Binney & Tremaine (2008) [1]:
\[\rho=\frac{\rho_0}{(r/r_s)^\alpha(1 + r/r_s)^{\beta - \alpha}}\]\(r_s\) is the scale radius and defined as \(r_\mathrm{vir}/c\) where \(r_\mathrm{vir}\) is the virial radius and \(c\) is the concentration parameter. \(\rho_0\) is the normalization parameter.
References
Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
calc_alpha_from_fdm
(baryons, r_fdm)Calculate alpha given dark matter fraction and baryonic distribution
calc_rho0
([rvirial])Normalization of the density distribution
Enclosed mass as a function of radius
evaluate
(r, mvirial, conc, alpha, beta, fdm)Mass density for the TwoPowerHalo
Attributes Documentation
- alpha = DysmalParameter('alpha', value=1.0, prior=<dysmalpy.parameters.UniformPrior object>)
- beta = DysmalParameter('beta', value=3.0, prior=<dysmalpy.parameters.UniformPrior object>)
- 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=1.0, bounds=(5, 20), prior=<dysmalpy.parameters.UniformPrior object>)
- param_names = ('mvirial', 'fdm', 'conc', 'alpha', 'beta')
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_alpha_from_fdm(baryons, r_fdm)[source]
Calculate alpha given dark matter fraction and baryonic distribution
- Parameters:
baryons (
MassModel
or dictionary) – Model component representing the baryons (assumed to be light emitting), or dictionary containing a list of the baryon components (baryons[‘components’]) and a list of whether the baryon components are light emitting or not (baryons[‘light’])r_fdm (float) – Radius at which the dark matter fraction is determined
- Returns:
alpha – alpha value
- Return type:
Notes
This uses the current values of
fdm
,mvirial
, andbeta
together with the input baryon distribution to calculate the necessary value ofalpha
.
- calc_rho0(rvirial=None)[source]
Normalization of the density distribution
- Returns:
rho0 – Mass density normalization in \(M_{\odot}/\rm{kpc}^3\)
- Return type: