Changeset 565 in Sophya for trunk/SophyaLib/Samba/spherethetaphi.h
- Timestamp:
- Nov 10, 1999, 3:01:46 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spherethetaphi.h
r518 r565 10 10 11 11 // ***************** Class SphereThetaPhi ***************************** 12 /*! sphere splitted with respect to theta, phi : each hemisphere is 13 splitted into (m-1) parallels (equator does not enter into account). 14 This operation defines m slices, each of which is splitted into 15 equidistant meridians. This splitting is realized in such a way that 16 all pixels have the same area and are as square as possible. 12 17 18 One begins with the hemisphere with positive z, starting from the pole 19 toward the equator. The first pixel is the polar cap ; it is circular 20 and centered on theta=0. 21 */ 13 22 template <class T> 14 23 class SphereThetaPhi : public SphericalMap<T>, public AnyDataObj … … 18 27 19 28 SphereThetaPhi(); 29 /*! m is the number of slices in theta on an hemisphere (the polar cap 30 forms the first slice). 31 pet is a dummy parameter at the moment. 32 */ 20 33 SphereThetaPhi(int m); 21 34 SphereThetaPhi(const SphereThetaPhi<T>& s); … … 25 38 26 39 /* retourne/fixe le nombre de pixels */ 40 /*! Return total number of pixels */ 27 41 virtual int NbPixels() const; 28 42 inline void setNbPixels(int nbpix) { NPix_= nbpix; } 29 43 30 44 /* retourne la valeur du pixel d'indice k */ 45 /*! Return value of pixel with index k */ 31 46 virtual T& PixVal(int k); 32 47 virtual T const& PixVal(int k) const; … … 35 50 virtual bool ContainsSph(double theta, double phi) const; 36 51 /* retourne l'indice du pixel a (theta,phi) */ 52 /* Return index of the pixel corresponding to direction (theta, phi). */ 37 53 virtual int PixIndexSph(double theta, double phi) const; 38 54 39 55 /* retourne les coordonnees Spheriques du centre du pixel d'indice k */ 56 /*! Return (theta,phi) coordinates of middle of pixel with index k */ 40 57 virtual void PixThetaPhi(int k, double& theta, double& phi) const; 41 58 42 59 /* retourne/fixe l'angle Solide de Pixel (steradians) */ 60 /*! Pixel Solid angle (steradians) 61 62 All the pixels have the same solid angle. The dummy argument is 63 for compatibility with eventual pixelizations which would not 64 fulfil this requirement. 65 */ 43 66 virtual double PixSolAngle(int dummy) const; 44 67 inline void setPixSolAngle(double omega) { Omega_= omega; } … … 50 73 // ------------- Specific methods ---------------------- 51 74 75 /*! re-pixelize the sphere */ 52 76 virtual void Resize(int m); 53 77 … … 55 79 56 80 /* Valeurs de theta des paralleles et phi des meridiens limitant le pixel d'indice k */ 81 /* Return values of theta,phi which limit the pixel with index k */ 57 82 virtual void Limits(int k,double& th1,double& th2,double& phi1,double& phi2); 58 83 59 84 /* Nombre de tranches en theta */ 85 /*! Return number of theta-slices on the sphere */ 60 86 int NbThetaSlices() const; 61 87 … … 65 91 /* Renvoie dans t1,t2 les valeurs respectives de theta min et theta max */ 66 92 /* de la tranche d'indice kt */ 93 /*! Return theta values which limit the slice kt */ 67 94 void Theta(int kt, double& t1, double& t2); 68 95 69 96 /* Renvoie dans p1,p2 les valeurs phimin et phimax du pixel d'indice jp */ 70 97 /* dans la tranche d'indice kt */ 98 /*! Return values of phi which limit the jp-th pixel of the kt-th slice */ 71 99 void Phi(int kt, int jp, double& p1, double& p2); 72 100 73 101 /* Renvoie l'indice k du pixel d'indice jp dans la tranche d'indice kt */ 102 /*! Return pixel index with sequence index jp in the slice kt */ 74 103 int Index(int kt, int jp) const; 75 104 76 105 /* Indice kt de la tranche et indice jp du pixel d'indice k */ 106 /*! Return indices kt (theta) and jp (phi) of pixel with index k */ 77 107 void ThetaPhiIndex(int k,int& kt,int& jp); 78 108 109 /*! achieve the splitting into pixels (m has the same signification 110 as for the constructor) 111 112 Each theta-slice of the north hemisphere will be spitted starting f 113 from phi=0 ... 114 115 South hemisphere is scanned in the same direction according to phi 116 and from equator to the pole (the pixel following the last one of 117 the slice closest to the equator with z>0, is the pixel with lowest 118 phi of the slice closest of the equator with z<0). 119 */ 79 120 void Pixelize(int); 80 121 122 /*! For a theta-slice with index 'index', return : 123 124 the corresponding "theta" 125 126 a vector containing the phi's of the pixels of the slice 127 128 a vector containing the corresponding values of pixels 129 */ 81 130 void GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const; 82 131 … … 129 178 virtual AnyDataObj* DataObj(); 130 179 inline operator SphereThetaPhi<T>() { return(*dobj); } 131 inline SphereThetaPhi<T> getObj() { return(*dobj); }180 //inline SphereThetaPhi<T> getObj() { return(*dobj); } 132 181 133 182 protected :
Note:
See TracChangeset
for help on using the changeset viewer.