hmf.core._kernels.filters.tophat_window_derivatives

hmf.core._kernels.filters.tophat_window_derivatives(x: ArrayLike, order: int = 2) → tuple[ndarray[tuple[Any, ...], dtype[float64]], ...][source]

The top-hat window and its logarithmic derivatives.

\[\begin{split}W(x) &= \frac{3 (\sin x - x \cos x)}{x^3}, \\ \frac{dW}{d\ln x} &= \frac{3 (x^2 \sin x + 3 x \cos x - 3 \sin x)}{x^3}, \\ \frac{d^2W}{d(\ln x)^2} &= \frac{3 (x^3 \cos x - 4 x^2 \sin x - 9 x \cos x + 9 \sin x)}{x^3},\end{split}\]

with Taylor series below TOPHAT_SERIES_THRESHOLD.

Parameters:
  • x – \(kR\), dimensionless, >= 0.

  • order – The highest derivative to return: 0, 1 or 2.

Returns:

(W,), (W, W') or (W, W', W''), each of the shape of x.

Return type:

tuple of ndarray