Ignore:
Timestamp:
Jun 23, 2006, 12:35:17 PM (19 years ago)
Author:
ansari
Message:

Ajouts methode GetThetaSliceDataPtr() dans SphericalMap, SphereThetaPhi SphereHEALPix SphereECP pour optimisation calcul transforme Ylm + passage TypeOfMap TETAFI->ECP pour SphereECP , Reza 23/6/2006

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/spherehealpix.cc

    r2987 r2990  
    340340void SphereHEALPix<T>::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const
    341341{
    342   if (index<0 || index >= NbThetaSlices())  {
    343       cout << " SphereHEALPix::GetThetaSlice : Pixel index out of range" <<endl;
    344       throw RangeCheckError(" SphereHEALPix::GetThetaSlice()  index out of range");
    345   }
     342  if (index<0 || index >= NbThetaSlices())
     343    throw RangeCheckError(" SphereHEALPix::GetThetaSlice()  index out of range");
    346344
    347345  int_4 iring= sliceBeginIndex_(index);
     
    388386
    389387template<class T>
    390 void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const
     388void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0,
     389                                     TVector<int_4>& pixelIndices,TVector<T>& value) const
    391390
    392391{
    393392
    394393  if (sliceIndex<0 || sliceIndex >= NbThetaSlices())
    395     {
    396       cout << " SphereHEALPix::GetThetaSlice : Pixel index out of range" <<endl;
    397       throw RangeCheckError(" SphereHEALPix::GetThetaSlice : Pixel index out of range");
    398     }
     394    throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range");
    399395  int_4 iring= sliceBeginIndex_(sliceIndex);
    400396  int_4 lring  =  sliceLenght_(sliceIndex);
     
    417413    PixThetaPhi(ring2nest(nSide_,iring), theta, phi0);   
    418414  }
     415}
     416
     417//! return a pointer to the specified slice pixel data in RING ordering, NULL in NESTED
     418template<class T>
     419T* SphereHEALPix<T>::GetThetaSliceDataPtr(int_4 sliceIndex)
     420
     421{
     422  if (sliceIndex<0 || sliceIndex >= NbThetaSlices())
     423    throw RangeCheckError(" SphereHEALPix::GetThetaSliceDataPtr(): index out of range");
     424  if (fgring_)
     425    return pixels_.Begin()+sliceBeginIndex_(sliceIndex);
     426  else return NULL;
    419427}
    420428
Note: See TracChangeset for help on using the changeset viewer.