[729] | 1 | #ifndef SPHERICALTRANFORMSERVER_SEEN
|
---|
| 2 | #define SPHERICALTRANFORMSERVER_SEEN
|
---|
| 3 |
|
---|
| 4 | #include "sphericalmap.h"
|
---|
| 5 | #include "fftservintf.h"
|
---|
| 6 | #include "fftpserver.h"
|
---|
| 7 | #include "alm.h"
|
---|
| 8 | #include "lambdaBuilder.h"
|
---|
| 9 |
|
---|
| 10 |
|
---|
[746] | 11 | namespace SOPHYA {
|
---|
[729] | 12 |
|
---|
[866] | 13 |
|
---|
[729] | 14 | template <class T>
|
---|
| 15 | class SphericalTransformServer
|
---|
| 16 | {
|
---|
| 17 |
|
---|
| 18 | public:
|
---|
| 19 |
|
---|
[1218] | 20 | SphericalTransformServer()
|
---|
| 21 | {
|
---|
| 22 | fftIntfPtr_=new FFTPackServer;
|
---|
| 23 | fftIntfPtr_->setNormalize(false);
|
---|
| 24 | };
|
---|
| 25 | ~SphericalTransformServer(){ if (fftIntfPtr_!=NULL) delete fftIntfPtr_;};
|
---|
| 26 |
|
---|
| 27 | /*!
|
---|
[729] | 28 | 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.
|
---|
| 29 | */
|
---|
[1218] | 30 | void SetFFTServer(FFTServerInterface* srv=NULL)
|
---|
| 31 | {
|
---|
| 32 | if (fftIntfPtr_!=NULL) delete fftIntfPtr_;
|
---|
| 33 | fftIntfPtr_=srv;
|
---|
| 34 | fftIntfPtr_->setNormalize(false);
|
---|
| 35 | }
|
---|
[729] | 36 |
|
---|
[1218] | 37 | void GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const;
|
---|
| 38 | void GenerateFromAlm(SphericalMap<T>& mapq, SphericalMap<T>& mapu, int_4 pixelSizeIndex, const Alm<T>& alme, const Alm<T>& almb) const;
|
---|
| 39 |
|
---|
| 40 | void GenerateFromCl(SphericalMap<T>& sph, int_4 pixelSizeIndex,
|
---|
[729] | 41 | const TVector<T>& Cl, const r_8 fwhm) const;
|
---|
[1218] | 42 | void GenerateFromCl(SphericalMap<T>& sphq, SphericalMap<T>& sphu,
|
---|
[729] | 43 | int_4 pixelSizeIndex,
|
---|
| 44 | const TVector<T>& Cle, const TVector<T>& Clb,
|
---|
| 45 | const r_8 fwhm) const;
|
---|
| 46 |
|
---|
| 47 |
|
---|
[1218] | 48 | Alm<T> DecomposeToAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut) const;
|
---|
[729] | 49 |
|
---|
[1218] | 50 | void DecomposeToAlm(const SphericalMap<T>& mapq, const SphericalMap<T>& mapu,
|
---|
[729] | 51 | Alm<T>& a2lme, Alm<T>& a2lmb,
|
---|
| 52 | int_4 nlmax, r_8 cos_theta_cut) const;
|
---|
| 53 |
|
---|
[1218] | 54 | TVector<T> DecomposeToCl(const SphericalMap<T>& sph,
|
---|
[729] | 55 | int_4 nlmax, r_8 cos_theta_cut) const;
|
---|
| 56 |
|
---|
| 57 |
|
---|
[1218] | 58 | private:
|
---|
| 59 | TVector< complex<T> > fourierSynthesisFromB(const Bm<complex<T> >& b_m,
|
---|
[729] | 60 | int_4 nph, r_8 phi0) const;
|
---|
[1218] | 61 | TVector<T> RfourierSynthesisFromB(const Bm<complex<T> >& b_m,
|
---|
[729] | 62 | int_4 nph, r_8 phi0) const;
|
---|
| 63 |
|
---|
[1218] | 64 | TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
|
---|
[729] | 65 | const TVector<complex<T> > datain,
|
---|
| 66 | r_8 phi0) const;
|
---|
[1218] | 67 | TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
|
---|
[729] | 68 | const TVector<T> datain,
|
---|
| 69 | r_8 phi0) const;
|
---|
| 70 |
|
---|
[1218] | 71 | void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
|
---|
[729] | 72 | r_8 domega, r_8 theta,
|
---|
| 73 | const TVector<T>& dataq, const TVector<T>& datau,
|
---|
| 74 | Alm<T>& alme, Alm<T>& almb) const;
|
---|
[1218] | 75 | void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
|
---|
[729] | 76 | r_8 phi0, r_8 domega, r_8 theta,
|
---|
| 77 | const TVector<T>& dataq, const TVector<T>& datau,
|
---|
| 78 | Alm<T>& alme, Alm<T>& almb) const;
|
---|
| 79 |
|
---|
[1218] | 80 | void mapFromWX(int_4 nlmax, int_4 nmmax,
|
---|
[729] | 81 | SphericalMap<T>& mapq, SphericalMap<T>& mapu,
|
---|
| 82 | const Alm<T>& alme, const Alm<T>& almb) const;
|
---|
| 83 |
|
---|
| 84 |
|
---|
[1218] | 85 | void mapFromPM(int_4 nlmax, int_4 nmmax,
|
---|
[729] | 86 | SphericalMap<T>& mapq, SphericalMap<T>& mapu,
|
---|
| 87 | const Alm<T>& alme, const Alm<T>& almb) const;
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 |
|
---|
| 91 | FFTServerInterface* fftIntfPtr_;
|
---|
| 92 | };
|
---|
[746] | 93 | } // Fin du namespace
|
---|
[729] | 94 |
|
---|
| 95 |
|
---|
| 96 | #endif
|
---|