pynbody.analysis.hmf.variance

Contents

pynbody.analysis.hmf.variance#

pynbody.analysis.hmf.variance(M_or_R, f_filter=<class 'pynbody.analysis.hmf.TophatFilter'>, powspec=<class 'pynbody.analysis.hmf.PowerSpectrum'>, arg_is_R=False)[source]#

Calculate the variance of the density field smoothed on a mass scale M, or optionally a length scale R.

Parameters:
  • M_or_R (float or array) – The mass scale in Msol/h or the radius of the filter in Mpc/h comoving. If an array, the variance is calculated for each element of the array.

  • f_filter (FieldFilter, optional) – The filter to use. Default is a top-hat filter.

  • powspec (PowerSpectrum, optional) – The power spectrum object to use. Default is a Planck 2018 power spectrum at z=0.

  • arg_is_R (bool, optional) – If True, interpret the input as a length scale R rather than a mass scale M.

Returns:

The variance of the density field smoothed on the given scale(s).

Return type:

float or array