Class for binary table extensions. More...
Inherits ltl::FitsIn.
(Note that these are not member functions.)
Lists representing the FITS header structure.
Class for binary table extensions.
typedef std::list<FitsCard *> ltl::FitsHeader::MandatoryList [protected, inherited] |
typedef MandatoryList::iterator ltl::FitsHeader::MandatoryIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::NaxisList [protected, inherited] |
typedef NaxisList::iterator ltl::FitsHeader::NaxisIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::ExtensionList [protected, inherited] |
typedef ExtensionList::iterator ltl::FitsHeader::ExtensionIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::ObserveList [protected, inherited] |
typedef ObserveList::iterator ltl::FitsHeader::ObserveIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::CommentList [protected, inherited] |
typedef CommentList::iterator ltl::FitsHeader::CommentIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::HistoryList [protected, inherited] |
typedef HistoryList::iterator ltl::FitsHeader::HistoryIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::BlankList [protected, inherited] |
typedef BlankList::iterator ltl::FitsHeader::BlankIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::ArrayList [protected, inherited] |
typedef ArrayList::iterator ltl::FitsHeader::ArrayIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::OtherList [protected, inherited] |
typedef OtherList::iterator ltl::FitsHeader::OtherIter [protected, inherited] |
typedef std::list<FitsCard *> ltl::FitsHeader::JunkList [protected, inherited] |
typedef JunkList::iterator ltl::FitsHeader::JunkIter [protected, inherited] |
ltl::FitsBinTableIn::FitsBinTableIn | ( | const FitsIn & | other | ) |
ltl::FitsBinTableIn::~FitsBinTableIn | ( | ) |
MArray< T, N > ltl::FitsBinTableIn::readColumn | ( | const string & | ttype, | |
const int | startrow = 1 , |
|||
const int | endrow = 0 | |||
) | [inline] |
References ltl::FitsHeader::extension_, and ltl::FitsHeader::findCardInList().
MArray< T, N > ltl::FitsBinTableIn::readColumn | ( | const int | colno, | |
const int | startrow = 1 , |
|||
const int | endrow = 0 | |||
) | [inline] |
References ltl::MArray< T, N >::makeReference().
MArray<T, N> ltl::FitsBinTableIn::readColumn | ( | const int | colno, | |
const int | startrow = 1 , |
|||
int | endrow = 0 | |||
) | [inline] |
MArray< T, N > ltl::FitsBinTableIn::readPColumn | ( | const int | colno, | |
const int | rowno = 1 | |||
) | [inline] |
References ltl::FitsIn::begin(), and ltl::FitsHeader::naxis_array_.
char ltl::FitsBinTableIn::getTformt | ( | const int | colno | ) | const |
size_t ltl::FitsBinTableIn::getTformr | ( | const int | colno | ) | const |
void ltl::FitsIn::freeData | ( | ) | [inherited] |
Unmap data segment, free address space.
virtual void ltl::FitsIn::describeSelf | ( | std::ostream & | os | ) | [virtual, inherited] |
Write FITS file geometry and class interna to out stream.
Reimplemented from ltl::FitsHeader.
unsigned char* ltl::FitsIn::begin | ( | ) | [inherited] |
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::readDataArray(), readPColumn(), and ltl::FitsIn::readRegionArray().
unsigned char* ltl::FitsIn::end | ( | ) | [inherited] |
void ltl::FitsIn::resetPosition | ( | ) | [inherited] |
Referenced by ltl::FitsIn::getNextPixel().
void ltl::FitsIn::setPosition | ( | off_t | offset | ) | [inherited] |
ptrdiff_t ltl::FitsIn::getPosition | ( | ) | [inherited] |
void ltl::FitsIn::setRegion | ( | const util::Region & | fregion | ) | throw (FitsException) [inherited] |
Select region of interest in data segment.
Referenced by ltl::FitsIn::getRegionArray(), ltl::insertFitsMArray(), and ltl::FitsIn::readRegionArray().
void ltl::FitsIn::resetRegion | ( | ) | [inherited] |
Reset region of interest in data segment to full region.
Referenced by ltl::FitsIn::getRegionArray(), ltl::insertFitsMArray(), and ltl::FitsIn::readRegionArray().
FitsHeader ltl::FitsIn::getHeader | ( | ) | const [inherited] |
Return copy of FITS header.
virtual FitsIn ltl::FitsIn::getNextExtension | ( | ) | [virtual, inherited] |
Return input object for next FITS extension when present.
Reimplemented in ltl::FitsExtensionIn.
T * ltl::FitsIn::getRegionArray | ( | const util::Region & | reg | ) | [inline, inherited] |
Return array holding preselected region of data segment.
References ltl::FitsIn::resetRegion(), and ltl::FitsIn::setRegion().
void ltl::FitsIn::readRegionArray | ( | T & | i, | |
const util::Region & | reg | |||
) | [inline, inherited] |
Fill container via iterator i with region reg of data segment.
References ltl::FitsIn::resetRegion(), and ltl::FitsIn::setRegion().
Referenced by ltl::insertFitsMArray(), and ltl::FitsIn::readDataArray().
void ltl::FitsIn::readRegionArray | ( | T & | i | ) | [inline, inherited] |
Fill container via iterator i with preselected region of data segment.
References ltl::FitsIn::begin(), ltl::FitsHeader::bitpix_, ltl::FitsHeader::getBscale(), ltl::FitsHeader::getBzero(), ltl::FitsHeader::getFullRegion(), and ltl::FitsIO::regionptr_.
void ltl::FitsIn::readDataArray | ( | T & | i | ) | [inline, inherited] |
Fill container via iterator i with data segment.
References ltl::FitsIn::begin(), ltl::FitsHeader::bitpix_, ltl::FitsHeader::getBscale(), ltl::FitsHeader::getBzero(), ltl::FitsHeader::getDataLength(), ltl::FitsIn::readRegionArray(), and ltl::FitsIO::regionptr_.
Referenced by ltl::insertFitsMArray().
T * ltl::FitsIn::getDataArray | ( | const | T | ) | [inline, inherited] |
Return array holding data segment.
References ltl::FitsIn::begin(), ltl::FitsHeader::bitpix_, ltl::FitsHeader::getBscale(), ltl::FitsHeader::getBzero(), ltl::FitsHeader::getDataLength(), ltl::FitsHeader::getFullRegion(), and ltl::FitsIO::regionptr_.
Referenced by ltl::getFitsMArray().
T ltl::FitsIn::getNextPixel | ( | const | T | ) | [inline, inherited] |
Read next pixel of datasegment with per pixel read.
References ltl::FitsHeader::bitpix_, ltl::FitsHeader::bscale_, ltl::FitsHeader::bzero_, ltl::FitsIO::fitsstreamptr_, ltl::FitsIn::resetPosition(), and ltl::FitsIO::streampos().
Referenced by ltl::FitsIn::operator>>().
std::string ltl::FitsHeader::adjustKeyword | ( | std::string | keyword | ) | const [inherited] |
Return keyword trimmed (or expanded) to a width of 8 chars.
Trailing blanks are significant for FITS keywords. If you want to add missing trailing blanks or simply trim too long keywords you may want to use this method.
void ltl::FitsHeader::addCommentCard | ( | const std::string & | keyword, | |
const std::string & | comment | |||
) | [inherited] |
Add a commentary card.
void ltl::FitsHeader::addCommentCard | ( | FitsCard * | cardptr | ) | throw (FitsException) [protected, inherited] |
Add a commentary card to the correct list.
void ltl::FitsHeader::addHistory | ( | const std::string & | history | ) | [inherited] |
Add a history of arbitrary length.
void ltl::FitsHeader::addComment | ( | const std::string & | comment | ) | [inherited] |
Add a history of arbitrary length.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const std::string & | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add a string value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const char * | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add a char value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const bool | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add a boolean value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const int | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add an integer value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const long | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add an integer value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const float | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add a floating point value card.
void ltl::FitsHeader::addValueCard | ( | const std::string & | keyword, | |
const double | value, | |||
const std::string | comment = "" , |
|||
const bool | fixed = true | |||
) | [inherited] |
Add a floating point value card.
void ltl::FitsHeader::addValueCard | ( | FitsCard * | cardptr | ) | throw (FitsException) [protected, inherited] |
Add a value holding card to its proper list.
If the card has a bad syntax it's put on the ltl::FitsHeader::junk_ list.
ltl::FitsException | on error. |
int ltl::FitsHeader::eraseCard | ( | const std::string & | keyword | ) | throw (FitsException) [inherited] |
Erase FITS card keyword.
Returns 0 on success, -1 on keyword not found.
ltl::FitsException | on forbidden erasures. |
off_t ltl::FitsHeader::getDataOffset | ( | ) | const [inherited] |
Return the byte offset within the file to the data segment.
int ltl::FitsHeader::getBitpix | ( | ) | const [inherited] |
Return BITPIX setting.
int ltl::FitsHeader::getBytpix | ( | ) | const [inherited] |
Return bytes per pixel, i.e. abs( bitpix_ ) / 8.
int ltl::FitsHeader::getNaxis | ( | ) | const [inherited] |
Return NAXIS setting.
Referenced by ltl::getFitsMArray(), and ltl::insertFitsMArray().
double ltl::FitsHeader::getBscale | ( | ) | const [inherited] |
Return BSCALE setting.
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::readDataArray(), and ltl::FitsIn::readRegionArray().
double ltl::FitsHeader::getBzero | ( | ) | const [inherited] |
Return BZERO setting.
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::readDataArray(), and ltl::FitsIn::readRegionArray().
void ltl::FitsHeader::setBscale | ( | const double | value | ) | [inherited] |
Set the BSCALE key to value.
void ltl::FitsHeader::setBzero | ( | const double | value | ) | [inherited] |
Set the BZERO key to value.
util::Region ltl::FitsHeader::getFullRegion | ( | ) | const [inherited] |
Return a util::Region according to the NAXIS geometry.
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::readRegionArray(), and ltl::FitsOut::writeRegionArray().
off_t ltl::FitsHeader::getDataLength | ( | ) | const [inherited] |
Return the size of the data segment in bytes.
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::readDataArray(), and ltl::FitsOut::writeDataArray().
std::string ltl::FitsHeader::getString | ( | const std::string & | keyword | ) | const [inherited] |
Return string value of FITS key keyword.
bool ltl::FitsHeader::getBool | ( | const std::string & | keyword | ) | const [inherited] |
Return boolean value of FITS key keyword.
long ltl::FitsHeader::getInt | ( | const std::string & | keyword | ) | const [inherited] |
Return integer value of FITS key keyword.
double ltl::FitsHeader::getFloat | ( | const std::string & | keyword | ) | const [inherited] |
Return floating point value of FITS key keyword.
bool ltl::FitsHeader::isFixed | ( | const std::string & | keyword | ) | const [inherited] |
Indicate if value of FITS key keyword is of fixed type.
std::string ltl::FitsHeader::getComment | ( | const std::string & | keyword | ) | const [inherited] |
Return comment of FITS key keyword.
std::string ltl::FitsHeader::getComment | ( | ) | const [inherited] |
Return complete COMMENT.
std::string ltl::FitsHeader::getHistory | ( | ) | const [inherited] |
Return complete HISTORY.
std::string ltl::FitsHeader::getValueAsString | ( | const std::string & | keyword | ) | const [inherited] |
Return value of FITS key keyword as a string irrespective of its type.
std::string ltl::FitsHeader::writeHeader | ( | const bool | with_junk = false |
) | [inherited] |
Return a new valid FITS file format header.
void ltl::FitsHeader::readHeader | ( | const std::string & | filename, | |
const bool | alljunk = false , |
|||
unsigned char * | inmemptr = NULL , |
|||
size_t | inmemlen = 0 | |||
) | throw (FitsException) [protected, inherited] |
Read and parse a FITS header from file.
std::string::size_type ltl::FitsHeader::parseRecord | ( | const std::string & | record, | |
const bool | alljunk = false | |||
) | throw (FitsException) [protected, inherited] |
Parse a FITS record and assign the cards to their proper lists.
Returns the length of the record or 0 if "END" was found.
ltl::FitsException | on error. |
std::string::size_type ltl::FitsHeader::parseMandatory | ( | const std::string & | record | ) | throw (FitsException) [protected, inherited] |
Parse the mandatory keys of record.
Return offset to next non-mandatory card within record.
ltl::FitsException | on error. |
std::string::size_type ltl::FitsHeader::parseNaxis | ( | const std::string & | record, | |
std::string::size_type | card_of_record = 0 | |||
) | [protected, inherited] |
Parse cards until Naxis parameter is matched, returns card offset in record.
void ltl::FitsHeader::checkNaxis | ( | ) | throw (FitsException) [protected, inherited] |
Check the Naxis list, ltl::FitsException on error.
FitsCard* ltl::FitsHeader::parseCard | ( | const std::string & | card | ) | const throw (FitsException) [protected, inherited] |
Parse 80 char line into an ltl::FitsCard object.
std::string ltl::FitsHeader::getCardComment | ( | const std::string & | teststring | ) | const throw (FitsException) [protected, inherited] |
Return the comment of a 80 char line card remainder.
void ltl::FitsHeader::parseCommentToCardList | ( | const std::string & | keyword, | |
const std::string & | comment | |||
) | [protected, inherited] |
Parse and add a commentstring to its list.
Can be long, will be broken into lines)
void ltl::FitsHeader::addJunkCard | ( | const std::string & | native_card | ) | [protected, inherited] |
Just split 80 char card into keyword + rest and push it on the junk list.
void ltl::FitsHeader::addJunkCard | ( | const std::string & | keyword, | |
const std::string & | comment | |||
) | [protected, inherited] |
Add a suitable trimmed junk card.
void ltl::FitsHeader::addJunkCard | ( | FitsCard * | cardptr | ) | [protected, inherited] |
Add a preexisting ltl::FitsCard to junk list.
void ltl::FitsHeader::clearCardList | ( | std::list< FitsCard * > & | the_list | ) | [protected, inherited] |
Clear a whole list of cards.
int ltl::FitsHeader::eraseCardFromList | ( | const std::string & | keyword, | |
std::list< FitsCard * > & | the_list | |||
) | [protected, inherited] |
Erase first ltl::FitsCard mathcing keyword from the_list.
Return -1 if keyword not found, otherwise 0.
int ltl::FitsHeader::eraseCardsFromJunkList | ( | const std::string & | keyword | ) | [protected, inherited] |
Erase all cards matching keyword from the ltl::FitsHeader::junk_ list.
Return the number of erased cards.
FitsCard * ltl::FitsHeader::findCardInList | ( | const std::string & | keyword, | |
const std::list< FitsCard * > & | the_list | |||
) | const [protected, inherited] |
Return pointer to card matching keyword in the_list.
Return NULL if no card is found.
Referenced by readColumn().
FitsCard * ltl::FitsHeader::getValueCard | ( | const std::string & | keyword | ) | const throw (FitsException) [protected, inherited] |
Return pointer to first card matching keyword on any non commentary list.
ltl::FitsException | on error, i.e. no matching card found. |
std::string ltl::FitsHeader::writeCommentsOfList | ( | const std::list< FitsCard * > & | the_list | ) | const [protected, inherited] |
Return string holding new line broken comments of a whole list.
std::string ltl::FitsHeader::writeCardsOfList | ( | const std::list< FitsCard * > & | the_list | ) | const [protected, inherited] |
Return string holding FITS formatted cards of a list.
void ltl::FitsHeader::copy | ( | const FitsHeader & | other | ) | [protected, inherited] |
Copy header from other.
void ltl::FitsHeader::copyCardList | ( | std::list< FitsCard * > & | dest_list, | |
const std::list< FitsCard * > & | src_list | |||
) | [protected, inherited] |
Copy list of ltl::FitsCard.
void ltl::FitsHeader::testRegion | ( | const util::Region & | testreg | ) | const throw (FitsException) [protected, inherited] |
Test if region complies with FITS file geometry.
string ltl::FitsIO::getFilename | ( | ) | const [inline, inherited] |
Return ltl::FitsIO::filename_ .
References ltl::FitsIO::filename_.
unsigned char* ltl::FitsIO::streampos | ( | ) | const [inline, inherited] |
Return ltl::FitsIO::fitsstreamptr_ .
References ltl::FitsIO::fitsstreamptr_.
Referenced by ltl::FitsIn::getNextPixel(), and ltl::FitsOut::setNextPixel().
size_t ltl::FitsIO::getRegionLength | ( | ) | const [inherited] |
Get number of pixels in selected region.
Referenced by ltl::getFitsMArray(), and ltl::insertFitsMArray().
size_t ltl::FitsIO::getRegionLength | ( | const size_t | dim | ) | const [inherited] |
Get length along dimension dim of selected region in pixels.
int ltl::FitsIO::getRegionStart | ( | const size_t | dim | ) | const [inherited] |
Get start pixel coordinate in dimension dim of selected region.
int ltl::FitsIO::getRegionEnd | ( | const size_t | dim | ) | const [inherited] |
Get end pixel coordinate in dimension dim of selected region.
Referenced by ltl::insertFitsMArray().
util::Region ltl::FitsIO::getRegion | ( | ) | const [inherited] |
Return copy of selected region.
Referenced by ltl::insertFitsMArray().
bool ltl::FitsIn::ignore_hd_ [protected, inherited] |
Boolean indicating if header is not parsed.
bool ltl::FitsIn::bint_ [protected, inherited] |
Boolean indicating BSCALE and BZERO being integer.
bool ltl::FitsHeader::shutup_ [protected, inherited] |
Boolean indicating if no error messages shall be written to stderr.
int ltl::FitsHeader::bitpix_ [protected, inherited] |
Shortcuts to FITS keywords BITPIX, abs(BITPIX)/8 and NAXIS.
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsIn::getNextPixel(), ltl::FitsIn::readDataArray(), ltl::FitsIn::readRegionArray(), ltl::FitsOut::setNextPixel(), ltl::FitsOut::writeDataArray(), and ltl::FitsOut::writeRegionArray().
int ltl::FitsHeader::bytpix_ [protected, inherited] |
int ltl::FitsHeader::naxis_ [protected, inherited] |
int* ltl::FitsHeader::naxis_array_ [protected, inherited] |
Pointer to array holding shortcuts to NAXIS keywords.
Referenced by readPColumn().
bool ltl::FitsHeader::extended_ [protected, inherited] |
Shortcut indicating extension maybe present.
int ltl::FitsHeader::pcount_ [protected, inherited] |
Shortcuts for calculating length of extension.
int ltl::FitsHeader::gcount_ [protected, inherited] |
double ltl::FitsHeader::bscale_ [protected, inherited] |
Shortcuts to FITS keywords BSCALE and BZERO.
Referenced by ltl::FitsIn::getNextPixel().
double ltl::FitsHeader::bzero_ [protected, inherited] |
Referenced by ltl::FitsIn::getNextPixel().
off_t ltl::FitsHeader::data_offset_ [protected, inherited] |
Offset to first element of data segment,.
off_t ltl::FitsHeader::data_length_ [protected, inherited] |
Length of data segment in bytes.
const FitsPhysical ltl::FitsHeader::PH_C [static, protected, inherited] |
Structure holding physical FITS sizes.
const FitsKnownList ltl::FitsHeader::KNOWN [static, protected, inherited] |
List of all known keywords and their types.
MandatoryList ltl::FitsHeader::mandatory_ [protected, inherited] |
List holding all mandatory cards.
NaxisList ltl::FitsHeader::naxis_i_ [protected, inherited] |
List holding all NAXIS# cards.
ExtensionList ltl::FitsHeader::extension_ [protected, inherited] |
List holding EXTENSION cards.
Referenced by readColumn().
ltl::FitsHeader::ObserveList ltl::FitsHeader::observe_ [protected, inherited] |
List holding reserved keywords cards which are not on other lists.
These are AUTHOR, BLOCKED, DATE, DATE-OBS, DATExxxx, EQUINOX, EPOCH, INSTRUME, OBJECT, OBSERVER, ORIGIN, REFERENC and TELESCOP. EPOCH will be copied to EQUINOX if EQUINOX not present.
CommentList ltl::FitsHeader::comment_ [protected, inherited] |
List holding the COMMENT cards.
HistoryList ltl::FitsHeader::history_ [protected, inherited] |
List holding the HISTORY cards.
BlankList ltl::FitsHeader::blank_ [protected, inherited] |
List holding the blank cards.
ltl::FitsHeader::ArrayList ltl::FitsHeader::array_ [protected, inherited] |
List holding array keywords cards.
These are BSCALE, BZERO, BUNIT, BLANK, CTYPEn, CRPIXn, CRVALn, CRDELTn, CROTAn, DATAMIN and DATAMAX.
OtherList ltl::FitsHeader::otherkeys_ [protected, inherited] |
List holding all other cards.
JunkList ltl::FitsHeader::junk_ [protected, inherited] |
List holding the cards not complying with FITS standard.
string ltl::FitsIO::filename_ [protected, inherited] |
Filename associated with FitsIn/Out object.
Referenced by ltl::FitsIO::getFilename().
unsigned char* ltl::FitsIO::fitsinmemptr_ [protected, inherited] |
Pointer to in-memory fits file image.
size_t ltl::FitsIO::fitsinmemlength_ [protected, inherited] |
Length of in-memory fits file.
unsigned char** ltl::FitsIO::ptrfitsinmemptr_ [protected, inherited] |
In-memory fits file image allocation data.
size_t* ltl::FitsIO::ptrfitsinmemlength_ [protected, inherited] |
unsigned char* ltl::FitsIO::fitsdataptr_ [protected, inherited] |
Pointer to data segment map.
unsigned char* ltl::FitsIO::fitsstreamptr_ [protected, inherited] |
Pointer to actual byte in data segment for per pixel I/O.
Referenced by ltl::FitsIn::getNextPixel(), ltl::FitsOut::setNextPixel(), and ltl::FitsIO::streampos().
size_t ltl::FitsIO::fitsmaplength_ [protected, inherited] |
Length of data segment map, multiple of page size.
util::Region* ltl::FitsIO::regionptr_ [protected, inherited] |
Pointer to Region (if set).
Referenced by ltl::FitsIn::getDataArray(), ltl::FitsOut::isRegion(), ltl::FitsIn::readDataArray(), ltl::FitsIn::readRegionArray(), and ltl::FitsOut::writeRegionArray().
off_t ltl::FitsIO::fitsregionoffset_ [protected, inherited] |
Offset to determine first pixel of selected region.