Changeset 682 in Sophya for trunk/SophyaLib/Samba/spheregorski.cc
- Timestamp:
- Dec 10, 1999, 5:56:03 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spheregorski.cc
r604 r682 186 186 //++ 187 187 template<class T> 188 SphereGorski<T>::SphereGorski(int m)188 SphereGorski<T>::SphereGorski(int_4 m) 189 189 190 190 // m is the "nside" of the Gorski algorithm … … 246 246 //++ 247 247 template<class T> 248 void SphereGorski<T>::Resize(int m)248 void SphereGorski<T>::Resize(int_4 m) 249 249 250 250 // m is the "nside" of the Gorski algorithm … … 272 272 273 273 template<class T> 274 void SphereGorski<T>::Pixelize( int m)274 void SphereGorski<T>::Pixelize( int_4 m) 275 275 276 276 // prépare la pixelisation Gorski (m a la même signification … … 313 313 //++ 314 314 template<class T> 315 int SphereGorski<T>::NbPixels() const315 int_4 SphereGorski<T>::NbPixels() const 316 316 317 317 // Retourne le nombre de pixels du découpage … … 323 323 //++ 324 324 template<class T> 325 int SphereGorski<T>::NbThetaSlices() const325 int_4 SphereGorski<T>::NbThetaSlices() const 326 326 327 327 // Return number of slices in theta direction on the sphere … … 333 333 //++ 334 334 template<class T> 335 void SphereGorski<T>::GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const335 void SphereGorski<T>::GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const 336 336 337 337 // For a theta-slice with index 'index', return : … … 354 354 } 355 355 356 int iring= 0;357 int lring = 0;356 int_4 iring= 0; 357 int_4 lring = 0; 358 358 if(index < nSide_-1) 359 359 { … … 368 368 else 369 369 { 370 int nc= 4*nSide_-1-index;370 int_4 nc= 4*nSide_-1-index; 371 371 iring = nPix_-2*nc*(nc+1); 372 372 lring = 4*nc; … … 377 377 double TH= 0.; 378 378 double FI= 0.; 379 for(int kk = 0; kk < lring;kk++)379 for(int_4 kk = 0; kk < lring;kk++) 380 380 { 381 381 PixThetaPhi(kk+iring,TH,FI); … … 389 389 //++ 390 390 template<class T> 391 T& SphereGorski<T>::PixVal(int k)391 T& SphereGorski<T>::PixVal(int_4 k) 392 392 393 393 // Return value of pixel with "RING" index k … … 406 406 //++ 407 407 template<class T> 408 T const& SphereGorski<T>::PixVal(int k) const408 T const& SphereGorski<T>::PixVal(int_4 k) const 409 409 410 410 // Return value of pixel with "RING" index k … … 422 422 //++ 423 423 template<class T> 424 T& SphereGorski<T>::PixValNest(int k)424 T& SphereGorski<T>::PixValNest(int_4 k) 425 425 426 426 // Return value of pixel with "NESTED" index k … … 438 438 439 439 template<class T> 440 T const& SphereGorski<T>::PixValNest(int k) const440 T const& SphereGorski<T>::PixValNest(int_4 k) const 441 441 442 442 // Return value of pixel with "NESTED" index k … … 449 449 THROW(rangeCheckErr); 450 450 } 451 int pix= nest2ring(nSide_,k);451 int_4 pix= nest2ring(nSide_,k); 452 452 return *(pixels_.Data()+pix); 453 453 } … … 456 456 //++ 457 457 template<class T> 458 bool SphereGorski<T>::ContainsSph(double theta, double phi) const458 bool SphereGorski<T>::ContainsSph(double /*theta*/, double /*phi*/) const 459 459 //-- 460 460 { … … 465 465 //++ 466 466 template<class T> 467 int SphereGorski<T>::PixIndexSph(double theta,double phi) const467 int_4 SphereGorski<T>::PixIndexSph(double theta,double phi) const 468 468 469 469 // Return "RING" index of the pixel corresponding to … … 476 476 //++ 477 477 template<class T> 478 int SphereGorski<T>::PixIndexSphNest(double theta,double phi) const478 int_4 SphereGorski<T>::PixIndexSphNest(double theta,double phi) const 479 479 480 480 // Return "NESTED" index of the pixel corresponding to … … 489 489 //++ 490 490 template<class T> 491 void SphereGorski<T>::PixThetaPhi(int k,double& theta,double& phi) const491 void SphereGorski<T>::PixThetaPhi(int_4 k,double& theta,double& phi) const 492 492 493 493 // Return (theta,phi) coordinates of middle of pixel with "RING" index k … … 506 506 //++ 507 507 template<class T> 508 double SphereGorski<T>::PixSolAngle(int dummy) const508 double SphereGorski<T>::PixSolAngle(int_4 /*dummy*/) const 509 509 // Pixel Solid angle (steradians) 510 510 // All the pixels have the same solid angle. The dummy argument is … … 518 518 //++ 519 519 template<class T> 520 void SphereGorski<T>::PixThetaPhiNest(int k,double& theta,double& phi) const520 void SphereGorski<T>::PixThetaPhiNest(int_4 k,double& theta,double& phi) const 521 521 522 522 // Return (theta,phi) coordinates of middle of pixel with "NESTED" index k … … 528 528 //++ 529 529 template<class T> 530 int SphereGorski<T>::NestToRing(intk) const530 int_4 SphereGorski<T>::NestToRing(int_4 k) const 531 531 532 532 // translation from NESTED index into RING index … … 539 539 //++ 540 540 template<class T> 541 int SphereGorski<T>::RingToNest(intk) const541 int_4 SphereGorski<T>::RingToNest(int_4 k) const 542 542 // 543 543 // translation from RING index into NESTED index … … 550 550 551 551 template<class T> 552 int SphereGorski<T>::nest2ring(int nside, intipnest) const552 int_4 SphereGorski<T>::nest2ring(int_4 nside, int_4 ipnest) const 553 553 { 554 554 /* … … 632 632 633 633 template<class T> 634 int SphereGorski<T>::ring2nest(int nside, intipring) const634 int_4 SphereGorski<T>::ring2nest(int_4 nside, int_4 ipring) const 635 635 { 636 636 /* … … 741 741 742 742 template<class T> 743 int SphereGorski<T>::ang2pix_ring(intnside, double theta, double phi) const743 int_4 SphereGorski<T>::ang2pix_ring(int_4 nside, double theta, double phi) const 744 744 { 745 745 /* … … 817 817 818 818 template<class T> 819 int SphereGorski<T>::ang2pix_nest(intnside, double theta, double phi) const819 int_4 SphereGorski<T>::ang2pix_nest(int_4 nside, double theta, double phi) const 820 820 { 821 821 /* … … 914 914 915 915 template<class T> 916 void SphereGorski<T>::pix2ang_ring(int nside,intipix,double& theta,double& phi) const {916 void SphereGorski<T>::pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) const { 917 917 /* 918 918 =================================================== … … 982 982 983 983 template<class T> 984 void SphereGorski<T>::pix2ang_nest(int nside,intipix,double& theta,double& phi) const {984 void SphereGorski<T>::pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) const { 985 985 /* 986 986 ================================================== … … 1174 1174 } 1175 1175 1176 int nSide;1176 int_4 nSide; 1177 1177 is.GetI4(nSide); 1178 1178 dobj->setSizeIndex(nSide); 1179 1179 1180 int nPix;1180 int_4 nPix; 1181 1181 is.GetI4(nPix); 1182 1182 dobj->setNbPixels(nPix); … … 1204 1204 1205 1205 char strg[256]; 1206 int nSide= dobj->SizeIndex();1207 int nPix = dobj->NbPixels();1206 int_4 nSide= dobj->SizeIndex(); 1207 int_4 nPix = dobj->NbPixels(); 1208 1208 1209 1209 if(dobj->ptrInfo())
Note:
See TracChangeset
for help on using the changeset viewer.