Ignore:
Timestamp:
Dec 15, 2000, 11:58:21 AM (25 years ago)
Author:
lemeur
Message:

fonction de manipulation directe de headers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fitsfile.h

    r1352 r1353  
    2020  class FitsInFile;
    2121  class FitsOutFile;
    22  
     22
     23
     24
     25class  FitsKeyword
     26{
     27
     28 public:
     29
     30FitsKeyword();
     31FitsKeyword(string comment);
     32FitsKeyword(string keyname, string value, string comment);
     33void writeOnFits(fitsfile* ptr);
     34
     35void Print();
     36
     37 private:
     38
     39  char datatype_;
     40  string keyname_;
     41  double dvalue_;
     42  int ivalue_;
     43  string svalue_;
     44  string comment_;
     45};
     46
     47
    2348
    2449//
    2550//! Class for managing Interface for SOPHYA objects to FITS Format Files (uses cfitsio lib)
    2651
    27  class FitsIOHandler {
     52class FitsIOHandler {
    2853
    2954
     
    77102   inline void firstImageOnPrimaryHeader(bool choice) {imageOnPrimary_=choice;}
    78103   inline int currentHeaderIndex() {return hdunum_;}
     104   inline fitsfile* fitsfilePtr() {return fptr_;}
    79105 
    80106
     
    107133   int  NbBlocks();
    108134   static void GetBlockType(char flnm[], int hdunum, FitsExtensionType& typeOfExtension, int& naxis, vector<int>& naxisn, FitsDataType& dataType, DVList& dvl  );
    109    void        ReadHeader(int hdunum);
    110  
     135
     136   void  ReadHeader(int hdunum);
     137bool hasKeyword(string keyw, int hdunum);
     138
    111139  /*! \return a reference on a DVList containing the keywords from FITS file */
    112140  inline const DVList& DVListFromFits() const { return dvl_;}
     
    157185/*! \return true if the current header  corresponds to a FITS ASCII or BINTABLE extension */
    158186inline bool IsFitsTable() const {return (hdutype_ == FitsExtensionType_ASCII_TBL || hdutype_ == FitsExtensionType_BINARY_TBL);}
     187
     188
    159189
    160190
     
    195225  void    GetSingleColumn(int_4* map, int nentries) const;
    196226
     227
     228
     229
     230
    197231  private :
    198232
     
    253287
    254288   void makeHeaderBntblOnFits ( string fieldType, vector<string> Noms, int nentries, int tfields, DVList* dvl, string extname,  vector<int> taille_des_chaines) ;
     289   void appendInputHeader(FitsInFile& headerin, int hdunum);
     290   void writeAppendedHeaderOnFits();
     291   void PrintHeaderToBeAppended();
     292   void insertCommentLineOnHeader(string comment);
     293   void insertKeywordOnHeader(string keyname, double value, string comment); 
    255294   void PutColToFits(int nocol, int nentries, r_8* donnees) const;
    256295   void PutColToFits(int nocol, int nentries, r_4* donnees) const;
     
    277316
    278317  DVList* dvlToPrimary_; /**< for transferring keywords when creating primary header */
     318  list<FitsKeyword>  mots_cles_;
     319
    279320 };
    280321
     
    292333   vector<string>  cdata_;
    293334   vector<string> ColName_;
    294 
    295335 };
    296336
    297337
     338
     339
     340
    298341} // Fin du namespace
    299342
    300 
    301343#endif
Note: See TracChangeset for help on using the changeset viewer.