|
Triumvirate C++ API 0.5.0.post1.dev301+g026f21751
Three-point clustering measurements in large-scale structure analyses.
|
Perform the (forward biased) Hankel and associated transforms using the FFTLog algorithm. More...
#include <fftlog.hpp>
Inheritance diagram for trv::maths::HankelTransform:
Collaboration diagram for trv::maths::HankelTransform:Public Member Functions | |
| 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 | |
| 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 | |
Perform the (forward biased) Hankel and associated transforms using the FFTLog algorithm.
Definition at line 68 of file fftlog.hpp.
| trv::maths::HankelTransform::HankelTransform | ( | double | mu, |
| double | q, | ||
| bool | threaded = true ) |
Construct the Hankel transform.
| mu | Order of the Hankel transform. |
| q | Power-law bias index. |
| threaded | If true (default), use multi-threads FFT. |
Definition at line 39 of file fftlog.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| trv::maths::HankelTransform::~HankelTransform | ( | ) |
Destruct the Hankel transform.
Definition at line 65 of file fftlog.cpp.
| void trv::maths::HankelTransform::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.
This sets up the pre- and post-transform samples as well as the transform kernel and the pivot value.
| 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. |
| trv::sys::InvalidParameterError | When the size of sample_pts is less than 2. |
| trv::sys::InvalidParameterError | When sample_pts is not logarithmically spaced. |
| trv::sys::InvalidParameterError | When the size of sample_pts is not even with extrapolation enabled. |
| trv::sys::InvalidParameterError | When extrap_exp results in a shrunken sample size. |
| trv::sys::InvalidParameterError | When kr_c is non-positive while lowring is false. |
Definition at line 102 of file fftlog.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::maths::HankelTransform::initialise | ( | std::vector< double > | sample_pts, |
| double | kr_c, | ||
| bool | lowring = true, | ||
| int | extrap = 0, | ||
| double | extrap_exp = 2. ) |
Initialise the Hankel transform.
This sets up the pre- and post-transform samples as well as the transform kernel and the pivot value.
| 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 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. |
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 246 of file fftlog.cpp.
Here is the call graph for this function:| void trv::maths::HankelTransform::biased_transform | ( | std::complex< double > * | a, |
| std::complex< double > * | b ) |
Perform the (forward biased) Hankel transform.
The transform is defined here as
\[ b(k) = \int_0^\infty k \mathrm{d}r \, (k r)^q J_\mu(k r) a(r) \,. \]
| [in] | a | Pre-transform sample values. Must be even in length if extrapolation is enabled. |
| [out] | b | Post-trasform sample values. |
extrap not trv::array::ExtrapOption::NONE, the pre-transform samples are assumed to be real. Definition at line 346 of file fftlog.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< std::complex< double > > trv::maths::HankelTransform::compute_kernel_coeff | ( | ) |
Compute the FFTLog transform kernel coefficients \( u \).
Definition at line 287 of file fftlog.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| double trv::maths::HankelTransform::calc_lowring_pivot | ( | double | delta, |
| double | kr_c = 1. ) |
Calculate a low-ringing FFTLog transform pivot value \( k r = k_c r_c \).
| delta | Logarithmic-interval sample spacing. |
| kr_c | Initial pivot value (default is 1.). If zero, it is calculated directly; otherwise, it is adjusted from the initial value. |
Definition at line 255 of file fftlog.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| double trv::maths::HankelTransform::order |
order of the Hankel transform
Definition at line 70 of file fftlog.hpp.
| double trv::maths::HankelTransform::bias |
power-law bias index
Definition at line 71 of file fftlog.hpp.
| int trv::maths::HankelTransform::nsamp = 0 |
number of samples provided
Definition at line 72 of file fftlog.hpp.
| int trv::maths::HankelTransform::nsamp_trans = 0 |
number of samples transformed
Definition at line 73 of file fftlog.hpp.
| double trv::maths::HankelTransform::logres = 0. |
logarithmic interval sample spacing
Definition at line 74 of file fftlog.hpp.
| double trv::maths::HankelTransform::pivot = 1. |
pivot value
Definition at line 75 of file fftlog.hpp.
| std::vector<double> trv::maths::HankelTransform::pre_sampts |
logarithmically linearly-spaced sample points pre-transform
Definition at line 78 of file fftlog.hpp.
| std::vector<double> trv::maths::HankelTransform::post_sampts |
logarithmically linearly-spaced sample points post-transform
Definition at line 81 of file fftlog.hpp.