[729] | 1 | #ifndef SPHERICALTRANFORMSERVER_SEEN
|
---|
| 2 | #define SPHERICALTRANFORMSERVER_SEEN
|
---|
| 3 |
|
---|
| 4 | #include "sphericalmap.h"
|
---|
| 5 | #include "fftservintf.h"
|
---|
| 6 | #include "fftpserver.h"
|
---|
[3613] | 7 | #include "randinterf.h"
|
---|
[729] | 8 | #include "alm.h"
|
---|
| 9 | #include "lambdaBuilder.h"
|
---|
| 10 |
|
---|
| 11 |
|
---|
[746] | 12 | namespace SOPHYA {
|
---|
[729] | 13 |
|
---|
[866] | 14 |
|
---|
[729] | 15 | template <class T>
|
---|
| 16 | class SphericalTransformServer
|
---|
| 17 | {
|
---|
| 18 |
|
---|
| 19 | public:
|
---|
| 20 |
|
---|
[3613] | 21 | explicit SphericalTransformServer();
|
---|
| 22 | explicit SphericalTransformServer(RandomGeneratorInterface& rg);
|
---|
[3510] | 23 | virtual ~SphericalTransformServer();
|
---|
| 24 | void SetFFTServer(FFTServerInterface* srv=NULL);
|
---|
[1218] | 25 |
|
---|
[729] | 26 |
|
---|
[1218] | 27 | void GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const;
|
---|
| 28 | void GenerateFromAlm(SphericalMap<T>& mapq, SphericalMap<T>& mapu, int_4 pixelSizeIndex, const Alm<T>& alme, const Alm<T>& almb) const;
|
---|
| 29 |
|
---|
| 30 | void GenerateFromCl(SphericalMap<T>& sph, int_4 pixelSizeIndex,
|
---|
[729] | 31 | const TVector<T>& Cl, const r_8 fwhm) const;
|
---|
[1218] | 32 | void GenerateFromCl(SphericalMap<T>& sphq, SphericalMap<T>& sphu,
|
---|
[729] | 33 | int_4 pixelSizeIndex,
|
---|
| 34 | const TVector<T>& Cle, const TVector<T>& Clb,
|
---|
[3510] | 35 | const r_8 fwhm) const;
|
---|
[729] | 36 |
|
---|
| 37 |
|
---|
[1756] | 38 | void DecomposeToAlm(SphericalMap<T>& map, Alm<T>& alm, int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const;
|
---|
| 39 | void DecomposeToAlm(const SphericalMap<T>& map, Alm<T>& alm, int_4 nlmax, r_8 cos_theta_cut) const;
|
---|
[729] | 40 |
|
---|
[1683] | 41 | void DecomposeToAlm(SphericalMap<T>& mapq,
|
---|
| 42 | SphericalMap<T>& mapu,
|
---|
| 43 | Alm<T>& alme,
|
---|
| 44 | Alm<T>& almb,
|
---|
| 45 | int_4 nlmax,
|
---|
| 46 | r_8 cos_theta_cut,
|
---|
[1756] | 47 | int iterationOrder) const;
|
---|
| 48 | void DecomposeToAlm(const SphericalMap<T>& mapq,
|
---|
| 49 | const SphericalMap<T>& mapu,
|
---|
| 50 | Alm<T>& alme,
|
---|
| 51 | Alm<T>& almb,
|
---|
| 52 | int_4 nlmax,
|
---|
| 53 | r_8 cos_theta_cut) const;
|
---|
[729] | 54 |
|
---|
[1683] | 55 | TVector<T> DecomposeToCl(SphericalMap<T>& sph,
|
---|
[1756] | 56 | int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const;
|
---|
[729] | 57 |
|
---|
[1756] | 58 | TVector<T> DecomposeToCl(const SphericalMap<T>& sph,
|
---|
| 59 | int_4 nlmax, r_8 cos_theta_cut) const;
|
---|
[729] | 60 |
|
---|
[1756] | 61 |
|
---|
[1218] | 62 | private:
|
---|
[1683] | 63 |
|
---|
| 64 | void carteVersAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut, Alm<T>& alm) const;
|
---|
| 65 |
|
---|
| 66 | void carteVersAlm(const SphericalMap<T>& mapq,
|
---|
| 67 | const SphericalMap<T>& mapu,
|
---|
| 68 | Alm<T>& alme,
|
---|
| 69 | Alm<T>& almb,
|
---|
| 70 | int_4 nlmax,
|
---|
| 71 | r_8 cos_theta_cut) const;
|
---|
| 72 |
|
---|
| 73 |
|
---|
| 74 | TVector< complex<T> > fourierSynthesisFromB(const Bm<complex<T> >& b_m,
|
---|
[729] | 75 | int_4 nph, r_8 phi0) const;
|
---|
[1683] | 76 | TVector<T> RfourierSynthesisFromB(const Bm<complex<T> >& b_m,
|
---|
[729] | 77 | int_4 nph, r_8 phi0) const;
|
---|
[1683] | 78 | TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
|
---|
[729] | 79 | const TVector<complex<T> > datain,
|
---|
| 80 | r_8 phi0) const;
|
---|
[1683] | 81 | // TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
|
---|
| 82 | // const TVector<T> datain,
|
---|
| 83 | // r_8 phi0) const;
|
---|
| 84 | void CFromFourierAnalysis(int_4 mmax, const TVector<T> datain,
|
---|
| 85 | TVector< complex<T> >& dataout,
|
---|
| 86 | r_8 phi0) const;
|
---|
[729] | 87 |
|
---|
[1218] | 88 | void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
|
---|
[729] | 89 | r_8 domega, r_8 theta,
|
---|
| 90 | const TVector<T>& dataq, const TVector<T>& datau,
|
---|
| 91 | Alm<T>& alme, Alm<T>& almb) const;
|
---|
[1218] | 92 | void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
|
---|
[729] | 93 | r_8 phi0, r_8 domega, r_8 theta,
|
---|
| 94 | const TVector<T>& dataq, const TVector<T>& datau,
|
---|
| 95 | Alm<T>& alme, Alm<T>& almb) const;
|
---|
| 96 |
|
---|
[1218] | 97 | void mapFromWX(int_4 nlmax, int_4 nmmax,
|
---|
[729] | 98 | SphericalMap<T>& mapq, SphericalMap<T>& mapu,
|
---|
[2313] | 99 | const Alm<T>& alme, const Alm<T>& almb, bool healpix) const;
|
---|
[729] | 100 |
|
---|
| 101 |
|
---|
[1218] | 102 | void mapFromPM(int_4 nlmax, int_4 nmmax,
|
---|
[729] | 103 | SphericalMap<T>& mapq, SphericalMap<T>& mapu,
|
---|
| 104 | const Alm<T>& alme, const Alm<T>& almb) const;
|
---|
| 105 |
|
---|
| 106 |
|
---|
| 107 |
|
---|
| 108 | FFTServerInterface* fftIntfPtr_;
|
---|
[3613] | 109 | mutable RandomGeneratorInterface* rgp_;
|
---|
[1683] | 110 |
|
---|
[729] | 111 | };
|
---|
[746] | 112 | } // Fin du namespace
|
---|
[729] | 113 |
|
---|
| 114 |
|
---|
| 115 | #endif
|
---|