Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
trv::maths::SphericalBesselTransform Class Reference

#include <fftlog.hpp>

+ Inheritance diagram for trv::maths::SphericalBesselTransform:
+ Collaboration diagram for trv::maths::SphericalBesselTransform:

Public Member Functions

 SphericalBesselTransform (int ell, int n, bool threaded=true)
 Construct the spherical Bessel transform.
 
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.
 
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.
 
void biased_transform (std::vector< std::complex< double > > &a, std::vector< std::complex< double > > &b)
 Perform the (forward biased) spherical Bessel transform.
 
void transform_cosmological_multipole (int dir, std::vector< std::complex< double > > &pre_samples, std::vector< std::complex< double > > &post_samples)
 Transform csomological multipole samples.
 
- Public Member Functions inherited from trv::maths::HankelTransform
 HankelTransform (double mu, double q, bool threaded=true)
 Construct the Hankel transform.
 
 ~HankelTransform ()
 Destruct the Hankel transform.
 
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 Hankel transform.
 
void initialise (std::vector< double > sample_pts, double kr_c, bool lowring=true, int extrap=0, double extrap_exp=2.)
 Initialise the Hankel transform.
 
void biased_transform (std::complex< double > *a, std::complex< double > *b)
 Perform the (forward biased) Hankel transform.
 
std::vector< std::complex< double > > compute_kernel_coeff ()
 Compute the FFTLog transform kernel coefficients \( u \).
 
double calc_lowring_pivot (double delta, double kr_c=1.)
 Calculate a low-ringing FFTLog transform pivot value \( k r = k_c r_c \).
 

Public Attributes

int degree
 degree of the spherical Bessel transform
 
- Public Attributes inherited from trv::maths::HankelTransform
double order
 order of the Hankel transform
 
double bias
 power-law bias index
 
int nsamp = 0
 number of samples provided
 
int nsamp_trans = 0
 number of samples transformed
 
double logres = 0.
 logarithmic interval sample spacing
 
double pivot = 1.
 pivot value
 
std::vector< double > pre_sampts
 logarithmically linearly-spaced sample points pre-transform
 
std::vector< double > post_sampts
 logarithmically linearly-spaced sample points post-transform
 

Detailed Description

Definition at line 259 of file fftlog.hpp.

Constructor & Destructor Documentation

◆ SphericalBesselTransform()

trv::maths::SphericalBesselTransform::SphericalBesselTransform ( int ell,
int n,
bool threaded = true )

Construct the spherical Bessel transform.

Parameters
ellDegree of the spherical Bessel transform.
nPower-law bias index.
threadedIf true (default), use multi-threads FFT.

Definition at line 503 of file fftlog.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ initialise() [1/2]

void trv::maths::SphericalBesselTransform::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_ptsLogarithmically linearly-spaced sample points. Must be even in length if extrapolation is enabled.
kr_cPivot value.
lowringIf true (default), set the pivot value by the low-ringing condition.
extrapExtrapolation 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_expSample 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.

Definition at line 509 of file fftlog.cpp.

+ Here is the call graph for this function:

◆ initialise() [2/2]

void trv::maths::SphericalBesselTransform::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.

Parameters
sample_ptsLogarithmically linearly-spaced sample points. Must even in length if extrapolation is enabled.
kr_cPivot value.
lowringIf true (default), set the pivot value by the low-ringing condition.
extrapExtrapolation 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_expSample 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.

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

Definition at line 516 of file fftlog.cpp.

+ Here is the call graph for this function:

◆ biased_transform()

void trv::maths::SphericalBesselTransform::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) \,. \]

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
[in]aPre-transform sample values. Must even in length if extrapolation is enabled.
[out]bPost-transform sample values.
Attention
If extrapolation is enabled by extrap, the pre-transform samples are assumed to be real.

Definition at line 523 of file fftlog.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ transform_cosmological_multipole()

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

Transform csomological multipole samples.

Parameters
[in]dirTransform direction: +1 (forward) for configuration to Fourier space, -1 (backward) for Fourier to configuration space.
[in]pre_samplesPre-transform multipole samples. Must be even in length if extrapolation is enabled.
[out]post_samplesPost-transform multipoles samples.
Attention
If extrapolation is enabled (extrap not trv::array::ExtrapOption::NONE, the pre-transform samples are assumed to be real.

Definition at line 553 of file fftlog.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ degree

int trv::maths::SphericalBesselTransform::degree

degree of the spherical Bessel transform

Definition at line 261 of file fftlog.hpp.


The documentation for this class was generated from the following files: