Changeset 2968 in Sophya for trunk/SophyaLib/SkyMap
- Timestamp:
- Jun 6, 2006, 6:53:51 PM (19 years ago)
- Location:
- trunk/SophyaLib/SkyMap
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/sphereecp.cc
r2882 r2968 304 304 305 305 template <class T> 306 r_8 SphereECP<T>::ThetaOfSlice(int_4 index) const 307 { 308 if( (index < 0) || (index >= _pixels.SizeY()) ) 309 throw RangeCheckError("SphereECP::ThetaOfSlice() theta index out of range"); 310 return (_theta1 + (index+0.5)*_dtheta); 311 312 } 313 314 template <class T> 306 315 void SphereECP<T>::GetThetaSlice(int_4 index,r_8& theta, 307 316 TVector<r_8>& phi, TVector<T>& value) const 308 317 { 309 318 if( (index < 0) || (index >= _pixels.SizeY()) ) 310 throw RangeCheckError("SphereECP::GetThetaSlice() thetaindex out of range");319 throw RangeCheckError("SphereECP::GetThetaSlice() index out of range"); 311 320 312 321 theta = _theta1 + (index+0.5)*_dtheta; … … 336 345 { 337 346 if( (index < 0) || (index >= _pixels.SizeY()) ) 338 throw RangeCheckError("SphereECP::GetThetaSlice() thetaindex out of range");347 throw RangeCheckError("SphereECP::GetThetaSlice() index out of range"); 339 348 340 349 theta = _theta1 + (index+0.5)*_dtheta; -
trunk/SophyaLib/SkyMap/sphereecp.h
r2623 r2968 96 96 inline uint_4 NbPhiSlices() const { return _pixels.SizeX(); } 97 97 98 virtual r_8 ThetaOfSlice(int_4 index) const; 98 99 virtual void GetThetaSlice(int_4 index,r_8& theta, 99 100 TVector<r_8>& phi, TVector<T>& value) const ; -
trunk/SophyaLib/SkyMap/spherehealpix.cc
r2960 r2968 299 299 } 300 300 301 //! Return the theta angle for slice defined by \b index 302 template<class T> 303 r_8 SphereHEALPix<T>::ThetaOfSlice(int_4 index) const 304 { 305 uint_4 nbslices = uint_4(4*nSide_-1); 306 if (index<0 || index >= nbslices) 307 throw RangeCheckError(" SphereHEALPix::ThetaOfSlice() index out of range"); 308 r_8 theta, phi0; 309 PixThetaPhi(sliceBeginIndex_(index), theta, phi0); 310 return theta; 311 } 312 301 313 /*! \fn void SOPHYA::SphereHEALPix::GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const 302 314 … … 317 329 { 318 330 cout << " SphereHEALPix::GetThetaSlice : Pixel index out of range" <<endl; 319 throw RangeCheckError(" SphereHEALPix::GetThetaSlice : Pixelindex out of range");331 throw RangeCheckError(" SphereHEALPix::GetThetaSlice() index out of range"); 320 332 } 321 333 -
trunk/SophyaLib/SkyMap/spherehealpix.h
r2965 r2968 70 70 virtual T const& PixVal(int_4 k) const; 71 71 72 uint_4 NbThetaSlices() const; 72 virtual uint_4 NbThetaSlices() const; 73 virtual r_8 ThetaOfSlice(int_4 index) const; 73 74 virtual void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const; 74 75 virtual void GetThetaSlice(int_4 sliceIndex,r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const ; -
trunk/SophyaLib/SkyMap/spherethetaphi.cc
r2960 r2968 592 592 } 593 593 594 //! Return the theta angle for slice defined by \b index 595 template <class T> 596 r_8 SphereThetaPhi<T>::ThetaOfSlice(int_4 index) const 597 { 598 if(index < 0 || index >= 2*NTheta_) 599 throw RangeCheckError("SphereThetaPhi::ThetaOfSlice() index out of range"); 600 double tet1, tet2; 601 Theta(index, tet1, tet2); 602 return 0.5*(tet1+tet2); 603 } 594 604 595 605 /*! … … 606 616 607 617 if(index < 0 || index >= NbThetaSlices()) 608 { 609 throw RangeCheckError("SphereThetaPhi::PIxVal Pixel index out of range"); 610 } 618 throw RangeCheckError("SphereThetaPhi::GetThetaSlice() index out of range"); 619 611 620 612 621 int iring= Index(index,0); -
trunk/SophyaLib/SkyMap/spherethetaphi.h
r2960 r2968 119 119 void Pixelize(int_4); 120 120 121 virtual r_8 ThetaOfSlice(int_4 index) const; 121 122 virtual void GetThetaSlice(int_4 index,r_8& theta,TVector<r_8>& phi,TVector<T>& value) const; 122 123 virtual void GetThetaSlice(int_4 index, r_8& theta, r_8& phi0,TVector<int_4>& pixelIndices, TVector<T>& value) const ; -
trunk/SophyaLib/SkyMap/sphericalmap.h
r2885 r2968 47 47 virtual void Resize(int_4 m)=0; 48 48 virtual uint_4 NbThetaSlices() const=0; 49 virtual r_8 ThetaOfSlice(int_4 index) const=0; 49 50 virtual void GetThetaSlice(int_4 index,r_8& theta, TVector<r_8>& phi, TVector<T>& value) const=0; 50 51 virtual void GetThetaSlice(int_4 sliceIndex, r_8& theta, r_8& phi0, TVector<int_4>& pixelIndices,TVector<T>& value) const=0 ;
Note:
See TracChangeset
for help on using the changeset viewer.