Changeset 3510 in Sophya for trunk/SophyaLib/Samba/sphericaltransformserver.cc
- Timestamp:
- Aug 8, 2008, 3:11:45 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/sphericaltransformserver.cc
r3508 r3510 6 6 #include "sphericaltransformserver.h" 7 7 #include "tvector.h" 8 #include "s randgen.h"8 #include "stsrand.h" 9 9 #include "nbmath.h" 10 10 #include "timing.h" … … 152 152 153 153 */ 154 155 //! Default constructor - Creates a non thread-safe RandomGenerator to be used by GenerateFromCl 156 template<class T> 157 SphericalTransformServer<T>::SphericalTransformServer() 158 : rg_(1, false) 159 { 160 fftIntfPtr_=new FFTPackServer(true); // preserveinput = true 161 fftIntfPtr_->setNormalize(false); 162 } 163 164 //! Constructor with the specification of a RandomGenerator object to be used by GenerateFromCl 165 template<class T> 166 SphericalTransformServer<T>::SphericalTransformServer(RandomGenerator const & rg) 167 : rg_(rg) 168 { 169 fftIntfPtr_=new FFTPackServer(true); // preserveinput = true 170 fftIntfPtr_->setNormalize(false); 171 } 172 173 template<class T> 174 SphericalTransformServer<T>::~SphericalTransformServer() 175 { 176 if (fftIntfPtr_!=NULL) delete fftIntfPtr_; 177 } 178 179 /*! 180 Set a fft server. The constructor sets a default fft server (fft-pack). 181 So it is not necessary to call this method for a standard use. 182 \warning The FFTServerInterface object should NOT overwrite the input arrays 183 */ 184 template<class T> 185 void SphericalTransformServer<T>::SetFFTServer(FFTServerInterface* srv) 186 { 187 if (fftIntfPtr_!=NULL) delete fftIntfPtr_; 188 fftIntfPtr_=srv; 189 fftIntfPtr_->setNormalize(false); 190 } 191 154 192 155 193 /*! \fn void SOPHYA::SphericalTransformServer::GenerateFromAlm( SphericalMap<T>& map, int_4 pixelSizeIndex, const Alm<T>& alm) const … … 1275 1313 // Alm<T> a2lme = almFromCl(Cle, fwhm); 1276 1314 // Alm<T> a2lmb = almFromCl(Clb, fwhm); 1277 Alm<T> a2lme(Cle, fwhm );1278 Alm<T> a2lmb(Clb, fwhm );1315 Alm<T> a2lme(Cle, fwhm, rg_); 1316 Alm<T> a2lmb(Clb, fwhm, rg_); 1279 1317 1280 1318 GenerateFromAlm(sphq,sphu,pixelSizeIndex,a2lme,a2lmb); … … 1293 1331 { 1294 1332 1295 Alm<T> alm(Cl, fwhm );1333 Alm<T> alm(Cl, fwhm, rg_); 1296 1334 GenerateFromAlm(sph,pixelSizeIndex, alm ); 1297 1335 }
Note:
See TracChangeset
for help on using the changeset viewer.