CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::wrapper::fftlog Namespace Reference

The namespace of the FFTlog wrappers More...

Functions

void fhti_ (int *_n, double *_mu, double *_q, double *_dlnr, double *_kr, int *_kropt, double *_wsave, int *_ok)
 wrapper of the fhti subroutine contained in External/fftlog-f90-master/fftlog.f This is an initialization routine More...
 
void fftl_ (int *_n, double *_a, double *_rk, int *_dir, double *_wsave)
 wrapper of the fftl subroutine contained in External/fftlog-f90-master/fftlog.f This subroutine computes the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence More...
 
std::vector< double > transform_FFTlog (const std::vector< double > yy, const int dir, const std::vector< double > xx, const std::vector< double > fx, const double mu=0, const double q=0, const double kr=1, const int kropt=0)
 wrapper of the FFTlog to compute
the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence More...
 
void transform_FFTlog (std::vector< double > &yy, std::vector< double > &fy, const int dir, const std::vector< double > xx, const std::vector< double > fx, const double mu=0, const double q=0, const double kr=1, const int kropt=0)
 wrapper of the FFTlog to compute the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence More...
 

Detailed Description

The namespace of the FFTlog wrappers

The fftlog namespace contains all the wrapper functions of the FFTlog routines, by Hamilton (see Hamilton 2000, Appendix B)

For a complete description of the routines please refer to http://casa.colorado.edu/~ajsh/FFTLog/

Function Documentation

◆ fftl_()

void cbl::wrapper::fftlog::fftl_ ( int *  _n,
double *  _a,
double *  _rk,
int *  _dir,
double *  _wsave 
)

wrapper of the fftl subroutine contained in External/fftlog-f90-master/fftlog.f This subroutine computes the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence

Parameters
_nnumber of points in the array to be transformed
_ainput → the array A to transform, output → the transformed array
_rk\(r_c/k_c\)
_dir1 → forward transform, -1 → backward transform
_wsaveworking array

◆ fhti_()

void cbl::wrapper::fftlog::fhti_ ( int *  _n,
double *  _mu,
double *  _q,
double *  _dlnr,
double *  _kr,
int *  _kropt,
double *  _wsave,
int *  _ok 
)

wrapper of the fhti subroutine contained in External/fftlog-f90-master/fftlog.f This is an initialization routine

Parameters
[in]_nnumber of points in the array to be transformed
[in]_muindex of \(J_\mu\) in Hankel transform
[in]_qexponent of power law bias
[in]_dlnrseparation between natural log of points
[in]_kr\(k_c\cdot r_c\) where c is the central point of the array \(kr = k_j r_{n+1-j} = k_{n+1-j} r_j\)
[in]_kropt0 → use input kr as is; 1 → change kr to nearest low-ringing kr, quietly; 2 → change kr to nearest low-ringing kr, verbosely; 3 → change kr interactively
[out]_wsaveworking array
[out]_ok1 → all went ok; 0 → error in initializations

◆ transform_FFTlog() [1/2]

vector< double > cbl::wrapper::fftlog::transform_FFTlog ( const std::vector< double >  yy,
const int  dir,
const std::vector< double >  xx,
const std::vector< double >  fx,
const double  mu = 0,
const double  q = 0,
const double  kr = 1,
const int  kropt = 0 
)

wrapper of the FFTlog to compute
the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence

Parameters
yyarray containing the output positions
dir→ forward transform, -1 → backward transform
xxthe input position of the array to transform
fxthe array to transform
muindex of \(J_\mu\) in Hankel transform
qexponent of power law bias
kr\(k_c\cdot r_c\) where c is the central point of the array \(kr = k_j r_{n+1-j} = k_{n+1-j} r_j\)
kropt0 → use input kr as is; 1 → change kr to nearest low-ringing kr, quietly; 2 → change kr to nearest low-ringing kr, verbosely; 3 → change kr interactively.
Returns
the transformed array

Definition at line 43 of file FFTlog.cpp.

◆ transform_FFTlog() [2/2]

void cbl::wrapper::fftlog::transform_FFTlog ( std::vector< double > &  yy,
std::vector< double > &  fy,
const int  dir,
const std::vector< double >  xx,
const std::vector< double >  fx,
const double  mu = 0,
const double  q = 0,
const double  kr = 1,
const int  kropt = 0 
)

wrapper of the FFTlog to compute the discrete Fourier sine or cosine transform of a logarithmically spaced periodic sequence

Parameters
yyarray containing the output positions
fythe transformed array
dir→ forward transform, -1 → backward transform
xxthe input position of the array to transform
fxthe array to transform
muindex of \(J_\mu\) in Hankel transform
qexponent of power law bias
kr\(k_c\cdot r_c\) where c is the central point of the array \(kr = k_j r_{n+1-j} = k_{n+1-j} r_j\) .
kropt0 → use input kr as is; 1 → change kr to nearest low-ringing kr, quietly; 2 → change kr to nearest low-ringing kr, verbosely; 3 → change kr interactively

Definition at line 61 of file FFTlog.cpp.