PS

class hmf.mass_function.fitting_functions.PS(nu2: ndarray, m: ndarray | None = None, z: float = 0.0, n_eff: ndarray | None = None, mass_definition: BaseMassDefinition | None = None, cosmo: FLRW = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897), delta_c: float = 1.68647, **model_parameters)[source]

Press-Schechter mass function fit.

For details on attributes, see documentation for BaseFittingFunction.

Parameters:
  • nu2 (array_like) – A vector of peak-heights, \(\delta_c^2/\sigma^2\) corresponding to m

  • m (array_like, optional) – A vector of halo masses [units M_sun/h]. Only necessary if req_mass is True. Typically provides limits of applicability. Must correspond to nu2.

  • z (float, optional) – The redshift. Only used by models that depend on redshift. Default is 0.

  • n_eff (array_like, optional) – The effective spectral index at m. Only required if req_neff is True.

  • mass_definition (hmf.halos.mass_definitions.MassDefinition instance) – A halo mass definition. Only required for fits which explicitly include a parameterization for halo definition.

  • cosmo (astropy.cosmology.FLRW instance, optional) – A cosmology. Default is hmf.cosmology.cosmo.DEFAULT_COSMOLOGY (Planck18), as for the frameworks. Either omegam_z or cosmo is required if req_omz is True. If both are passed, omegam_z takes precedence.

  • **model_parameters (unpacked-dictionary) – These parameters are model-specific. The available parameters and their defaults are listed in the Notes section of each model (and are also available as <model>._defaults).

Notes

The Press-Schechter [1] form is:

\[f_{\rm PS}(\sigma) = \sqrt{\frac{2}{\pi}}\nu\exp(-0.5\nu^2)\]

Default model parameters: none (this model has no free parameters).

References

[1]

Press, W. H., Schechter, P., 1974. ApJ 187, 425-438. http://adsabs.harvard.edu/full/1974ApJ…187..425P

Attributes

cutmask

Boolean mask of the elements within the fit’s calibrated range.

Has the same length as nu2. An element is True if the corresponding mass (or \(\sigma\), depending on the model) lies inside the range over which the fit was calibrated against simulations, as given in the reference paper. Elements outside that range are False: fsigma is still computed there, but is an extrapolation. The default is True everywhere. The mask is informational only; it is not applied anywhere in hmf.

fsigma

The function \(f(\sigma)\equiv\nu f(\nu)\).

lnsigma

Negative log of sigma.

normalized = True

Whether this model is normalized so that all mass is in halos

nu

The peak height, \(\nu = \delta_c/\sigma\).

omegam_z

Normalised matter density at current redshift.

references: ClassVar[tuple[str, ...]] = ('Press, W. H., Schechter, P., 1974. ApJ 187, 425-438. http://adsabs.harvard.edu/full/1974ApJ...187..425P',)

References to cite when this model is used, each a formatted citation string. Subclasses inherit their parent’s references unless they set their own.

req_mass = False

Whether m is required for this subclass

req_neff = False

Whether n_eff is required for this subclass

req_sigma = False

Whether sigma is required to compute this model.

req_z = False

Whether redshift is required for this model.

sigma

The sqrt of mass variance as a function of mass.

sim_definition = None

Details of the defining simulation, instance of SimDetails

Methods

classmethod get_measured_mdef()

Get the mass definition used in the defining simulation.

classmethod get_models() → Mapping[str, type]

Get a read-only mapping of all implemented models for this component.

The mapping is a live view of the registry, so it shows models registered later, but it can not be used to add or remove models.