Besseltools Module

python binding to besseltools library (part of CatAna)

SphericalBesselZeros

class catana.besseltools.SphericalBesselZeros(self: catana.besseltools.SphericalBesselZeros, l: int) → None

A root generator for spherical Bessel functions.

The class is initialized for a specific multipole l. The zeros are computed iteratively and the results are stored so that they only have to be computed once. I.e if the n-th zero is requested and it has not been computed before, start at the highest computed zero and compute all zeros up to the n-th.

Constructor

Parameters:l (int) – multipole of the spherical Bessel function
__getitem__(self: catana.besseltools.SphericalBesselZeros, n: int) → float

return n-th zero

Parameters:n (int) – index of zero crossing
Returns:float – n-th root of the spherical Bessel function with multipole l
compute_up_to(self: catana.besseltools.SphericalBesselZeros, n: float) → None

precompute first n zeros

Parameters:n (int) – number of zeros to compute

Spherical Bessel Integrator

catana.besseltools.double_sbessel_integrator(*args, **kwargs)

Overloaded function.

  1. double_sbessel_integrator(w: Callable[[float], float], l: int, r_max: float, k1: numpy.ndarray[float64], k2: numpy.ndarray[float64]) -> object

Compute an integral containing 2 spherical Bessel functions with the same multipole.

Computes \(\int_0^{r_{max}} \; w(r) \; j_l(k_1 r) \; j_l(k_2 r) \;\; dr\)

Parameters:
  • w (callable) – function to integrate (see equation)
  • l (int) – multipole of the spherical Bessel functions
  • r_max (float) – upper boundary of integration
  • k1 (float) – frequency of one spherical Bessel function
  • k2 (float) – frequency of other spherical Bessel function
  1. double_sbessel_integrator(w: catana.basictypes.FunctionInterpolator, l: int, r_max: float, k1: numpy.ndarray[float64], k2: numpy.ndarray[float64]) -> object

Compute an integral containing 2 spherical Bessel functions with the same multipole, using a FunctionInterpolator

Computes \(\int_0^{r_{max}} \; w(r) \; j_l(k_1 r) \; j_l(k_2 r) \;\; dr\)

Parameters:
  • fi (FunctionInterpolator) – function to integrate (see equation, fi(r) is an interpolator of w(r))
  • l (int) – multipole of the spherical Bessel functions
  • r_max (float) – upper boundary of integration
  • k1 (float) – frequency of one spherical Bessel function
  • k2 (float) – frequency of other spherical Bessel function