Changeset 568 in Sophya for trunk/SophyaLib/Samba/localmap.h


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

ajout doc GLM

File:
1 edited

Legend:

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

    r518 r568  
    1010#include "ppersist.h"
    1111
    12 // A local map of a region of the sky, in cartesian coordinates.
    13 // It has an origin in (theta0, phi0), mapped to pixel(x0, y0)
    14 //   (x0, y0 might be outside of this local map)
    15 // default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2)
     12//! A local map of a region of the sky, in cartesian coordinates.
     13/*! A local map has an origin in (theta0, phi0), mapped to pixel(x0, y0)
     14   (x0, y0 might be outside of this local map)
     15 default value of (x0, y0) is middle of the map, center of pixel(nx/2, ny/2)
     16    A local map is a 2 dimensional array, with i as column index and j
     17    as row index. The map is supposed to lie on a plan tangent to the
     18    celestial sphere in a point whose coordinates are (x0,y0) on the local
     19   map and (theta0, phi0) on the sphere. The range of the map is defined
     20    by two values of angles covered respectively by all the pixels in
     21    x direction and all the pixels in y direction (SetSize()).
     22
     23    A "reference plane" is considered : this plane is tangent to the
     24    celestial sphere in a point with angles theta=Pi/2 and phi=0. This
     25    point is the origine of coordinates is of the reference plane. The
     26    x-axis is the tangent parallel to the equatorial line and oriented
     27    toward the increasing phi's ; the y-axis is parallel to the meridian
     28    line and oriented toward the north pole.
     29   
     30    Internally, a map is first defined within this reference plane and
     31    tranported until the point (theta0, phi0) in such a way that both
     32    axes are kept parallel to meridian and parallel lines of the sphere.
     33    The user can define its own map with axes rotated with respect to
     34    reference axes (this rotation is characterized by angle between
     35    the local parallel line and the wanted x-axis-- see method
     36    SetOrigin(...))
     37*/
    1638//
    1739//    la carte est consideree comme un tableau a deux indices i et j, i etant
     
    5779
    5880/* return/set the number of pixels */
     81/*!    Return number of pixels */
    5982virtual int NbPixels() const;
    6083inline void setNbPixels(int n) {nPix_= n;}
    6184 
    6285/* return the value of pixel number k */
     86/*!    Return value of pixel with index k */
    6387virtual T& PixVal(int k);
     88/*!   const version of previous method */
    6489virtual T const& PixVal(int k) const;
    6590
     
    6792virtual bool ContainsSph(double theta, double phi) const;
    6893/* return the index of pixel at (theta,phi) */
     94/*!    Return index of the pixel with spherical coordinates (theta,phi) */
    6995virtual int PixIndexSph(double theta,double phi) const;
    7096   
    7197/* return the spherical coordinates of center of pixel number k */
     98/*!    Return (theta, phi) coordinates of pixel with index k */
    7299virtual void PixThetaPhi(int k,double& theta,double& phi) const;
    73100
    74101/* return the Pixel Solid angle  (steradians) */
     102/*!    Pixel Solid angle  (steradians)
     103
     104    All the pixels have not necessarly the same size in (theta, phi)
     105    because of the projection scheme which is not yet fixed.
     106*/ 
    75107virtual double PixSolAngle(int k) const;
    76108
    77109// ---------- Specific methods ------------------------------
    78110
     111/*!    Resize storage area for pixels */
    79112void ReSize(int nx, int ny);
    80113
     
    82115 
    83116/* Origin (with angle between x axis and phi axis, in degrees)  x0,y0  the default: middle of map*/
     117/*!    set the referential of the map (angles in degrees)
     118
     119    (default x0=siz_x/2,  y0=siz_y/2)
     120*/
    84121virtual void SetOrigin(double theta=90.,double phi=0.,double angle=0.);
     122/*!    set the referential of the map (angles in degrees) */
    85123virtual void SetOrigin(double theta,double phi,int x0,int y0,double angle=0.);
    86124
    87125/* Pixel size (degres) */
     126/*!    angle range of tthe map (angles in degrees) */
    88127virtual void SetSize(double angleX,double angleY);
    89128
     
    91130inline bool LocalMap_isDone() const {return(originFlag_ && extensFlag_);};
    92131
    93 /* Projection to/from spherical map */
     132/*! Projection to a spherical map */
    94133virtual void Project(SphericalMap<T>& sphere) const;
    95134 
     
    120159
    121160void InitNul();
     161/*!    Return 2 indices corresponding to the pixel number k */
    122162void Getij(int k,int& i,int& j) const;
     163/*!    Transform a pair of coordinates (theta, phi) given in
     164    reference coordinates into map coordinates
     165*/
    123166void ReferenceToUser(double& theta,double& phi) const;
     167/*!    Transform a pair of coordinates (theta, phi) given in
     168   map coordinates into reference coordinates
     169*/
    124170void UserToReference(double& theta,double& phi) const;
     171/*!   Given coordinates in pixel units in the REFERENCE PLANE, return
     172    (theta, phi) in "absolute" referential theta=pi/2 ,phi=0.   
     173*/
    125174void PixProjToAngle(double x,double y,double& theta,double& phi) const;
     175/*!    Given coordinates  (theta, phi) in "absolute" referential
     176    theta=pi/2 ,phi=0  return pixel indices  (i,j) in the REFERENCE PLANE.
     177*/
    126178void AngleProjToPix(double theta,double phi,double& x,double& y) const;
    127179
     
    148200
    149201// ------------- Classe pour la gestion de persistance --
     202//!    Delegated objects for persitance management
    150203template <class T>
    151204class FIO_LocalMap : public PPersist 
     
    161214virtual AnyDataObj* DataObj();
    162215inline operator LocalMap<T>() { return(*dobj); }
    163 inline LocalMap<T> getObj() { return(*dobj); }
     216//inline LocalMap<T> getObj() { return(*dobj); }
    164217
    165218protected :
Note: See TracChangeset for help on using the changeset viewer.