Changeset 565 in Sophya for trunk/SophyaLib/Samba/spheregorski.h


Ignore:
Timestamp:
Nov 10, 1999, 3:01:46 PM (26 years ago)
Author:
ansari
Message:

ajout doc GLM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/Samba/spheregorski.h

    r518 r565  
    1212// ***************** CLASSE SphereGorski *****************************
    1313
     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
    1452template<class T>
    1553class SphereGorski : public SphericalMap<T>,  public AnyDataObj
     
    1957
    2058SphereGorski();
     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*/
    2166SphereGorski(int m);
    2267SphereGorski(const SphereGorski<T>& s);
     68//!     Destructor
    2369virtual ~SphereGorski();
    2470
     
    2672
    2773/* Nombre de pixels du decoupage */
     74/*!    Return number of  pixels of the  splitting */
    2875virtual int NbPixels() const;
    2976inline void setNbPixels(int n) {nPix_= n;}
    3077
    3178/* Valeur du contenu du pixel d'indice "RING" k  */
     79/*!    Return value of  pixel with "RING" index k */
    3280virtual T& PixVal(int k);
    3381virtual T const& PixVal(int k) const;
    3482
    3583/* Nombre de tranches en theta */
     84/*!    Return number of slices in theta direction on the  sphere */
    3685int 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*/
    3794void GetThetaSlice(int index,double& theta,TVector<double>& phi,TVector<T>& value) const;
    3895
     
    4198/* Indice "RING" du pixel vers lequel pointe une direction definie par
    4299ses  coordonnees spheriques */                                   
     100/*!  Return "RING" index of the pixel corresponding to direction (theta, phi).
     101 */
    43102virtual int PixIndexSph(double theta,double phi) const;
    44103
     
    47106
    48107/* 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*/
    49114virtual double PixSolAngle(int dummy) const;
    50115inline void setPixSolAngle(double x) {omeg_= x;}
     
    52117// --------------- Specific methods
    53118
     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*/
    54126virtual void Resize(int m);
    55127
     
    57129
    58130/* Valeur du contenu du pixel d'indice "NEST" k */
     131/*!    Return value of  pixel with "NESTED" index k */
    59132virtual T& PixValNest(int k);
     133/*!    Return value of  pixel with "NESTED" index k */
    60134virtual T const& PixValNest(int k) const;
    61135
    62136/* Indice "NEST" du pixel vers lequel pointe une direction definie par
    63137ses  coordonnees spheriques */                                   
     138/*! Return "NESTED" index of the pixel corresponding to direction (theta, phi).
     139 */
    64140virtual int PixIndexSphNest(double theta,double phi) const;
    65141
    66142/* Coordonnees spheriques du milieu du pixel d'indice "NEST" k       */
     143/*!   Return (theta,phi) coordinates of middle of  pixel with "NESTED" index k
     144 */
    67145virtual void PixThetaPhiNest(int k,double& theta,double& phi) const;
    68146
     
    71149
    72150/* convertit index nested en ring  */
     151/*!    translation from NESTED index  into RING index */
    73152int NestToRing(int) const;
    74153
    75154/* convertit index ring en nested" */
     155/*!    translation from  RING index  into NESTED index */
    76156int RingToNest(int) const;
    77157
     
    127207virtual AnyDataObj* DataObj();
    128208inline operator SphereGorski<T>() { return(*dobj); }
    129 inline SphereGorski<T> getObj() { return(*dobj); }
     209//inline SphereGorski<T> getObj() { return(*dobj); }
    130210
    131211protected :
Note: See TracChangeset for help on using the changeset viewer.