#ifndef SPHERICALTRANFORMSERVER_SEEN #define SPHERICALTRANFORMSERVER_SEEN #include "sphericalmap.h" #include "fftservintf.h" #include "fftpserver.h" #include "alm.h" #include "lambdaBuilder.h" namespace SOPHYA { template class SphericalTransformServer { public: SphericalTransformServer() { fftIntfPtr_=new FFTPackServer; fftIntfPtr_->setNormalize(false); }; ~SphericalTransformServer(){ if (fftIntfPtr_!=NULL) delete fftIntfPtr_;}; /*! Set a fft server. The constructor sets a default fft server (fft-pack). So it is not necessary to call this method for a standard use. */ void SetFFTServer(FFTServerInterface* srv=NULL) { if (fftIntfPtr_!=NULL) delete fftIntfPtr_; fftIntfPtr_=srv; fftIntfPtr_->setNormalize(false); } void GenerateFromAlm( SphericalMap& map, int_4 pixelSizeIndex, const Alm& alm) const; void GenerateFromAlm(SphericalMap& mapq, SphericalMap& mapu, int_4 pixelSizeIndex, const Alm& alme, const Alm& almb) const; void GenerateFromCl(SphericalMap& sph, int_4 pixelSizeIndex, const TVector& Cl, const r_8 fwhm) const; void GenerateFromCl(SphericalMap& sphq, SphericalMap& sphu, int_4 pixelSizeIndex, const TVector& Cle, const TVector& Clb, const r_8 fwhm) const; void DecomposeToAlm(SphericalMap& map, Alm& alm, int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const; void DecomposeToAlm(const SphericalMap& map, Alm& alm, int_4 nlmax, r_8 cos_theta_cut) const; void DecomposeToAlm(SphericalMap& mapq, SphericalMap& mapu, Alm& alme, Alm& almb, int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const; void DecomposeToAlm(const SphericalMap& mapq, const SphericalMap& mapu, Alm& alme, Alm& almb, int_4 nlmax, r_8 cos_theta_cut) const; TVector DecomposeToCl(SphericalMap& sph, int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const; TVector DecomposeToCl(const SphericalMap& sph, int_4 nlmax, r_8 cos_theta_cut) const; private: void carteVersAlm(const SphericalMap& map, int_4 nlmax, r_8 cos_theta_cut, Alm& alm) const; void carteVersAlm(const SphericalMap& mapq, const SphericalMap& mapu, Alm& alme, Alm& almb, int_4 nlmax, r_8 cos_theta_cut) const; TVector< complex > fourierSynthesisFromB(const Bm >& b_m, int_4 nph, r_8 phi0) const; TVector RfourierSynthesisFromB(const Bm >& b_m, int_4 nph, r_8 phi0) const; TVector< complex > CFromFourierAnalysis(int_4 mmax, const TVector > datain, r_8 phi0) const; // TVector< complex > CFromFourierAnalysis(int_4 mmax, // const TVector datain, // r_8 phi0) const; void CFromFourierAnalysis(int_4 mmax, const TVector datain, TVector< complex >& dataout, r_8 phi0) const; void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0, r_8 domega, r_8 theta, const TVector& dataq, const TVector& datau, Alm& alme, Alm& almb) const; void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax, r_8 phi0, r_8 domega, r_8 theta, const TVector& dataq, const TVector& datau, Alm& alme, Alm& almb) const; void mapFromWX(int_4 nlmax, int_4 nmmax, SphericalMap& mapq, SphericalMap& mapu, const Alm& alme, const Alm& almb, bool healpix) const; void mapFromPM(int_4 nlmax, int_4 nmmax, SphericalMap& mapq, SphericalMap& mapu, const Alm& alme, const Alm& almb) const; FFTServerInterface* fftIntfPtr_; }; } // Fin du namespace #endif