hmf.core._kernels.mass_variance.truncation_errors¶
- hmf.core._kernels.mass_variance.truncation_errors(ln_sigma: ArrayLike, dlnsigma_dlnr: ArrayLike, tail_w2: ArrayLike, tail_wdw: ArrayLike, tail_ddw: ArrayLike | None = None, step: float = 0.0) tuple[ndarray[tuple[Any, ...], dtype[float64]], ndarray[tuple[Any, ...], dtype[float64]]][source]¶
Bound the relative errors in sigma and dln(sigma)/dln(R) from missing integrands.
If the parts missing from (or wrong in) \(2\pi^2 s\), \(2\pi^2 s'/2\) and \(2\pi^2 s''/2\) are bounded by \(T_0\), \(T_1\) and \(T_2\) (see
tail_integral()), then with \(D = d\ln\sigma/d\ln R = s'/2s\),\[\left|\frac{\delta\sigma}{\sigma}\right| \le \frac{T_0}{2 \cdot 2\pi^2 s}, \qquad \left|\frac{\delta D}{D}\right| \le \frac{T_1}{2\pi^2 s |D|} + \frac{T_0}{2\pi^2 s} + \frac{4}{81} h \frac{T_2}{2\pi^2 s |D|}.\]The last term is the error that a wrong second derivative at a node causes in the cubic Hermite interpolant of \(\ln|d\ln\sigma/d\ln m|\) over a lattice step \(h\) in ln m (at most \(\frac{4}{27} h\) times the error in its slope).
The error in \(D\) is the one that enters \(dn/dm\). It is typically \(kR\) times the error in sigma, because \(|W'| \sim kR\, |W|\) at large \(kR\): that is why an estimator of the error in sigma alone underestimates the error in \(dn/dm\) by 20-50 times.
- Parameters:
ln_sigma – ln(sigma) at the node.
dlnsigma_dlnr – \(D\) at the node.
tail_w2 – \(T_0\), \(T_1\) and \(T_2\).
tail_ddwis None if the second derivative is not used.tail_wdw – \(T_0\), \(T_1\) and \(T_2\).
tail_ddwis None if the second derivative is not used.tail_ddw – \(T_0\), \(T_1\) and \(T_2\).
tail_ddwis None if the second derivative is not used.step – The lattice spacing \(h\) in ln m.
- Returns:
rel_sigma, rel_dlnsigma – The bounds on the relative errors (
infif a tail diverges).- Return type:
ndarray