Changeset 746 in Sophya
- Timestamp:
- Mar 1, 2000, 5:46:20 PM (26 years ago)
- Location:
- trunk/SophyaLib/Samba
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spheregorski.cc
r725 r746 338 338 //++ 339 339 template<class T> 340 void SphereGorski<T>::GetThetaSlice(int_4 index, double& theta,TVector<double>& phi,TVector<T>& value) const340 void SphereGorski<T>::GetThetaSlice(int_4 index, r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 341 341 342 342 // For a theta-slice with index 'index', return : … … 379 379 380 380 template<class T> 381 void SphereGorski<T>::GetThetaSlice(int_4 sliceIndex, double& theta, double& phi0, TVector<int>& pixelIndices,TVector<T>& value) const381 void SphereGorski<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const 382 382 383 383 // For a theta-slice with index 'sliceIndex', return : -
trunk/SophyaLib/Samba/spheregorski.h
r724 r746 98 98 a vector containing the corresponding values of pixels 99 99 */ 100 void GetThetaSlice(int_4 index, double& theta,TVector<double>& phi,TVector<T>& value) const;100 void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const; 101 101 /*! For a theta-slice with index 'index', return : 102 102 … … 111 111 a vector containing the corresponding values of pixels 112 112 */ 113 void GetThetaSlice(int_4 sliceIndex, double& theta, double& phi0, TVector<int>& pixelIndices,TVector<T>& value) const ;113 void GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const ; 114 114 115 115 /* Return true if teta,phi in map */ -
trunk/SophyaLib/Samba/spherethetaphi.cc
r726 r746 537 537 //++ 538 538 template <class T> 539 void SphereThetaPhi<T>::GetThetaSlice(int_4 index, double& theta, TVector<double>& phi, TVector<T>& value) const539 void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const 540 540 541 541 // For a theta-slice with index 'index', return : … … 570 570 //++ 571 571 template <class T> 572 void SphereThetaPhi<T>::GetThetaSlice(int_4 index, double& theta, double& phi0,TVector<int>& pixelIndices, TVector<T>& value) const572 void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const 573 573 574 574 // For a theta-slice with index 'index', return : -
trunk/SophyaLib/Samba/spherethetaphi.h
r726 r746 141 141 a vector containing the corresponding values of pixels 142 142 */ 143 void GetThetaSlice(int_4 index, double& theta,TVector<double>& phi,TVector<T>& value) const;143 void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const; 144 144 145 145 /*! For a theta-slice with index 'index', return : … … 155 155 a vector containing the corresponding values of pixels 156 156 */ 157 void GetThetaSlice(int_4 index, double& theta, double& phi0,TVector<int>& pixelIndices, TVector<T>& value) const ;157 void GetThetaSlice(int_4 index, r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const ; 158 158 159 159 -
trunk/SophyaLib/Samba/sphericalmap.h
r727 r746 36 36 virtual void Resize(int m)=0; 37 37 virtual uint_4 NbThetaSlices() const=0; 38 virtual void GetThetaSlice(int index,double& theta, TVector<double>& phi, TVector<T>& value) const=0;39 virtual void GetThetaSlice(int_4 sliceIndex, double& theta, double& phi0, TVector<int>& pixelIndices,TVector<T>& value) const=0 ;38 virtual void GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const=0; 39 virtual void GetThetaSlice(int_4 sliceIndex, r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const=0 ; 40 40 }; 41 41 #endif -
trunk/SophyaLib/Samba/sphericaltransformserver.cc
r729 r746 63 63 64 64 // pour chaque tranche en theta 65 for (int ith = 0; ith < map.NbThetaSlices();ith++)65 for (int_4 ith = 0; ith < map.NbThetaSlices();ith++) 66 66 { 67 67 int_4 nph; … … 195 195 //sortie.ReSize(nph); 196 196 TVector< complex<T> > sortie(nph); 197 //sortie.SetTemp(true);197 sortie.SetTemp(true); 198 198 199 199 fftIntfPtr_-> FFTBackward(data, sortie); … … 274 274 //sortie.ReSize(nph); 275 275 TVector<T> sortie; 276 //sortie.SetTemp(true);276 sortie.SetTemp(true); 277 277 278 278 fftIntfPtr_-> FFTBackward(data, sortie); … … 295 295 TVector< complex<T> > phase(nmmax+1); 296 296 Alm<T> alm; 297 //alm.SetTemp(true);297 alm.SetTemp(true); 298 298 alm.ReSizeToLmax(nlmax); 299 // cout << " nombre de tranches " << map.NbThetaSlices() << endl; 300 for (int ith = 0; ith < map.NbThetaSlices(); ith++) 299 for (int_4 ith = 0; ith < map.NbThetaSlices(); ith++) 301 300 { 302 301 int_4 nph; … … 320 319 // for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(data(kk),(T)0.); 321 320 322 // phase = CFromFourierAnalysis(n lmax,nmmax,datain,phi0);323 phase = CFromFourierAnalysis(n lmax,nmmax,data,phi0);321 // phase = CFromFourierAnalysis(nmmax,datain,phi0); 322 phase = CFromFourierAnalysis(nmmax,data,phi0); 324 323 325 324 } … … 345 344 } 346 345 template<class T> 347 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 n lmax,int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const346 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const 348 347 { 349 348 /*======================================================================= … … 382 381 //&&&&&&&&& nouvelle version 383 382 template<class T> 384 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 n lmax,int_4 nmmax, const TVector<T> datain, r_8 phi0) const383 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<T> datain, r_8 phi0) const 385 384 { 386 385 //======================================================================= … … 549 548 throw SzMismatchError("SphericalTransformServer::DecomposeToAlm: map Q and map U have not same size "); 550 549 } 551 for (int ith = 0; ith < mapq.NbThetaSlices(); ith++)550 for (int_4 ith = 0; ith < mapq.NbThetaSlices(); ith++) 552 551 { 553 552 int_4 nph; … … 568 567 { 569 568 // almFromPM(nph, nlmax, nmmax, phi0, domega, theta, dataq, datau, alme, almb); 570 almFromWX(n ph, nlmax, nmmax, phi0, domega, theta, dataq, datau, alme, almb);571 } 572 } 573 } 574 575 576 template<class T> 577 void SphericalTransformServer<T>::almFromWX(int_4 n ph, int_4 nlmax, int_4 nmmax,569 almFromWX(nlmax, nmmax, phi0, domega, theta, dataq, datau, alme, almb); 570 } 571 } 572 } 573 574 575 template<class T> 576 void SphericalTransformServer<T>::almFromWX(int_4 nlmax, int_4 nmmax, 578 577 r_8 phi0, r_8 domega, 579 578 r_8 theta, … … 593 592 // for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),0.); 594 593 595 // phaseq = CFromFourierAnalysis(n lmax,nmmax,datain,phi0);596 phaseq = CFromFourierAnalysis(n lmax,nmmax,dataq,phi0);594 // phaseq = CFromFourierAnalysis(nmmax,datain,phi0); 595 phaseq = CFromFourierAnalysis(nmmax,dataq,phi0); 597 596 598 597 // for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(datau(kk),0.); 599 598 600 599 // phaseu= CFromFourierAnalysis(nlmax,nmmax,datain,phi0); 601 phaseu= CFromFourierAnalysis(n lmax,nmmax,datau,phi0);600 phaseu= CFromFourierAnalysis(nmmax,datau,phi0); 602 601 603 602 LambdaWXBuilder lwxb(theta,nlmax,nmmax); … … 644 643 for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),datau(kk)); 645 644 646 phasep = CFromFourierAnalysis(n lmax,nmmax,datain,phi0);645 phasep = CFromFourierAnalysis(nmmax,datain,phi0); 647 646 648 647 for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),-datau(kk)); 649 phasem = CFromFourierAnalysis(n lmax,nmmax,datain,phi0);648 phasem = CFromFourierAnalysis(nmmax,datain,phi0); 650 649 LambdaPMBuilder lpmb(theta,nlmax,nmmax); 651 650 … … 679 678 Bm<complex<T> > b_m_theta_u(nmmax); 680 679 681 for (int ith = 0; ith < mapq.NbThetaSlices();ith++)680 for (int_4 ith = 0; ith < mapq.NbThetaSlices();ith++) 682 681 { 683 682 int_4 nph; … … 748 747 Bm<complex<T> > b_m_theta_p(nmmax); 749 748 Bm<complex<T> > b_m_theta_m(nmmax); 750 for (int ith = 0; ith < mapq.NbThetaSlices();ith++)749 for (int_4 ith = 0; ith < mapq.NbThetaSlices();ith++) 751 750 { 752 751 int_4 nph; … … 834 833 { 835 834 836 // Alm<T> alm;837 // almFromCl(alm, Cl, fwhm);838 //Alm<T> alm = almFromCl(Cl, fwhm);839 835 Alm<T> alm(Cl, fwhm); 840 836 GenerateFromAlm(sph,pixelSizeIndex, alm ); … … 846 842 TVector<T> SphericalTransformServer<T>::DecomposeToCl(const SphericalMap<T>& sph, int_4 nlmax, r_8 cos_theta_cut) const 847 843 { 848 // Alm<T> alm;849 // DecomposeToAlm( sph, alm,nlmax, cos_theta_cut);850 844 Alm<T> alm=DecomposeToAlm( sph, nlmax, cos_theta_cut); 851 845 // power spectrum -
trunk/SophyaLib/Samba/sphericaltransformserver.h
r729 r746 10 10 11 11 12 namespace SOPHYA { 12 13 13 14 // … … 98 99 \f$\sum_{k=0}^{nphi}datain(\theta,\varphi_k)e^{im\varphi_k}\f$ for (mmax+1) values of \f$m\f$ from 0 to mmax. 99 100 */ 100 TVector< complex<T> > CFromFourierAnalysis(int_4 nlmax,int_4mmax,101 TVector< complex<T> > CFromFourierAnalysis(int_4 mmax, 101 102 const TVector<complex<T> > datain, 102 103 r_8 phi0) const; 103 104 /* same as previous one, but with a "datain" which is real (not complex) */ 104 TVector< complex<T> > CFromFourierAnalysis(int_4 nlmax,int_4mmax,105 TVector< complex<T> > CFromFourierAnalysis(int_4 mmax, 105 106 const TVector<T> datain, 106 107 r_8 phi0) const; … … 122 123 123 124 */ 124 void almFromWX(int_4 n ph, int_4 nlmax, int_4 nmmax, r_8 phi0,125 void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0, 125 126 r_8 domega, r_8 theta, 126 127 const TVector<T>& dataq, const TVector<T>& datau, … … 200 201 FFTServerInterface* fftIntfPtr_; 201 202 }; 203 } // Fin du namespace 202 204 203 205
Note:
See TracChangeset
for help on using the changeset viewer.