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:
Fittable1DModel
Navarro–Frenk–White (NFW) profile - model for radial distribution of dark matter.
- Parameters:
- mass
python:float
orQuantity
[: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:tuple
orpython: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
a
python:dict
, optional A dictionary
{parameter_name: boolean}
of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively thefixed
property 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 thetied
property 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, themin
andmax
properties of a parameter may be used.- eqcons
python:list
, optional A list of functions of length
n
such thateqcons[j](x0,*args) == 0.0
in a successfully optimized problem.- ineqcons
python:list
, optional A list of functions of length
n
such thatieqcons[j](x0,*args) >= 0.0
is 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
None
if 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
None
if 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
Parameter
attributes 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:float
orQuantity
[:ref: ‘length’] Radial position of velocity to be calculated for the NFW profile.
- r
- Returns:
- velocity
python:float
orQuantity
[: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
nan
andinf
.
- evaluate(r, mass, concentration, redshift)[source]¶
One dimensional NFW profile function
- Parameters:
- r
python:float
orQuantity
[:ref: ‘length’] Radial position of density to be calculated for the NFW profile.
- mass
python:float
orQuantity
[: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:float
orQuantity
[‘density’] NFW profile mass density at location
r
. The density units are: [mass
/r
^3]
- density
Notes
Warning
Output values might contain
nan
andinf
.