halo_radius_to_halo_mass

halotools.empirical_models.halo_radius_to_halo_mass(radius, cosmology, redshift, mdef)[source]

Spherical overdensity mass as a function of the input radius.

Note that this function is independent of the form of the density profile.

See Halo Mass and Radius Definitions for details.

Parameters:
radius: array_like

Halo radius in physical Mpc/h; can be a scalar or a numpy array.

cosmologyobject

Instance of an Astropy cosmology object.

redshift: array_like

Can either be a scalar, or a numpy array of the same dimension as the input radius.

mdef: str

String specifying the halo mass definition, e.g., ‘vir’ or ‘200m’.

Returns:
mass: array_like

Total halo mass in \(M_{\odot}/h\); has the same dimensions as the input radius.