Luiza
v03-01
|
Class for handling fits file headers. More...
#include <GloriaFitsHeader.h>
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. | |
HeaderRecord & | GetRecordAt (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. | |
HeaderRecord & | GetKeywordRecord (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 () |
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.
|
inline |
Name of the last input file Empty if image/table was not read from file
Referenced by luiza::FitsTableWriter::concludeAnalysis(), luiza::TableTextWriter::concludeAnalysis(), luiza::FindLineTrajectory::initFit(), luiza::RootTreeWriter::InitializeRootTree(), luiza::ExampleProcessor::processData(), luiza::ImageMedian::processData(), luiza::SimpleImageRotator::processData(), luiza::AstroImageAdder::processData(), luiza::SatelliteSearching::processData(), luiza::PixelClusterFinder::processData(), luiza::Astrometry::processData(), and luiza::FitsImageWriter::processImages().
|
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().
|
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