Ignore:
Timestamp:
Sep 22, 2000, 12:36:46 PM (25 years ago)
Author:
ansari
Message:

Introduction de la classe HEALPix pour accrocher les methodes de
converion angle<>index
rajout en methodes inline static de ces methodes de conversion pour
SphereHEALPix<T>
+ Autre modifs cosmetiques + MAJ Makefile , Reza 21/9/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/SkyMap/HEALPixUtils.cc

    r1195 r1196  
    1313}
    1414
    15 namespace SOPHYA
    16 {
     15using namespace SOPHYA;
     16
     17//////////////////////////////////////////////////////////////////////////
     18//
     19// ------------- Classe PIXELS_XY -----------------------
     20//
     21class PIXELS_XY
     22{
     23
     24public :
     25
     26static PIXELS_XY& instance();
     27
     28NDataBlock<int_4> pix2x_;
     29NDataBlock<int_4> pix2y_;
     30NDataBlock<int_4> x2pix_;
     31NDataBlock<int_4> y2pix_;
     32
     33private :
     34
     35PIXELS_XY();
     36void mk_pix2xy();
     37void mk_xy2pix();
     38};
    1739
    1840
     
    3860}
    3961
     62// Instance unique de la classe PIXELS_XY
     63static PIXELS_XY * single = NULL;
     64
    4065PIXELS_XY& PIXELS_XY::instance()
    4166{
    42   static PIXELS_XY single;
    43   return (single);
     67  if (single == NULL) single = new PIXELS_XY ;
     68  return (*single);
    4469}
    4570
     
    128153
    129154
    130 int_4 nest2ring(int_4 nside, int_4 ipnest)
     155int_4 HEALPix::nest2ring(int_4 nside, int_4 ipnest)
    131156{
    132157  /*
     
    210235
    211236
    212 int_4 ring2nest(int_4 nside, int_4 ipring) 
     237int_4 HEALPix::ring2nest(int_4 nside, int_4 ipring) 
    213238{
    214239  /*
     
    318343}
    319344
    320 int_4 ang2pix_ring(int_4 nside, double theta, double phi) 
     345int_4 HEALPix::ang2pix_ring(int_4 nside, double theta, double phi) 
    321346{
    322347  /*
     
    393418}
    394419
    395 int_4 ang2pix_nest(int_4 nside, double theta, double phi)
     420int_4 HEALPix::ang2pix_nest(int_4 nside, double theta, double phi)
    396421{
    397422  /*
     
    489514}
    490515
    491 void pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi)  {
     516void HEALPix::pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) 
     517{
    492518  /*
    493519    ===================================================
     
    556582}
    557583
    558 void pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi)  {
     584void HEALPix::pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) 
     585{
    559586  /*
    560587    ==================================================
     
    644671}
    645672
    646 }
     673 
Note: See TracChangeset for help on using the changeset viewer.