swiftcl.interpolate module
- class swiftcl.interpolate.interp(**kwargs)[source]
Bases:
objectA class to compute integrals of Bessel functions multiplied by a function using FFTLog-based techniques.
This class supports evaluation of three integral variants: - Standard spherical Bessel integrals (int_jl) - Integrals with additional k^-2 scaling (int_k) - Second-derivative Bessel integrals (int_ddjl)
- Parameters:
l (array_like) – Values of l to compute.
N (int) – Maximum number of points for the FFTLog of the window function.
x (array_like) – Points where the input function is evaluated.
f (array_like) – 2D array of shape (len(x), len(a)) representing the function multiplying the Bessel function.
a (array_like) – Values multiplying the Bessel function argument, i.e., in j_l(ax).
b (float) – Bias for the FFTLog.
g_r (array_like) – Precomputed Gamma coefficients.
xmin (float) – Minimum value of x for FFTLog.
xmax (float) – Maximum value of x for FFTLog.
N_interp (int) – Number of points to interpolate across a.
- l
Spherical harmonic degrees.
- Type:
ndarray
- N
Maximum FFTLog points.
- Type:
int
- x
Evaluation grid for the function.
- Type:
ndarray
- f
Function values to be integrated.
- Type:
ndarray
- a
Multiplier for Bessel argument.
- Type:
ndarray
- b
Bias parameter for FFTLog.
- Type:
float
- g_r
Integration matrix.
- Type:
ndarray
- xmin
Lower bound of x.
- Type:
float
- xmax
Upper bound of x.
- Type:
float
- N_interp
Interpolation resolution for a.
- Type:
int
- wind
Width of smoothing function (default 0.2).
- Type:
float
- fft
FFTLog instance used for coefficient computation.
- Type:
FFTLog
- power_fft
FFTLog exponents.
- Type:
ndarray
- step
Step size between thick samples in a.
- Type:
int
- a_thick
Thinned a sampling used for interpolation.
- Type:
ndarray
- int_ddjl()[source]
Compute the integral with a second-derivative:
∫ f(x) * d²/dx²[j_l(ax)] dx
using FFTLog coefficients and interpolation.
- Returns:
Resulting 2D array of shape (len(l), len(a)), the integral values.
- Return type:
ndarray