Changeset 3572 in Sophya for trunk/SophyaLib/SkyMap
- Timestamp:
- Feb 7, 2009, 10:50:34 PM (17 years ago)
- Location:
- trunk/SophyaLib/SkyMap
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/fiolocalmap.cc
r2869 r3572 167 167 int_4 nSzX= dobj->Size_x(); 168 168 int_4 nSzY= dobj->Size_y(); 169 int_4 nPix= dobj->NbPixels();170 169 171 170 if(dobj->ptrInfo()) … … 183 182 os.PutI4(nSzX); 184 183 os.PutI4(nSzY); 185 // os.PutI4(nPix);186 184 187 185 if(dobj->LocalMap_isDone()) -
trunk/SophyaLib/SkyMap/localmap.cc
r3300 r3572 256 256 throw(SzMismatchError("LocalMap<T>::CopyElt(const LocalMap<T>&) SizeMismatch")) ; 257 257 recopierVariablesSimples(a); 258 int k;259 258 pixels_ = a.pixels_; 260 259 return(*this); … … 349 348 double csTheta = cos(theta); 350 349 double snTheta = sin(theta); 351 double csPhi = cos(phi);352 double snPhi = sin(phi);353 350 double csPhiMPhiC = cos (phi - phiC_); 354 351 double snPhiMPhiC = sin (phi - phiC_); … … 585 582 double sin_phi_axeZ; 586 583 587 double cth,sth, cdeltaPhi, phi , cphi, sphi;584 double cth,sth, cdeltaPhi, phi; 588 585 589 586 if ( snthC_ <= 0.) // carte centree au pole -
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_) -
trunk/SophyaLib/SkyMap/spherepos.cc
r2973 r3572 11 11 #include <typeinfo> 12 12 13 static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.cc,v 1.4 2006-06-20 16:01:48 ansari Exp $";14 13 15 14 -
trunk/SophyaLib/SkyMap/spherepos.h
r2973 r3572 9 9 #include "anydataobj.h" 10 10 11 static char *head_spherepos_h_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.h,v 1.2 2006-06-20 16:01:48 ansari Exp $";12 11 13 12 namespace SOPHYA { -
trunk/SophyaLib/SkyMap/spherethetaphi.cc
r2990 r3572 192 192 NPix_ = a.NPix_; 193 193 Omega_ = a.Omega_; 194 int_4 k; 195 for (k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k); 196 for (k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k); 197 for (k=0; k< a.TNphi_.Size(); k++) TNphi_(k) = a.TNphi_(k); 198 for (k=0; k< a.Theta_.Size(); k++) Theta_(k) = a.Theta_(k); 194 for (int_4 k=0; k< NPix_; k++) pixels_(k) = a.pixels_(k); 195 for (size_t k=0; k< a.NPhi_.Size(); k++) NPhi_(k) = a.NPhi_(k); 196 for (size_t k=0; k< a.TNphi_.Size(); k++) TNphi_(k) = a.TNphi_(k); 197 for (size_t k=0; k< a.Theta_.Size(); k++) Theta_(k) = a.Theta_(k); 199 198 return(*this); 200 199 … … 613 612 int_4 SphereThetaPhi<T>::GetSymThetaSliceIndex(int_4 idx) const 614 613 { 615 if(idx < 0 || idx >= NbThetaSlices())614 if(idx < 0 || idx >= (int_4)NbThetaSlices()) 616 615 throw RangeCheckError("SphereThetaPhi::GetSymThetaSliceIndex index out of range"); 617 616 return (NbThetaSlices()-1-idx); … … 630 629 { 631 630 632 if(index < 0 || index >= NbThetaSlices())631 if(index < 0 || index >= (int_4)NbThetaSlices()) 633 632 throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...) index out of range"); 634 633 … … 665 664 { 666 665 667 if(index < 0 || index >= NbThetaSlices())666 if(index < 0 || index >= (int_4)NbThetaSlices()) 668 667 throw RangeCheckError("SphereThetaPhi::GetThetaSlice(idx...) idx out of range"); 669 668 … … 673 672 pixelIndices.ReSize(lring); 674 673 value.ReSize(lring); 675 double Te= 0.;676 double Fi= 0.;677 674 for(int_4 kk = 0; kk < lring; kk++) { 678 675 pixelIndices(kk)=kk+iring ; … … 686 683 T* SphereThetaPhi<T>::GetThetaSliceDataPtr(int_4 index) 687 684 { 688 if(index < 0 || index >= NbThetaSlices())685 if(index < 0 || index >= (int_4)NbThetaSlices()) 689 686 throw RangeCheckError("SphereThetaPhi::GetThetaSliceDataPtr(idx) idx out of range"); 690 687 return pixels_.Begin()+Index(index,0);
Note:
See TracChangeset
for help on using the changeset viewer.