Changeset 2990 in Sophya for trunk/SophyaLib/SkyMap/spherehealpix.cc
- Timestamp:
- Jun 23, 2006, 12:35:17 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/spherehealpix.cc
r2987 r2990 340 340 void SphereHEALPix<T>::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 341 341 { 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"); 346 344 347 345 int_4 iring= sliceBeginIndex_(index); … … 388 386 389 387 template<class T> 390 void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const 388 void SphereHEALPix<T>::GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, 389 TVector<int_4>& pixelIndices,TVector<T>& value) const 391 390 392 391 { 393 392 394 393 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"); 399 395 int_4 iring= sliceBeginIndex_(sliceIndex); 400 396 int_4 lring = sliceLenght_(sliceIndex); … … 417 413 PixThetaPhi(ring2nest(nSide_,iring), theta, phi0); 418 414 } 415 } 416 417 //! return a pointer to the specified slice pixel data in RING ordering, NULL in NESTED 418 template<class T> 419 T* 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; 419 427 } 420 428
Note:
See TracChangeset
for help on using the changeset viewer.