Changeset 565 in Sophya for trunk/SophyaLib/Samba/spherethetaphi.cc
- Timestamp:
- Nov 10, 1999, 3:01:46 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/Samba/spherethetaphi.cc
r518 r565 13 13 // include spherethetaphi.h nbmath.h 14 14 // 15 // Découpage de la sphère selon theta et phi, chaque 16 // hémisphère étant découpé en (m-1) parallèles (l'équateur compte pour du 17 // beurre), chacune des m bandes de theta ainsi définies étant découpée par 18 // des méridiens équirepartis, ce découpage étant fait de sorte que tous 19 // les pixels aient la même surface et soient le plus carré possible. 20 // On commence par découper l'hémisphère de z positif en partant du pôle et 21 // en allant vers l'équateur. Le premier pixel est la calotte polaire, 22 // il est circulaire et centré sur theta=0. 15 // sphere splitted with respect to theta, phi : each hemisphere is 16 // splitted into (m-1) parallels (equator does not enter into account). 17 // This operation defines m slices, each of which is splitted into 18 // equidistant meridians. This splitting is realized in such a way that 19 // all pixels have the same area and are as square as possible. 20 21 // One begins with the hemisphere with positive z, starting from the pole 22 // toward the equator. The first pixel is the polar cap ; it is circular 23 // and centered on theta=0. 23 24 //-- 24 25 //++ … … 28 29 // SphericalMap 29 30 //-- 30 //++ 31 // 32 // Links Descendants 33 // 34 // 35 //-- 36 37 /* --Methode-- */ 38 //++ 39 // Titre Constructeurs 31 32 /* --Methode-- */ 33 //++ 34 // Titre Constructors 40 35 //-- 41 36 //++ … … 56 51 SphereThetaPhi<T>::SphereThetaPhi(int m) 57 52 58 // Constructeur : m est le nombre de bandes en theta sur un hémisphère 59 // (la calotte constituant la premiere bande). 60 // pet est le nombre de pixels (pétales) de la bande en contact avec la 61 // calotte polaire. Pour l'instant pet est inopérant! 53 // m is the number of slices in theta on an hemisphere (the polar cap 54 // forms the first slice). 55 // pet is a dummy parameter at the moment. 62 56 //-- 63 57 { … … 88 82 89 83 //++ 90 // Titre Destruct eur84 // Titre Destructor 91 85 //-- 92 86 //++ … … 100 94 101 95 //++ 102 // Titre Méthodes96 // Titre Public Méthods 103 97 //-- 104 98 template <class T> … … 141 135 int SphereThetaPhi<T>::NbPixels() const 142 136 143 // Ret ourne le nombre de pixels du découpage137 // Return total number of pixels 144 138 //-- 145 139 { … … 152 146 T& SphereThetaPhi<T>::PixVal(int k) 153 147 154 // Ret ourne la valeur du contenu du pixel d'indicek148 // Return value of pixel with index k 155 149 //-- 156 150 { … … 168 162 T const& SphereThetaPhi<T>::PixVal(int k) const 169 163 170 // Ret ourne la valeur du contenu du pixel d'indicek164 // Return value of pixel with index k 171 165 //-- 172 166 { … … 194 188 int SphereThetaPhi<T>::PixIndexSph(double theta, double phi) const 195 189 196 // Retourne l'indice du pixel vers lequel pointe une direction définie par197 // ses coordonnées sphériques190 // Return index of the pixel corresponding to 191 // direction (theta, phi). 198 192 //-- 199 193 { … … 223 217 void SphereThetaPhi<T>::PixThetaPhi(int k,double& theta,double& phi) const 224 218 225 // Retourne les coordonnées (theta,phi) du milieu du pixel d'indicek219 // Return (theta,phi) coordinates of middle of pixel with index k 226 220 //-- 227 221 { … … 264 258 void SphereThetaPhi<T>::Limits(int k,double& tetMin,double& tetMax,double& phiMin,double& phiMax) 265 259 266 // Retourne les valeurs de theta et phi limitant le pixel d'indicek260 // Return values of theta,phi which limit the pixel with index k 267 261 //-- 268 262 { … … 317 311 int SphereThetaPhi<T>::NbThetaSlices() const 318 312 319 // Ret ourne le nombre de tranches en theta sur lasphere313 // Return number of theta-slices on the sphere 320 314 //-- 321 315 { … … 330 324 int SphereThetaPhi<T>::NPhi(int kt) const 331 325 332 // Ret ourne le nombre de pixels en phi de la tranche kt326 // Return number of pixels in phi-direction of the kt-th slice 333 327 //-- 334 328 { … … 353 347 void SphereThetaPhi<T>::Theta(int kt,double& tetMin,double& tetMax) 354 348 355 // Ret ourne les valeurs de theta limitant la tranche kt349 // Return theta values which limit the slice kt 356 350 //-- 357 351 { … … 385 379 void SphereThetaPhi<T>::Phi(int kt,int jp,double& phiMin,double& phiMax) 386 380 387 // Retourne les valeurs de phi limitant le pixel jp de la tranche kt381 // Return values of phi which limit the jp-th pixel of the kt-th slice 388 382 //-- 389 383 { … … 416 410 int SphereThetaPhi<T>::Index(int kt,int jp) const 417 411 418 // Ret ourne l'indice du pixel d'indice jp dans la tranche kt412 // Return pixel index with sequence index jp in the slice kt 419 413 //-- 420 414 { … … 449 443 void SphereThetaPhi<T>::ThetaPhiIndex(int k,int& kt,int& jp) 450 444 451 // Ret ourne les indices kt et jp du pixel d'indicek445 // Return indices kt (theta) and jp (phi) of pixel with index k 452 446 //-- 453 447 { … … 477 471 void SphereThetaPhi<T>::Pixelize(int m) 478 472 479 // effectue le découpage en pixels (m et pet ont la même signification480 // que pour le constructeur)473 // achieve the splitting into pixels (m has the same signification 474 // as for the constructor) 481 475 // 482 // Chaque bande de theta sera découpée en partant de phi=0 ... 483 // L'autre hémisphère est parcourue dans le même sens en phi et de 484 // l'équateur vers le pôle (le pixel qui suit le dernier de la bande la plus 485 // proche de l'équateur a z>0 est celui de plus petit phi de la bande la 486 // plus proche de l'equateur a z<0). 476 // Each theta-slice of the north hemisphere will be spitted starting f 477 // from phi=0 ... 478 // 479 // South hemisphere is scanned in the same direction according to phi 480 // and from equator to the pole (the pixel following the last one of 481 // the slice closest to the equator with z>0, is the pixel with lowest 482 // phi of the slice closest of the equator with z<0). 487 483 //-- 488 484 { … … 554 550 void SphereThetaPhi<T>::GetThetaSlice(int index,double& theta, TVector<double>& phi, TVector<T>& value) const 555 551 556 // Retourne, pour la tranche en theta d'indice 'index' le theta557 // correspondant, un vecteur (Peida) contenant les phi des pixels de558 // la tranche, un vecteur (Peida) contenant les valeurs de pixel559 // correspondantes552 // For a theta-slice with index 'index', return : 553 // the corresponding "theta" 554 // a vector containing the phi's of the pixels of the slice 555 // a vector containing the corresponding values of pixels 560 556 //-- 561 557 … … 591 587 void SphereThetaPhi<T>::setmNPhi(int* array, int m) 592 588 //remplit le tableau contenant le nombre de pixels en phi de chacune des bandes en theta 593 // --589 // 594 590 { 595 591 NPhi_= new int[m]; … … 600 596 void SphereThetaPhi<T>::setmTNphi(int* array, int m) 601 597 //remplit le tableau contenant le nombre/Deuxpi total des pixels contenus dans les bandes 602 // --598 // 603 599 { 604 600 TNphi_= new int[m]; … … 609 605 void SphereThetaPhi<T>::setmTheta(double* array, int m) 610 606 //remplit le tableau contenant les valeurs limites de theta 611 // --607 // 612 608 { 613 609 Theta_= new double[m]; … … 715 711 void FIO_SphereThetaPhi<T>::ReadSelf(PInPersist& is) 716 712 { 717 cout << " FIO_SphereThetaPhi:: ReadSelf " << endl;718 713 719 714 if(dobj == NULL) … … 772 767 void FIO_SphereThetaPhi<T>::WriteSelf(POutPersist& os) const 773 768 { 774 cout << " FIO_SphereThetaPhi:: WriteSelf " << endl;775 769 776 770 if(dobj == NULL)
Note:
See TracChangeset
for help on using the changeset viewer.