Changeset 565 in Sophya for trunk/SophyaLib/Samba/scan.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/scan.h

    r228 r565  
    77#include <iostream.h>
    88#include "dvlist.h"
    9 class Scan : public PPersist {
     9#include "ndatablock.h"
     10//!   Storage and treatment of data for a scanning of a part of the sky with a set of given values for parameters (see constructor)
    1011
     12class Scan :  public AnyDataObj  {
     13  //  friend FIO_Scan;
    1114  public  :
    1215    /*
     
    2225  . offset d'antenne en angle phi
    2326  */
     27
     28    /*!
     29\verbatim
     30    * Ouv      = aperture angle (rad)
     31    * Omega[3] = direction of rotation axis of the satellite (teta,phi)
     32                 and rotation velocity (rad/s)
     33    * Fech     = sampling frequency  (Hz)
     34    * T        = total time of data acquistion (s)
     35    * t0       = starting time (s)
     36    * phi0     = offset of antenna (rad)
     37\endverbatim
     38    */
    2439Scan(float,float*,float,float,float,float);
    2540Scan(const Scan& );
    2641Scan() {
    2742  InitNull();
    28   cout << " constructeur de scan par defaut" << endl;
    2943}
    3044~Scan();
     
    3246// ------------ Persistence handling
    3347
    34      enum {classId = 0xF003 };
    35 int_4                  ClassId() const        { return classId; }
     48//     enum {classId = 0xF003 };
     49//int_4                  ClassId() const        { return classId; }
    3650
    37 virtual void           WriteSelf(POutPersist&) const;
    38 virtual void           ReadSelf(PInPersist&);
     51//virtual void           WriteSelf(POutPersist&) const;
     52//virtual void           ReadSelf(PInPersist&);
    3953
     54/*!   Return the number of points in the scan */
    4055int_4     NbPoints() const;
     56/*!    Return total nomber of turns */
    4157int_4     NbTours() const;
     58/*!    Return  nomber of points for 1 turn */
    4259int_4     NbPts1Tr() const;
     60/*!    Return index of pixel associated to time t */
    4361int_4     ValueIndex(float) const;
     62/*!    Return  (teta,phi) coordinate of pixel related to time t */
    4463void    Direction(float, float& ,float& );
     64/*!    Return  (teta,phi) coordinates of  pixel with index k */
    4565void    DirectionIndex(int_4,float& ,float& );
    46 double& PixelValue(int_4 k) const;
     66/*!    Return value of pixel with index k */
     67r_8  & PixelValue(int_4 k) ;
     68/*!    const version of previous method */
     69r_8 const & PixelValue(int_4 k) const;
    4770
    4871/* Surcharge de la parenthese a un indice entier : remplit ou/et renvoie */
    4972/* la valeur du contenu du pixel d'indice k                              */
    50 
    51   inline  double&        operator()(int_4 k)
     73 
     74  inline  r_8&    operator()(int_4 k)
    5275                                      { return(PixelValue(k)) ; } ;
     76  inline  r_8 const &    operator()(int_4 k) const
     77                                      { return(PixelValue(k)) ; } ;
     78  Scan& operator = (const Scan& s);
    5379//++
    5480DVList&  Info()
     
    5682//      Renvoie une reference sur l'objet DVList Associe
    5783//--
    58 {
     84{ 
    5985if (mInfo_ == NULL)  mInfo_ = new DVList;
    6086return(*mInfo_);
    6187}
    6288
     89const DVList*  ptrInfo() const
     90  {
     91    return mInfo_;
     92  }
     93
     94
     95
     96inline  void  SetIntParams(int_4 NmaxPts, int_4 NmaxTrs, int_4 NPts1Tr)
     97  {
     98    NmaxPts_=NmaxPts;
     99    NmaxTrs_=NmaxTrs;
     100    NPts1Tr_=NPts1Tr;
     101  }
     102 inline void SetFloatParams(r_4 Ouverture, r_4 OmegaTeta, r_4 OmegaPhi,
     103                            r_4 OmegaRad, r_4 FrequenceEch, r_4 TempsFinal,
     104                            r_4 TempsInitial, r_4 PhiZero, r_8* Rota)
     105   {
     106     Ouverture_    = Ouverture;
     107     OmegaTeta_    = OmegaTeta;
     108     OmegaPhi_     = OmegaPhi;
     109     OmegaRad_     = OmegaRad;
     110     FrequenceEch_ = FrequenceEch;
     111     TempsFinal_   = TempsFinal;
     112     TempsInitial_ = TempsInitial;
     113     PhiZero_      = PhiZero;
     114     for (int k=0; k<9;k++) Rota_[k]=Rota[k];
     115   }
     116
     117 inline void GetFloatParams(r_4& Ouverture, r_4& OmegaTeta, r_4& OmegaPhi,
     118                            r_4& OmegaRad, r_4& FrequenceEch, r_4& TempsFinal,
     119                            r_4& TempsInitial, r_4& PhiZero, r_8* Rota) const
     120   {
     121     Ouverture    = Ouverture_;
     122     OmegaTeta    = OmegaTeta_;
     123     OmegaPhi     = OmegaPhi_;
     124     OmegaRad     = OmegaRad_;
     125     FrequenceEch = FrequenceEch_;
     126     TempsFinal   = TempsFinal_;
     127     TempsInitial = TempsInitial_;
     128     PhiZero      = PhiZero_;
     129     for (int k=0; k<9;k++) Rota[k]=Rota_[k];
     130   }
     131
     132/* retourne le pointeur vers/remplit  le vecteur des contenus des pixels */
     133inline const NDataBlock<r_8>* getDataBlock() const {return (&sPix_);}
     134inline void setDataBlock(r_8* data, int n) {sPix_.FillFrom(n,data);}
    63135
    64136  private :
    65137   
    66 void          Clear();
     138    //void          Clear();
    67139void          InitNull();
    68140
    69 int_4 NmaxPts_;
    70 int_4 NmaxTrs_;
    71 int_4 NPts1Tr_;
    72 r_4   Ouverture_;
    73 r_4   OmegaTeta_;     /* direction de l'axe de rotation du satellite */
    74 r_4   OmegaPhi_;      /* (radians)                                   */
    75 r_4   OmegaRad_;      /* vitesse de rotation du satellite (radians/s) */
    76 r_4   FrequenceEch_;  /* frequence d'echantillonnage (Hz)*/
    77 r_4   TempsFinal_;
    78 r_4   TempsInitial_;
    79 r_4   PhiZero_;       /* Offset antenne (radians)  */
    80 r_8*  sPix_;          /* valeurs contenues dans chaque pixel */
    81 r_8   Rota_[9];       /* matrice de passage : [Xf]=[Rota][Xs] */
     141
     142 int_4 NmaxPts_;
     143 int_4 NmaxTrs_;
     144 int_4 NPts1Tr_;
     145 r_4   Ouverture_;
     146 r_4   OmegaTeta_;     /* direction de l'axe de rotation du satellite */
     147 r_4   OmegaPhi_;      /* (radians)                                   */
     148 r_4   OmegaRad_;      /* vitesse de rotation du satellite (radians/s) */
     149 r_4   FrequenceEch_;  /* frequence d'echantillonnage (Hz)*/
     150 r_4   TempsFinal_;
     151 r_4   TempsInitial_;
     152 r_4   PhiZero_;           /* Offset antenne (radians)  */
     153 NDataBlock<r_8>  sPix_;   /* valeurs contenues dans chaque pixel */
     154 //r_8*  sPix_;            /* valeurs contenues dans chaque pixel */
     155 r_8   Rota_[9];       /* matrice de passage : [Xf]=[Rota][Xs] */
    82156                      /* Xs : coordonnees dans un systeme lie au satellite*/
    83157                      /* Xf : coordonnees dans un repere "fixe"           */
    84 DVList* mInfo_;        // Infos (variables) attachees
     158 DVList* mInfo_;        // Infos (variables) attachees
     159};
     160
     161// ------------- Classe pour la gestion de persistance --
     162//!    Delegated objects for persitance management
     163
     164class FIO_Scan : public PPersist 
     165{
     166
     167public:
     168
     169FIO_Scan();
     170FIO_Scan(string const & filename);
     171FIO_Scan(const Scan& obj);
     172FIO_Scan(Scan* obj);
     173virtual ~FIO_Scan();
     174virtual AnyDataObj* DataObj();
     175inline operator Scan() {return(*dobj); }
     176
     177protected :
     178
     179virtual void ReadSelf(PInPersist&);           
     180virtual void WriteSelf(POutPersist&) const; 
     181Scan* dobj;
     182bool ownobj;
    85183};
    86184
Note: See TracChangeset for help on using the changeset viewer.