Changeset 682 in Sophya for trunk/SophyaLib/Samba/spheregorski.h
- Timestamp:
- Dec 10, 1999, 5:56:03 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spheregorski.h
r604 r682 64 64 nside MUST be a power of 2 (<= 8192) 65 65 */ 66 SphereGorski(int m);66 SphereGorski(int_4 m); 67 67 SphereGorski(const SphereGorski<T>& s, bool share=false); 68 68 //! Destructor … … 73 73 /* Nombre de pixels du decoupage */ 74 74 /*! Return number of pixels of the splitting */ 75 virtual int NbPixels() const;76 inline void setNbPixels(int n) {nPix_= n;}75 virtual int_4 NbPixels() const; 76 inline void setNbPixels(int_4 n) {nPix_= n;} 77 77 78 78 /* Valeur du contenu du pixel d'indice "RING" k */ 79 79 /*! Return value of pixel with "RING" index k */ 80 virtual T& PixVal(int k);81 virtual T const& PixVal(int k) const;80 virtual T& PixVal(int_4 k); 81 virtual T const& PixVal(int_4 k) const; 82 82 83 83 /* Nombre de tranches en theta */ 84 84 /*! Return number of slices in theta direction on the sphere */ 85 int NbThetaSlices() const;85 int_4 NbThetaSlices() const; 86 86 /*! For a theta-slice with index 'index', return : 87 87 … … 92 92 a vector containing the corresponding values of pixels 93 93 */ 94 void GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const;94 void GetThetaSlice(int_4 index,double& theta,TVector<double>& phi,TVector<T>& value) const; 95 95 96 96 /* Return true if teta,phi in map */ … … 100 100 /*! Return "RING" index of the pixel corresponding to direction (theta, phi). 101 101 */ 102 virtual int PixIndexSph(double theta,double phi) const;102 virtual int_4 PixIndexSph(double theta,double phi) const; 103 103 104 104 /* Coordonnees spheriques du milieu du pixel d'indice "RING" k */ 105 virtual void PixThetaPhi(int k,double& theta,double& phi) const;105 virtual void PixThetaPhi(int_4 k,double& theta,double& phi) const; 106 106 107 107 /*! Set all pixels to value v */ … … 115 115 fulfil this requirement. 116 116 */ 117 virtual double PixSolAngle(int dummy) const;117 virtual double PixSolAngle(int_4 dummy) const; 118 118 inline void setPixSolAngle(double x) {omeg_= x;} 119 119 … … 127 127 nside MUST be a power of 2 (<= 8192) 128 128 */ 129 virtual void Resize(int m);129 virtual void Resize(int_4 m); 130 130 131 131 inline virtual char* TypeOfMap() const {return "RING";}; … … 133 133 /* Valeur du contenu du pixel d'indice "NEST" k */ 134 134 /*! Return value of pixel with "NESTED" index k */ 135 virtual T& PixValNest(int k);135 virtual T& PixValNest(int_4 k); 136 136 /*! Return value of pixel with "NESTED" index k */ 137 virtual T const& PixValNest(int k) const;137 virtual T const& PixValNest(int_4 k) const; 138 138 139 139 /* Indice "NEST" du pixel vers lequel pointe une direction definie par … … 141 141 /*! Return "NESTED" index of the pixel corresponding to direction (theta, phi). 142 142 */ 143 virtual int PixIndexSphNest(double theta,double phi) const;143 virtual int_4 PixIndexSphNest(double theta,double phi) const; 144 144 145 145 /* Coordonnees spheriques du milieu du pixel d'indice "NEST" k */ 146 146 /*! Return (theta,phi) coordinates of middle of pixel with "NESTED" index k 147 147 */ 148 virtual void PixThetaPhiNest(int k,double& theta,double& phi) const;148 virtual void PixThetaPhiNest(int_4 k,double& theta,double& phi) const; 149 149 150 150 /* algorithme de pixelisation */ 151 void Pixelize(int );151 void Pixelize(int_4); 152 152 153 153 /* convertit index nested en ring */ 154 154 /*! translation from NESTED index into RING index */ 155 int NestToRing(int) const;155 int_4 NestToRing(int_4) const; 156 156 157 157 /* convertit index ring en nested" */ 158 158 /*! translation from RING index into NESTED index */ 159 int RingToNest(int) const;159 int_4 RingToNest(int_4) const; 160 160 161 161 162 162 /* retourne/fixe la valeur du parametre Gorski */ 163 inline virtual int SizeIndex() const {return(nSide_);}164 inline void setSizeIndex(int n) {nSide_= n;}163 inline virtual int_4 SizeIndex() const {return(nSide_);} 164 inline void setSizeIndex(int_4 n) {nSide_= n;} 165 165 166 166 /* retourne les pointeurs /remplit les tableaux */ 167 167 inline const NDataBlock<T>* getDataBlock() const { return (&pixels_); } 168 inline void setDataBlock(T* data,int m) { pixels_.FillFrom(m,data); }168 inline void setDataBlock(T* data,int_4 m) { pixels_.FillFrom(m,data); } 169 169 170 170 /* Acces to the DataBlock */ … … 182 182 void InitNul(); 183 183 184 int nest2ring(int nside,intipnest) const;185 int ring2nest(int nside,intipring) const;186 187 int ang2pix_ring(intnside,double theta,double phi) const;188 int ang2pix_nest(intnside,double theta,double phi) const;189 void pix2ang_ring(int nside,intipix,double& theta,double& phi) const;190 void pix2ang_nest(int nside,intipix,double& theta,double& phi) const;184 int_4 nest2ring(int_4 nside,int_4 ipnest) const; 185 int_4 ring2nest(int_4 nside,int_4 ipring) const; 186 187 int_4 ang2pix_ring(int_4 nside,double theta,double phi) const; 188 int_4 ang2pix_nest(int_4 nside,double theta,double phi) const; 189 void pix2ang_ring(int_4 nside,int_4 ipix,double& theta,double& phi) const; 190 void pix2ang_nest(int_4 nside,int_4 ipix,double& theta,double& phi) const; 191 191 192 192 // ------------- variables internes ----------------------- 193 int nSide_;194 int nPix_;193 int_4 nSide_; 194 int_4 nPix_; 195 195 double omeg_; 196 196 … … 234 234 static PIXELS_XY& instance(); 235 235 236 NDataBlock<int > pix2x_;237 NDataBlock<int > pix2y_;238 NDataBlock<int > x2pix_;239 NDataBlock<int > y2pix_;236 NDataBlock<int_4> pix2x_; 237 NDataBlock<int_4> pix2y_; 238 NDataBlock<int_4> x2pix_; 239 NDataBlock<int_4> y2pix_; 240 240 241 241 private :
Note:
See TracChangeset
for help on using the changeset viewer.