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:
masspython:float or Quantity [:ref: ‘mass’]

Mass of NFW peak within specified overdensity radius.

concentrationpython:float

Concentration of the NFW profile.

redshiftpython:float

Redshift of the NFW profile.

massfactorpython:tuple or python: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”)

cosmoCosmology

Background cosmology for density calculation. If None, the default cosmology will be used.

Other Parameters:
fixeda python:dict, optional

A dictionary {parameter_name: boolean} of parameters to not be varied during fitting. True means the parameter is held fixed. Alternatively the fixed property of a parameter may be used.

tiedpython: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 the tied property of a parameter may be used.

boundspython: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, the min and max properties of a parameter may be used.

eqconspython:list, optional

A list of functions of length n such that eqcons[j](x0,*args) == 0.0 in a successfully optimized problem.

ineqconspython:list, optional

A list of functions of length n such that ieqcons[j](x0,*args) >= 0.0 is a successfully optimized problem.

Notes

Model formula:

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

References

Attributes Summary

concentration

input_units

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).

mass

param_names

Names of the parameters that describe models of this type.

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

return_units

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).

rho_scale

Scale density of the NFW profile.

v_max

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_velocity(r)

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:
rpython:float or Quantity [:ref: ‘length’]

Radial position of velocity to be calculated for the NFW profile.

Returns:
velocitypython:float or Quantity [:ref: ‘speed’]

NFW profile circular velocity at location r. The velocity units are: [km / s]

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 and inf.

evaluate(r, mass, concentration, redshift)[source]

One dimensional NFW profile function

Parameters:
rpython:float or Quantity [:ref: ‘length’]

Radial position of density to be calculated for the NFW profile.

masspython:float or Quantity [:ref: ‘mass’]

Mass of NFW peak within specified overdensity radius.

concentrationpython:float

Concentration of the NFW profile.

redshiftpython:float

Redshift of the NFW profile.

Returns:
densitypython:float or Quantity [‘density’]

NFW profile mass density at location r. The density units are: [mass / r ^3]

Notes

Warning

Output values might contain nan and inf.