Changeset 1196 in Sophya for trunk/SophyaLib/SkyMap/HEALPixUtils.cc
- Timestamp:
- Sep 22, 2000, 12:36:46 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/SkyMap/HEALPixUtils.cc
r1195 r1196 13 13 } 14 14 15 namespace SOPHYA 16 { 15 using namespace SOPHYA; 16 17 ////////////////////////////////////////////////////////////////////////// 18 // 19 // ------------- Classe PIXELS_XY ----------------------- 20 // 21 class PIXELS_XY 22 { 23 24 public : 25 26 static PIXELS_XY& instance(); 27 28 NDataBlock<int_4> pix2x_; 29 NDataBlock<int_4> pix2y_; 30 NDataBlock<int_4> x2pix_; 31 NDataBlock<int_4> y2pix_; 32 33 private : 34 35 PIXELS_XY(); 36 void mk_pix2xy(); 37 void mk_xy2pix(); 38 }; 17 39 18 40 … … 38 60 } 39 61 62 // Instance unique de la classe PIXELS_XY 63 static PIXELS_XY * single = NULL; 64 40 65 PIXELS_XY& PIXELS_XY::instance() 41 66 { 42 static PIXELS_XY single;43 return ( single);67 if (single == NULL) single = new PIXELS_XY ; 68 return (*single); 44 69 } 45 70 … … 128 153 129 154 130 int_4 nest2ring(int_4 nside, int_4 ipnest)155 int_4 HEALPix::nest2ring(int_4 nside, int_4 ipnest) 131 156 { 132 157 /* … … 210 235 211 236 212 int_4 ring2nest(int_4 nside, int_4 ipring)237 int_4 HEALPix::ring2nest(int_4 nside, int_4 ipring) 213 238 { 214 239 /* … … 318 343 } 319 344 320 int_4 ang2pix_ring(int_4 nside, double theta, double phi)345 int_4 HEALPix::ang2pix_ring(int_4 nside, double theta, double phi) 321 346 { 322 347 /* … … 393 418 } 394 419 395 int_4 ang2pix_nest(int_4 nside, double theta, double phi)420 int_4 HEALPix::ang2pix_nest(int_4 nside, double theta, double phi) 396 421 { 397 422 /* … … 489 514 } 490 515 491 void pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) { 516 void HEALPix::pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) 517 { 492 518 /* 493 519 =================================================== … … 556 582 } 557 583 558 void pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) { 584 void HEALPix::pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) 585 { 559 586 /* 560 587 ================================================== … … 644 671 } 645 672 646 } 673
Note:
See TracChangeset
for help on using the changeset viewer.