Changeset 565 in Sophya for trunk/SophyaLib/Samba/spheregorski.h
- Timestamp:
- Nov 10, 1999, 3:01:46 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spheregorski.h
r518 r565 12 12 // ***************** CLASSE SphereGorski ***************************** 13 13 14 //! class SphereGorski 15 /*! 16 Pixelisation Gorski 17 18 19 ----------------------------------------------------------------------- 20 version 0.8.2 Aug97 TAC Eric Hivon, Kris Gorski 21 ----------------------------------------------------------------------- 22 23 the sphere is split in 12 diamond-faces containing nside**2 pixels each 24 25 the numbering of the pixels (in the nested scheme) is similar to 26 quad-cube 27 In each face the first pixel is in the lowest corner of the diamond 28 29 the faces are (x,y) coordinate on each face 30 \verbatim 31 . . . . <--- North Pole 32 / \ / \ / \ / \ ^ ^ 33 . 0 . 1 . 2 . 3 . <--- z = 2/3 \ / 34 \ / \ / \ / \ / y \ / x 35 4 . 5 . 6 . 7 . 4 <--- equator \ / 36 / \ / \ / \ / \ \/ 37 . 8 . 9 .10 .11 . <--- z = -2/3 (0,0) : lowest corner 38 \ / \ / \ / \ / 39 . . . . <--- South Pole 40 \endverbatim 41 phi:0 2Pi 42 43 in the ring scheme pixels are numbered along the parallels 44 the first parallel is the one closest to the north pole and so on 45 on each parallel, pixels are numbered starting from the one closest 46 to phi = 0 47 48 nside MUST be a power of 2 (<= 8192) 49 50 */ 51 14 52 template<class T> 15 53 class SphereGorski : public SphericalMap<T>, public AnyDataObj … … 19 57 20 58 SphereGorski(); 59 /*! 60 m is the "nside" of the Gorski algorithm 61 62 The total number of pixels will be Npix = 12*nside**2 63 64 nside MUST be a power of 2 (<= 8192) 65 */ 21 66 SphereGorski(int m); 22 67 SphereGorski(const SphereGorski<T>& s); 68 //! Destructor 23 69 virtual ~SphereGorski(); 24 70 … … 26 72 27 73 /* Nombre de pixels du decoupage */ 74 /*! Return number of pixels of the splitting */ 28 75 virtual int NbPixels() const; 29 76 inline void setNbPixels(int n) {nPix_= n;} 30 77 31 78 /* Valeur du contenu du pixel d'indice "RING" k */ 79 /*! Return value of pixel with "RING" index k */ 32 80 virtual T& PixVal(int k); 33 81 virtual T const& PixVal(int k) const; 34 82 35 83 /* Nombre de tranches en theta */ 84 /*! Return number of slices in theta direction on the sphere */ 36 85 int NbThetaSlices() const; 86 /*! For a theta-slice with index 'index', return : 87 88 the corresponding "theta" 89 90 a vector containing the phi's of the pixels of the slice 91 92 a vector containing the corresponding values of pixels 93 */ 37 94 void GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const; 38 95 … … 41 98 /* Indice "RING" du pixel vers lequel pointe une direction definie par 42 99 ses coordonnees spheriques */ 100 /*! Return "RING" index of the pixel corresponding to direction (theta, phi). 101 */ 43 102 virtual int PixIndexSph(double theta,double phi) const; 44 103 … … 47 106 48 107 /* Pixel Solid angle (steradians) */ 108 /*! Pixel Solid angle (steradians) 109 110 All the pixels have the same solid angle. The dummy argument is 111 for compatibility with eventual pixelizations which would not 112 fulfil this requirement. 113 */ 49 114 virtual double PixSolAngle(int dummy) const; 50 115 inline void setPixSolAngle(double x) {omeg_= x;} … … 52 117 // --------------- Specific methods 53 118 119 /*! 120 m is the "nside" of the Gorski algorithm 121 122 The total number of pixels will be Npix = 12*nside**2 123 124 nside MUST be a power of 2 (<= 8192) 125 */ 54 126 virtual void Resize(int m); 55 127 … … 57 129 58 130 /* Valeur du contenu du pixel d'indice "NEST" k */ 131 /*! Return value of pixel with "NESTED" index k */ 59 132 virtual T& PixValNest(int k); 133 /*! Return value of pixel with "NESTED" index k */ 60 134 virtual T const& PixValNest(int k) const; 61 135 62 136 /* Indice "NEST" du pixel vers lequel pointe une direction definie par 63 137 ses coordonnees spheriques */ 138 /*! Return "NESTED" index of the pixel corresponding to direction (theta, phi). 139 */ 64 140 virtual int PixIndexSphNest(double theta,double phi) const; 65 141 66 142 /* Coordonnees spheriques du milieu du pixel d'indice "NEST" k */ 143 /*! Return (theta,phi) coordinates of middle of pixel with "NESTED" index k 144 */ 67 145 virtual void PixThetaPhiNest(int k,double& theta,double& phi) const; 68 146 … … 71 149 72 150 /* convertit index nested en ring */ 151 /*! translation from NESTED index into RING index */ 73 152 int NestToRing(int) const; 74 153 75 154 /* convertit index ring en nested" */ 155 /*! translation from RING index into NESTED index */ 76 156 int RingToNest(int) const; 77 157 … … 127 207 virtual AnyDataObj* DataObj(); 128 208 inline operator SphereGorski<T>() { return(*dobj); } 129 inline SphereGorski<T> getObj() { return(*dobj); }209 //inline SphereGorski<T> getObj() { return(*dobj); } 130 210 131 211 protected :
Note:
See TracChangeset
for help on using the changeset viewer.