Commit 0c52b202 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 18/5/15 add helper to access flmn coeff

parent 542cf3b8
......@@ -29,7 +29,7 @@ class LaguerreSphericalTransform {
LaguerreSphericalTransform(string spheregeom, int Lmax, int Mmax, int Nmax,
r_8 R, int Nrings = -1, int Nphi = -1, int alpha=2):
R_(R) {
R_(R), Lmax_(Lmax), Mmax_(Mmax) {
//Factory
if (spheregeom == "ECP" || spheregeom == "Fejer1") {
......@@ -85,6 +85,20 @@ class LaguerreSphericalTransform {
int GetAlpha() { return alpha_;}
//! Get the f(l,m,n) coefficient in the vector collection
//make a Flmn Class
inline complex<r_8> GetFlmn(const vector< complex<r_8> >& flmn, int l , int m, int n) const {
int id= n*Nalm_ + l +m*Lmax_ -m*(m+1)/2;
return flmn[id];
}
//! Set the f(l,m,n) coefficient in the vector collection
inline void SetFlmn(vector< complex<r_8> >& flmn, int l , int m, int n, complex<r_8> value) const {
int id= n*Nalm_ + l +m*Lmax_ -m*(m+1)/2;
flmn[id] = value;
}
//! Synthesis
/*! \brief Coeffs -> Pixels with Input/Output using T floating representation
\input flmn: 3D complex spherical-laguerre coefficients
......@@ -126,6 +140,10 @@ protected:
int Npix_; //!< Total number of 2D pixels
int Nalm_; //!< Total number of Alm coefficients
int Lmax_; //!< Spherical harmonic limit such that l:0,...,Lmax-1 m:0,...,l
int Mmax_; //!< maximum value of m
int N_; //!< Order of the Generalized Lagurerre polynomial
int alpha_; //!< second parameter of the generalized Laguerre polynomial
......
......@@ -116,12 +116,9 @@ protected:
protected:
int L_; //!< Spherical harmonic limit such that l:0,...,L-1 m:0,...,l
int M_; //!< maximum value of m
// int N_; //!< Radial band limit such that n:0,...,N-1
int Nrings_; //!< Number of colatitude rings of the 2D-sphere representation
int Nphi_; //!< Number of phi values (pixels) per colatitude rings
// int alpha_; //!< parameter of the generalized Laguerre Polynomials
int Npix_; //!< Total number of 2D pixels
int Nalm_; //!< Total number of Alm coefficients
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment