Changeset 3572 in Sophya for trunk/SophyaLib/SkyMap/spherehealpix.cc
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/spherehealpix.cc
r2990 r3572 177 177 nPix_ = a.nPix_; 178 178 omeg_ = a.omeg_; 179 int k;180 179 if (fgring_ == a.fgring_) 181 for ( k=0; k< nPix_; k++) pixels_(k) = a.pixels_(k);180 for (int_4 k=0; k< nPix_; k++) pixels_(k) = a.pixels_(k); 182 181 else { 183 if (fgring_) for ( k=0; k< nPix_; k++)182 if (fgring_) for (int_4 k=0; k< nPix_; k++) 184 183 pixels_(k) = a.pixels_(ring2nest(nSide_, k)); 185 else for ( k=0; k< nPix_; k++)184 else for (int_4 k=0; k< nPix_; k++) 186 185 pixels_(k) = a.pixels_(nest2ring(nSide_, k)); 187 186 } 188 for ( k=0; k< a.sliceBeginIndex_.Size(); k++) sliceBeginIndex_(k) = a.sliceBeginIndex_(k);189 for ( k=0; k< a.sliceLenght_.Size(); k++) sliceLenght_(k) = a.sliceLenght_(k);187 for (size_t k=0; k< a.sliceBeginIndex_.Size(); k++) sliceBeginIndex_(k) = a.sliceBeginIndex_(k); 188 for (size_t k=0; k< a.sliceLenght_.Size(); k++) sliceLenght_(k) = a.sliceLenght_(k); 190 189 return(*this); 191 190 } … … 305 304 { 306 305 uint_4 nbslices = uint_4(4*nSide_-1); 307 if (index<0 || index >= nbslices)306 if (index<0 || index >= (int_4)nbslices) 308 307 throw RangeCheckError(" SphereHEALPix::ThetaOfSlice() index out of range"); 309 308 r_8 theta, phi0; … … 322 321 int_4 SphereHEALPix<T>::GetSymThetaSliceIndex(int_4 idx) const 323 322 { 324 if(idx < 0 || idx >= NbThetaSlices())323 if(idx < 0 || idx >= (int_4)NbThetaSlices()) 325 324 throw RangeCheckError("SphereHEALPix::GetSymThetaSliceIndex index out of range"); 326 325 return (NbThetaSlices()-1-idx); … … 340 339 void SphereHEALPix<T>::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 341 340 { 342 if (index<0 || index >= NbThetaSlices())341 if (index<0 || index >= (int_4)NbThetaSlices()) 343 342 throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range"); 344 343 … … 391 390 { 392 391 393 if (sliceIndex<0 || sliceIndex >= NbThetaSlices())392 if (sliceIndex<0 || sliceIndex >= (int_4)NbThetaSlices()) 394 393 throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range"); 395 394 int_4 iring= sliceBeginIndex_(sliceIndex); … … 420 419 421 420 { 422 if (sliceIndex<0 || sliceIndex >= NbThetaSlices())421 if (sliceIndex<0 || sliceIndex >= (int_4)NbThetaSlices()) 423 422 throw RangeCheckError(" SphereHEALPix::GetThetaSliceDataPtr(): index out of range"); 424 423 if (fgring_)
Note:
See TracChangeset
for help on using the changeset viewer.