Einasto
- class dysmalpy.models.Einasto(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), Einasto_param='None', alphaEinasto=None, nEinasto=None, **kwargs)[source]
Bases:
DarkMatterHaloDark matter halo following an Einasto profile
- Parameters:
mvirial (float) – Virial mass in logarithmic solar units
conc (float) – Concentration parameter
nEinasto (float) – Inverse of the power law logarithmic slope
alphaEinasto (float) – Power law logarithmic slope
fdm (float) – Dark matter fraction
z (float) – Redshift
cosmo (
cosmologyobject) – The cosmology to use for modelling. If this model component will be attached to aGalaxymake sure the respective cosmologies are the same. Default isFlatLambdaCDMwith H0=70., and Om0=0.3.Einasto_param ({'None', 'nEinasto', 'alphaEinasto'}) – Which parameter to leave as the free parameter. If ‘None’, the model determines which parameter to use based on if
nEinastooralphaEinastois None. Default is ‘None’
Notes
Model formula following Retana-Montenegro et al (2012) [1]:
\[\rho = \rho_0 \exp\left\{-\left(\frac{r}{h}\right)^{1/n}\right\}\]where \(h=r_s/(2n)^n\) is the scale length and \(r_s\) is the scale radius defined as \(r_\mathrm{vir}/c\).
In this model only
nEinastooralphaEinastocan be free since \(n=1/\alpha\).References
Attributes Summary
Names of the parameters that describe models of this type.
Methods Summary
calc_alphaEinasto_from_fdm(baryons, r_fdm)Calculate alpha given dark matter fraction and baryonic distribution
calc_nEinasto_from_fdm(baryons, r_fdm)Calculate n given the dark matter fraction and baryonic distribution
calc_rho0([rvirial])Density at the scale length
Enclosed mass as a function of radius
evaluate(r, mvirial, conc, alphaEinasto, ...)Mass density as a function of radius
tie_alphaEinasto(model_set)Function to tie alpha to n
tie_nEinasto(model_set)Function to tie n to alpha
Attributes Documentation
- alphaEinasto = DysmalParameter('alphaEinasto', value=-99.0, fixed=True, 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>)
- nEinasto = DysmalParameter('nEinasto', value=1.0, prior=<dysmalpy.parameters.UniformPrior object>)
- param_names = ('mvirial', 'fdm', 'conc', 'nEinasto', 'alphaEinasto')
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
Parameterattributes defined in the class body.
Methods Documentation
- calc_alphaEinasto_from_fdm(baryons, r_fdm)[source]
Calculate alpha given dark matter fraction and baryonic distribution
- Parameters:
baryons (
MassModelor 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:
alphaEinasto – Power law logarithmic slope
- Return type:
Notes
This uses the current values of
fdm, andmvirialtogether with the input baryon distribution to calculate the necessary value ofalphaEinasto.
- calc_nEinasto_from_fdm(baryons, r_fdm)[source]
Calculate n given the dark matter fraction and baryonic distribution
- Parameters:
baryons (
MassModelor 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:
alphaEinasto – Power law logarithmic slope
- Return type:
Notes
This uses the current values of
fdm, andmvirialtogether with the input baryon distribution to calculate the necessary value ofnEinasto.
- calc_rho0(rvirial=None)[source]
Density at the scale length
- Returns:
rho0 – Mass density at the scale radius in \(M_{\odot}/\rm{kpc}^3\)
- Return type:
- evaluate(r, mvirial, conc, alphaEinasto, nEinasto, fdm)[source]
Mass density as a function of radius