Class SphericalBesselTransform#

Inheritance Relationships#

Base Type#

Class Documentation#

class SphericalBesselTransform : public trv::maths::HankelTransform#

Public Functions

SphericalBesselTransform(int ell, int n, bool threaded = true)#

Construct the spherical Bessel transform.

Parameters:
  • ell – Degree of the spherical Bessel transform.

  • n – Power-law bias index.

  • threaded – If true (default), use multi-threads FFT.

void initialise(std::vector<double> sample_pts, double kr_c, bool lowring = true, trva::ExtrapOption extrap = trva::ExtrapOption::NONE, double extrap_exp = 2.)#

Initialise the spherical Bessel transform.

This sets up the underlying Hankel transform with order \( \mu = \ell + 1/2 \). The low-ringing pivot value is enforced from an initial value of 1.

Parameters:
  • sample_pts – Logarithmically linearly-spaced sample points. Must be even in length if extrapolation is enabled.

  • kr_c – Pivot value.

  • lowring – If true (default), set the pivot value by the low-ringing condition.

  • extrap – Extrapolation option. If not trv::array::ExtrapOption::NONE (default), the sample size for the transform is the smallest power of 2 that is greater than or equal to extrap_exp times the original number of sample points; the pre-transform samples are assumed to be real and must be even in length.

  • extrap_exp – Sample size expansion factor (default is 2) for extrapolation. The smallest power of 2 greater than or equal to this times the original number of sample points is used as the sample size for the transform.

void initialise(std::vector<double> sample_pts, double kr_c, bool lowring = true, int extrap = 0, double extrap_exp = 2.)#

Initialise the spherical Bessel transform.

This sets up the underlying Hankel transform with order \( \mu = \ell + 1/2 \). The low-ringing pivot value is enforced from an initial value of 1.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
  • sample_pts – Logarithmically linearly-spaced sample points. Must even in length if extrapolation is enabled.

  • kr_c – Pivot value.

  • lowring – If true (default), set the pivot value by the low-ringing condition.

  • extrap – Extrapolation option. If not 0 (default), the sample size for the transform is the smallest power of 2 that is greater than or equal to extrap_exp times the original number of sample points; the pre-transform samples are assumed to be real and must be even in length.

  • extrap_exp – Sample size expansion factor (default is 2) for extrapolation. The smallest power of 2 greater than or equal to this times the original number of sample points is used as the sample size for the transform.

void biased_transform(std::vector<std::complex<double>> &a, std::vector<std::complex<double>> &b)#

Perform the (forward biased) spherical Bessel transform.

The transform is defined here as

\[ b(k) = 4\pi \int_0^\infty r^2 \mathrm{d}r \, (k r)^q j_\ell(k r) a(r) \,. \]

Attention

If extrapolation is enabled by extrap, the pre-transform samples are assumed to be real.

Note

This is equivalent to the (forward biased) Hankel transform for \( A(r) = r^{3/2} a(r) \) and \( B(k) = (2\pi / k)^{3/2} b(k) \) with \( \mu = \ell + 1/2 \) and the same \( q \).

Parameters:
  • a[in] Pre-transform sample values. Must even in length if extrapolation is enabled.

  • b[out] Post-transform sample values.

void transform_cosmological_multipole(int dir, std::vector<std::complex<double>> &pre_samples, std::vector<std::complex<double>> &post_samples)#

Transform csomological multipole samples.

Attention

If extrapolation is enabled (extrap not trv::array::ExtrapOption::NONE, the pre-transform samples are assumed to be real.

Parameters:
  • dir[in] Transform direction: +1 (forward) for configuration to Fourier space, -1 (backward) for Fourier to configuration space.

  • pre_samples[in] Pre-transform multipole samples. Must be even in length if extrapolation is enabled.

  • post_samples[out] Post-transform multipoles samples.

Public Members

int degree#

degree of the spherical Bessel transform