NFW#
- class astropy.modeling.physical_models.NFW(mass=<Quantity 1. solMass>, concentration=1.0, redshift=0.0, massfactor=('critical', 200), cosmo=None, **kwargs)[source]#
 Bases:
Fittable1DModelNavarro–Frenk–White (NFW) profile - model for radial distribution of dark matter.
- Parameters:
 - mass
python:floatorQuantity[:ref: ‘mass’] Mass of NFW peak within specified overdensity radius.
- concentration
python:float Concentration of the NFW profile.
- redshift
python:float Redshift of the NFW profile.
- massfactor
python:tupleorpython:str - Mass overdensity factor and type for provided profiles:
 - Tuple version:
 (“virial”,) : virial radius
(“critical”, N) : radius where density is N times that of the critical density
(“mean”, N) : radius where density is N times that of the mean density
- String version:
 “virial” : virial radius
“Nc” : radius where density is N times that of the critical density (e.g. “200c”)
“Nm” : radius where density is N times that of the mean density (e.g. “500m”)
- cosmo
Cosmology Background cosmology for density calculation. If None, the default cosmology will be used.
- mass
 - Other Parameters:
 - fixed
python:dict, optional A dictionary
{parameter_name: boolean}of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively thefixedproperty of a parameter may be used.- tied
python:dict, optional A dictionary
{parameter_name: callable}of parameters which are linked to some other parameter. The dictionary values are callables providing the linking relationship. Alternatively thetiedproperty of a parameter may be used.- bounds
python:dict, optional A dictionary
{parameter_name: value}of lower and upper bounds of parameters. Keys are parameter names. Values are a list or a tuple of length 2 giving the desired range for the parameter. Alternatively, theminandmaxproperties of a parameter may be used.- eqcons
python:list, optional A list of functions of length
nsuch thateqcons[j](x0,*args) == 0.0in a successfully optimized problem.- ineqcons
python:list, optional A list of functions of length
nsuch thatieqcons[j](x0,*args) >= 0.0is a successfully optimized problem.
- fixed
 
Notes
Model formula:
\[\rho(r)=\frac{\delta_c\rho_{c}}{r/r_s(1+r/r_s)^2}\]References
Attributes Summary
This property is used to indicate what units or sets of units the evaluate method expects, and returns a dictionary mapping inputs to units (or
Noneif any units are accepted).Names of the parameters that describe models of this type.
Radius of maximum circular velocity.
Scale radius of the NFW profile.
Mass factor defined virial radius of the NFW profile (R200c for M200c, Rvir for Mvir, etc.).
This property is used to indicate what units or sets of units the output of evaluate should be in, and returns a dictionary mapping outputs to units (or
Noneif any units are accepted).Scale density of the NFW profile.
Maximum circular velocity.
Methods Summary
A_NFW(y)Dimensionless volume integral of the NFW profile, used as an intermediate step in some calculations for this model.
Circular velocities of the NFW profile.
evaluate(r, mass, concentration, redshift)One dimensional NFW profile function.
Attributes Documentation
- concentration = Parameter('concentration', value=1.0, bounds=(1.0, None))#
 
- input_units#
 
- mass = Parameter('mass', value=1.0, unit=solMass, bounds=(1.0, None))#
 
- param_names = ('mass', 'concentration', 'redshift')#
 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.
- r_max#
 Radius of maximum circular velocity.
- r_s#
 Scale radius of the NFW profile.
- r_virial#
 Mass factor defined virial radius of the NFW profile (R200c for M200c, Rvir for Mvir, etc.).
- redshift = Parameter('redshift', value=0.0, bounds=(0.0, None))#
 
- return_units#
 
- rho_scale#
 Scale density of the NFW profile. Often written in the literature as \(\rho_s\).
- v_max#
 Maximum circular velocity.
Methods Documentation
- static A_NFW(y)[source]#
 Dimensionless volume integral of the NFW profile, used as an intermediate step in some calculations for this model.
Notes
Model formula:
\[A_{NFW} = [\ln(1+y) - \frac{y}{1+y}]\]
- circular_velocity(r)[source]#
 Circular velocities of the NFW profile.
- Parameters:
 - r
python:floatorQuantity[:ref: ‘length’] Radial position of velocity to be calculated for the NFW profile.
- r
 - Returns:
 - velocity
python:floatorQuantity[:ref: ‘speed’] NFW profile circular velocity at location
r. The velocity units are: [km / s]
- velocity
 
Notes
Model formula:
\[v_{circ}(r)^2 = \frac{1}{x}\frac{\ln(1+cx)-(cx)/(1+cx)}{\ln(1+c)-c/(1+c)}\]\[x = r/r_s\]Warning
Output values might contain
nanandinf.
- evaluate(r, mass, concentration, redshift)[source]#
 One dimensional NFW profile function.
- Parameters:
 - r
python:floatorQuantity[:ref: ‘length’] Radial position of density to be calculated for the NFW profile.
- mass
python:floatorQuantity[:ref: ‘mass’] Mass of NFW peak within specified overdensity radius.
- concentration
python:float Concentration of the NFW profile.
- redshift
python:float Redshift of the NFW profile.
- r
 - Returns:
 - density
python:floatorQuantity[‘density’] NFW profile mass density at location
r. The density units are: [mass/r^3]
- density
 
Notes
Warning
Output values might contain
nanandinf.