source: Sophya/trunk/SophyaLib/Samba/sphericaltransformserver.h@ 3415

Last change on this file since 3415 was 3003, checked in by ansari, 19 years ago

Adaptation SphericalTransformServer a uppression const des arguments FFTForward/Backward cmv+Reza 03/07/2006

File size: 3.8 KB
RevLine 
[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]11namespace SOPHYA {
[729]12
[866]13
[729]14template <class T>
15class SphericalTransformServer
16{
17
18 public:
19
[1218]20 SphericalTransformServer()
21 {
[3003]22 fftIntfPtr_=new FFTPackServer(true); // preserveinput = true
[1218]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.
[3003]29 \warning The FFTServerInterface object should NOT overwrite the input arrays
[729]30*/
[1218]31 void SetFFTServer(FFTServerInterface* srv=NULL)
32 {
33 if (fftIntfPtr_!=NULL) delete fftIntfPtr_;
34 fftIntfPtr_=srv;
35 fftIntfPtr_->setNormalize(false);
36 }
[729]37
[1218]38 void GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const;
39 void GenerateFromAlm(SphericalMap<T>& mapq, SphericalMap<T>& mapu, int_4 pixelSizeIndex, const Alm<T>& alme, const Alm<T>& almb) const;
40
41 void GenerateFromCl(SphericalMap<T>& sph, int_4 pixelSizeIndex,
[729]42 const TVector<T>& Cl, const r_8 fwhm) const;
[1218]43 void GenerateFromCl(SphericalMap<T>& sphq, SphericalMap<T>& sphu,
[729]44 int_4 pixelSizeIndex,
45 const TVector<T>& Cle, const TVector<T>& Clb,
46 const r_8 fwhm) const;
47
48
[1756]49void DecomposeToAlm(SphericalMap<T>& map, Alm<T>& alm, int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const;
50void DecomposeToAlm(const SphericalMap<T>& map, Alm<T>& alm, int_4 nlmax, r_8 cos_theta_cut) const;
[729]51
[1683]52void DecomposeToAlm(SphericalMap<T>& mapq,
53 SphericalMap<T>& mapu,
54 Alm<T>& alme,
55 Alm<T>& almb,
56 int_4 nlmax,
57 r_8 cos_theta_cut,
[1756]58 int iterationOrder) const;
59void DecomposeToAlm(const SphericalMap<T>& mapq,
60 const SphericalMap<T>& mapu,
61 Alm<T>& alme,
62 Alm<T>& almb,
63 int_4 nlmax,
64 r_8 cos_theta_cut) const;
[729]65
[1683]66TVector<T> DecomposeToCl(SphericalMap<T>& sph,
[1756]67 int_4 nlmax, r_8 cos_theta_cut, int iterationOrder) const;
[729]68
[1756]69TVector<T> DecomposeToCl(const SphericalMap<T>& sph,
70 int_4 nlmax, r_8 cos_theta_cut) const;
[729]71
[1756]72
[1218]73 private:
[1683]74
75void carteVersAlm(const SphericalMap<T>& map, int_4 nlmax, r_8 cos_theta_cut, Alm<T>& alm) const;
76
77void carteVersAlm(const SphericalMap<T>& mapq,
78 const SphericalMap<T>& mapu,
79 Alm<T>& alme,
80 Alm<T>& almb,
81 int_4 nlmax,
82 r_8 cos_theta_cut) const;
83
84
85TVector< complex<T> > fourierSynthesisFromB(const Bm<complex<T> >& b_m,
[729]86 int_4 nph, r_8 phi0) const;
[1683]87TVector<T> RfourierSynthesisFromB(const Bm<complex<T> >& b_m,
[729]88 int_4 nph, r_8 phi0) const;
[1683]89TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
[729]90 const TVector<complex<T> > datain,
91 r_8 phi0) const;
[1683]92 // TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
93 // const TVector<T> datain,
94 // r_8 phi0) const;
95 void CFromFourierAnalysis(int_4 mmax, const TVector<T> datain,
96 TVector< complex<T> >& dataout,
97 r_8 phi0) const;
[729]98
[1218]99 void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
[729]100 r_8 domega, r_8 theta,
101 const TVector<T>& dataq, const TVector<T>& datau,
102 Alm<T>& alme, Alm<T>& almb) const;
[1218]103 void almFromPM(int_4 nph, int_4 nlmax, int_4 nmmax,
[729]104 r_8 phi0, r_8 domega, r_8 theta,
105 const TVector<T>& dataq, const TVector<T>& datau,
106 Alm<T>& alme, Alm<T>& almb) const;
107
[1218]108 void mapFromWX(int_4 nlmax, int_4 nmmax,
[729]109 SphericalMap<T>& mapq, SphericalMap<T>& mapu,
[2313]110 const Alm<T>& alme, const Alm<T>& almb, bool healpix) const;
[729]111
112
[1218]113 void mapFromPM(int_4 nlmax, int_4 nmmax,
[729]114 SphericalMap<T>& mapq, SphericalMap<T>& mapu,
115 const Alm<T>& alme, const Alm<T>& almb) const;
116
117
118
119 FFTServerInterface* fftIntfPtr_;
[1683]120
[729]121};
[746]122} // Fin du namespace
[729]123
124
125#endif
Note: See TracBrowser for help on using the repository browser.