pynbody.analysis.hmf.correlation_func#
- pynbody.analysis.hmf.correlation_func(context, log_r_min=-3, log_r_max=2, delta_log_r=0.2, pspec=<class 'pynbody.analysis.hmf.PowerSpectrumCAMB'>)[source]#
Calculate the linear density field correlation function.
- Parameters:
context (SimSnap) – The snapshot from which to pull the cosmological context
log_r_min (float, optional) – log10 of the minimum separation (Mpc h^-1) to consider
log_r_max (float, optional) – log10 of the maximum separation (Mpc h^-1) to consider
delta_log_r (float, optional) – The value spacing in dex
pspec (PowerSpectrum, optional) – The power spectrum class to use, or if an instance is provided, the power spectrum to use. The default is to use PowerSpectrumCAMB which will attempt to calculate a power spectrum from the simulation context; if it fails, it will fall back to using Planck2018 power spectrum and issue a warning.
- Returns:
r (array) – The separation values in Mpc h^-1
Xi (array) – The correlation function at each separation