Luiza  v03-01
Classes | Public Member Functions | List of all members
gloria::GloriaFitsHeader Class Reference

Class for handling fits file headers. More...

#include <GloriaFitsHeader.h>

Inheritance diagram for gloria::GloriaFitsHeader:
gloria::GloriaFitsImage gloria::GloriaFitsTable gloria::GloriaObjectList gloria::GloriaSkyCatalog

Classes

struct  HeaderRecord
 Structure to store header records. More...
 

Public Member Functions

 GloriaFitsHeader ()
 Constructor.
 
virtual ~GloriaFitsHeader ()
 Destructor.
 
void ReadFitsHeader (fitsfile *fp)
 Read fits header from file. More...
 
void WriteFitsHeader (fitsfile *fp)
 Write header to fits file. More...
 
int GetKeywordNumber ()
 Number of records defined in the header.
 
HeaderRecordGetRecordAt (const int ikey)
 Access header record by record index.
 
std::string & GetKeywordAt (const int ikey)
 Access header keyword by record index.
 
std::string & GetValueAt (const int ikey)
 Access header value (string) by record index.
 
std::string & GetCommentAt (const int ikey)
 Access header comment by record index.
 
bool IsKeywordSet (const char *keyword)
 Check if given keyword is set in the header.
 
HeaderRecordGetKeywordRecord (const char *keyword)
 Access header record by record index.
 
std::string & GetKeywordValue (const char *keyword)
 Access header value (string) by keyword.
 
long GetKeywordValueInt (const char *keyword)
 Access header value (long int) by keyword.
 
double GetKeywordValueDouble (const char *keyword)
 Access header value (double) by keyword.
 
void AddKeyword (const char *keyword, std::string value, std::string comment)
 Add new keyword to the fits header.
 
void AddKeywordDouble (const char *keyword, double value, std::string comment)
 Add new keyword to the fits header, as double.
 
void AddKeywordInt (const char *keyword, int value, std::string comment)
 Add new keyword to the fits header, as int.
 
void AddKeyword (HeaderRecord record)
 Add new keyword record to the fits header.
 
void SetKeyword (const char *keyword, std::string value, std::string comment)
 Set new value for the existing keyword. Add it if not present.
 
void SetKeywordDouble (const char *keyword, double value, std::string comment)
 Set new value for the existing keyword as double. Add it if not present.
 
void SetKeywordInt (const char *keyword, int value, std::string comment)
 Set new value for the existing keyword as int. Add it if not present.
 
void AddComment (std::string comment)
 Add comment to the header.
 
void AddHistory (std::string history)
 Add history to the header.
 
void RemoveKeyword (const char *keyword)
 Remove given keyword from header. More...
 
void RemoveKeywords (const char *keyword)
 Remove given keyword from header. More...
 
void CopyHeader (GloriaFitsHeader *source)
 Copy full header from given data object (table or image);.
 
void PrintHeader (std::ostream &os, int maxRec=100)
 Print FITS header to output stream. Use maxRec=0 to print all records.
 
bool OK ()
 Method returning true if processing was successful.
 
bool Error ()
 Method returning true if there was an error in data processing.
 
std::string ErrorMessage ()
 Returns error message string.
 
void ClearError ()
 Method returning true if there was an error in data processing.
 
std::string InputFileName ()
 
void SetInputFileName (string name)
 
std::string OutputFileName ()
 

Detailed Description

Class for handling fits file headers.

This class defines methods to access header of fits files. It is used in definition of methods for accessing fits images and tables.

Author
A.F.Zarnecki, University of Warsaw, zarne.nosp@m.cki@.nosp@m.fuw.e.nosp@m.du.p.nosp@m.l

Member Function Documentation

std::string gloria::GloriaFitsHeader::InputFileName ( )
inline
std::string gloria::GloriaFitsHeader::OutputFileName ( )
inline

Name of the last output file. Empty string if image/table was never written to file

void GloriaFitsHeader::ReadFitsHeader ( fitsfile *  fp)

Read fits header from file.

Fits header is read from file and put into header structure. The file has to be opened with call to fitsio library.

Referenced by luiza::PiFitcImageReader::processData().

void GloriaFitsHeader::RemoveKeyword ( const char *  keyword)

Remove given keyword from header.

Only one record is removed, even if the keyword is not unique.

void GloriaFitsHeader::RemoveKeywords ( const char *  keyword)

Remove given keyword from header.

All instances of the keyword are removed

Referenced by luiza::PiFitcImageReader::processData().

void gloria::GloriaFitsHeader::SetInputFileName ( string  name)
inline

Set name considered as an input file Can be used to copy source file name to resulting image/table

Referenced by luiza::ImageMedian::processData(), luiza::PiFitcImageReader::processData(), luiza::SimpleImageRotator::processData(), and luiza::PixelClusterFinder::processData().

void GloriaFitsHeader::WriteFitsHeader ( fitsfile *  fp)

Write header to fits file.

Header compliant to with FITS standard is created


The documentation for this class was generated from the following files: