Changeset 746 in Sophya for trunk/SophyaLib/Samba


Ignore:
Timestamp:
Mar 1, 2000, 5:46:20 PM (26 years ago)
Author:
ansari
Message:

ajustement de type double r_8 etc.

Location:
trunk/SophyaLib/Samba
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/spheregorski.cc

    r725 r746  
    338338//++
    339339template<class T>
    340 void SphereGorski<T>::GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const
     340void SphereGorski<T>::GetThetaSlice(int_4 index, r_8& theta,TVector<r_8>& phi,TVector<T>& value) const
    341341
    342342//    For a theta-slice with index 'index', return :
     
    379379
    380380template<class T>
    381 void SphereGorski<T>::GetThetaSlice(int_4 sliceIndex,double& theta, double& phi0, TVector<int>& pixelIndices,TVector<T>& value) const
     381void SphereGorski<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const
    382382
    383383//    For a theta-slice with index 'sliceIndex', return :
  • trunk/SophyaLib/Samba/spheregorski.h

    r724 r746  
    9898    a vector containing the corresponding values of pixels
    9999*/
    100 void GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const;
     100void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const;
    101101/*!   For a theta-slice with index 'index', return :
    102102
     
    111111    a vector containing the corresponding values of pixels
    112112*/
    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 ;
    114114
    115115/* Return true if teta,phi in map  */
  • trunk/SophyaLib/Samba/spherethetaphi.cc

    r726 r746  
    537537//++
    538538template <class T>
    539 void SphereThetaPhi<T>::GetThetaSlice(int_4 index,double& theta, TVector<double>& phi, TVector<T>& value) const
     539void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const
    540540
    541541//    For a theta-slice with index 'index', return :
     
    570570//++
    571571template <class T>
    572 void SphereThetaPhi<T>::GetThetaSlice(int_4 index,double& theta, double& phi0,TVector<int>& pixelIndices, TVector<T>& value) const
     572void SphereThetaPhi<T>::GetThetaSlice(int_4 index,r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const
    573573
    574574//    For a theta-slice with index 'index', return :
  • trunk/SophyaLib/Samba/spherethetaphi.h

    r726 r746  
    141141    a vector containing the corresponding values of pixels
    142142*/
    143 void GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const;
     143void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const;
    144144
    145145/*!   For a theta-slice with index 'index', return :
     
    155155    a vector containing the corresponding values of pixels
    156156*/
    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 ;
    158158
    159159
  • trunk/SophyaLib/Samba/sphericalmap.h

    r727 r746  
    3636virtual void Resize(int m)=0;
    3737virtual 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 ;
     38virtual void GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const=0;
     39virtual void GetThetaSlice(int_4 sliceIndex, r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const=0 ;
    4040};
    4141#endif
  • trunk/SophyaLib/Samba/sphericaltransformserver.cc

    r729 r746  
    6363
    6464  // pour chaque tranche en theta
    65   for (int ith = 0; ith < map.NbThetaSlices();ith++)
     65  for (int_4 ith = 0; ith < map.NbThetaSlices();ith++)
    6666    {
    6767      int_4 nph;
     
    195195  //sortie.ReSize(nph);
    196196  TVector< complex<T> > sortie(nph);
    197   //  sortie.SetTemp(true);
     197  sortie.SetTemp(true);
    198198
    199199  fftIntfPtr_-> FFTBackward(data, sortie);
     
    274274  //sortie.ReSize(nph);
    275275  TVector<T> sortie;
    276   //  sortie.SetTemp(true);
     276  sortie.SetTemp(true);
    277277
    278278  fftIntfPtr_-> FFTBackward(data, sortie);
     
    295295  TVector< complex<T> > phase(nmmax+1);
    296296  Alm<T> alm;
    297   //  alm.SetTemp(true);
     297  alm.SetTemp(true);
    298298  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++)
    301300    {
    302301      int_4 nph;
     
    320319          // for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(data(kk),(T)0.);
    321320
    322           //  phase = CFromFourierAnalysis(nlmax,nmmax,datain,phi0);
    323           phase = CFromFourierAnalysis(nlmax,nmmax,data,phi0);
     321          //  phase = CFromFourierAnalysis(nmmax,datain,phi0);
     322          phase = CFromFourierAnalysis(nmmax,data,phi0);
    324323
    325324        }
     
    345344}
    346345template<class T>
    347 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nlmax,int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const
     346TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<complex<T> >datain, r_8 phi0) const
    348347{
    349348  /*=======================================================================
     
    382381//&&&&&&&&& nouvelle version
    383382template<class T>
    384 TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nlmax,int_4 nmmax, const TVector<T> datain, r_8 phi0) const
     383TVector< complex<T> > SphericalTransformServer<T>::CFromFourierAnalysis(int_4 nmmax, const TVector<T> datain, r_8 phi0) const
    385384{
    386385  //=======================================================================
     
    549548      throw SzMismatchError("SphericalTransformServer::DecomposeToAlm: map Q and map U have not same size ");
    550549    }
    551   for (int ith = 0; ith < mapq.NbThetaSlices(); ith++)
     550  for (int_4 ith = 0; ith < mapq.NbThetaSlices(); ith++)
    552551    {
    553552      int_4 nph;
     
    568567        {
    569568          //  almFromPM(nph, nlmax, nmmax, phi0, domega, theta, dataq, datau, alme, almb);
    570           almFromWX(nph, 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 nph, int_4 nlmax, int_4 nmmax,
     569          almFromWX(nlmax, nmmax, phi0, domega, theta, dataq, datau, alme, almb);
     570        }
     571    }
     572}
     573
     574
     575template<class T>
     576void SphericalTransformServer<T>::almFromWX(int_4 nlmax, int_4 nmmax,
    578577                                         r_8 phi0, r_8 domega,
    579578                                         r_8 theta,
     
    593592  //  for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),0.);
    594593
    595   // phaseq = CFromFourierAnalysis(nlmax,nmmax,datain,phi0);
    596   phaseq = CFromFourierAnalysis(nlmax,nmmax,dataq,phi0);
     594  // phaseq = CFromFourierAnalysis(nmmax,datain,phi0);
     595  phaseq = CFromFourierAnalysis(nmmax,dataq,phi0);
    597596
    598597  // for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(datau(kk),0.);
    599598
    600599  // phaseu=  CFromFourierAnalysis(nlmax,nmmax,datain,phi0);
    601   phaseu=  CFromFourierAnalysis(nlmax,nmmax,datau,phi0);
     600  phaseu=  CFromFourierAnalysis(nmmax,datau,phi0);
    602601
    603602  LambdaWXBuilder lwxb(theta,nlmax,nmmax);
     
    644643  for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),datau(kk));
    645644
    646   phasep = CFromFourierAnalysis(nlmax,nmmax,datain,phi0);
     645  phasep = CFromFourierAnalysis(nmmax,datain,phi0);
    647646
    648647  for(int kk=0; kk<nph; kk++) datain(kk)=complex<T>(dataq(kk),-datau(kk));
    649   phasem = CFromFourierAnalysis(nlmax,nmmax,datain,phi0);
     648  phasem = CFromFourierAnalysis(nmmax,datain,phi0);
    650649  LambdaPMBuilder lpmb(theta,nlmax,nmmax);
    651650         
     
    679678  Bm<complex<T> > b_m_theta_u(nmmax);
    680679
    681   for (int ith = 0; ith < mapq.NbThetaSlices();ith++)
     680  for (int_4 ith = 0; ith < mapq.NbThetaSlices();ith++)
    682681    {
    683682      int_4 nph;
     
    748747  Bm<complex<T> > b_m_theta_p(nmmax);
    749748  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++)
    751750    {
    752751      int_4 nph;
     
    834833{
    835834
    836   //  Alm<T> alm;
    837   //  almFromCl(alm, Cl, fwhm);
    838   //Alm<T> alm = almFromCl(Cl, fwhm);
    839835  Alm<T> alm(Cl, fwhm);
    840836  GenerateFromAlm(sph,pixelSizeIndex, alm );
     
    846842TVector<T>  SphericalTransformServer<T>::DecomposeToCl(const SphericalMap<T>& sph, int_4 nlmax, r_8 cos_theta_cut) const
    847843{
    848   //  Alm<T> alm;
    849   //  DecomposeToAlm( sph, alm,nlmax, cos_theta_cut);
    850844    Alm<T> alm=DecomposeToAlm( sph, nlmax, cos_theta_cut);
    851845  // power spectrum
  • trunk/SophyaLib/Samba/sphericaltransformserver.h

    r729 r746  
    1010
    1111
     12namespace SOPHYA {
    1213
    1314//
     
    9899\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.
    99100   */
    100  TVector< complex<T> > CFromFourierAnalysis(int_4 nlmax,int_4 mmax,
     101 TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
    101102                                  const TVector<complex<T> > datain,
    102103                                  r_8 phi0) const;
    103104/* same as previous one, but with a "datain" which is real (not complex) */
    104  TVector< complex<T> > CFromFourierAnalysis(int_4 nlmax,int_4 mmax,
     105 TVector< complex<T> > CFromFourierAnalysis(int_4 mmax,
    105106                         const TVector<T> datain, 
    106107                                  r_8 phi0) const;
     
    122123
    123124  */
    124 void almFromWX(int_4 nph, int_4 nlmax, int_4 nmmax, r_8 phi0,
     125void almFromWX(int_4 nlmax, int_4 nmmax, r_8 phi0,
    125126               r_8 domega, r_8 theta,
    126127               const TVector<T>& dataq, const TVector<T>& datau,
     
    200201 FFTServerInterface* fftIntfPtr_;
    201202};
     203} // Fin du namespace
    202204
    203205
Note: See TracChangeset for help on using the changeset viewer.