ltl::FitsIn Class Reference
[MArray FITS file I/O]

Reading FITS data segment, reading and modifying FITS header. More...

Inherits ltl::FitsHeader, and ltl::FitsIO.

Inherited by ltl::FitsExtensionIn.

List of all members.

Card Lists

Lists representing the FITS header structure.

Public Member Functions

Adding new Cards
Shortcuts
Get (and set) values of mandatories and array keys via shortcuts.

Read Cards
Search the lists for card matching keyword and return requested instance.

Protected Member Functions

Parse Record string
The next 4 methods parse a complete 2880 char record into lists of ltl::FitsCards.

Parse Card String
These 2 functions parse a 80 char line card into an ltl::FitsCard.

Protected Attributes

Static Protected Attributes

Friends

Related Functions

(Note that these are not member functions.)

Detailed Description

Reading FITS data segment, reading and modifying FITS header.

Member Typedef Documentation

typedef list<FitsCard *> ltl::FitsHeader::MandatoryList [protected, inherited]

typedef MandatoryList::iterator ltl::FitsHeader::MandatoryIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::NaxisList [protected, inherited]

typedef NaxisList::iterator ltl::FitsHeader::NaxisIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::ExtensionList [protected, inherited]

typedef ExtensionList::iterator ltl::FitsHeader::ExtensionIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::ObserveList [protected, inherited]

typedef ObserveList::iterator ltl::FitsHeader::ObserveIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::CommentList [protected, inherited]

typedef CommentList::iterator ltl::FitsHeader::CommentIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::HistoryList [protected, inherited]

typedef HistoryList::iterator ltl::FitsHeader::HistoryIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::BlankList [protected, inherited]

typedef BlankList::iterator ltl::FitsHeader::BlankIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::ArrayList [protected, inherited]

typedef ArrayList::iterator ltl::FitsHeader::ArrayIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::OtherList [protected, inherited]

typedef OtherList::iterator ltl::FitsHeader::OtherIter [protected, inherited]

typedef list<FitsCard *> ltl::FitsHeader::JunkList [protected, inherited]

typedef JunkList::iterator ltl::FitsHeader::JunkIter [protected, inherited]


Constructor & Destructor Documentation

ltl::FitsIn::FitsIn ( const string &  path,
const bool  quiet_please,
const off_t  startoffset 
) [protected]

construct a extension object

ltl::FitsIn::FitsIn ( const char *  path,
const bool  quiet_please = false,
const bool  ignore_header = false 
)

Construct a FitsIn object from C string filename.

ltl::FitsIn::FitsIn ( const string &  path,
const bool  quiet_please = false,
const bool  ignore_header = false 
)

Construct a FitsIn object from C++ string filename.

ltl::FitsIn::FitsIn ( const char *  path,
const Region freg,
const bool  quiet_please = false,
const bool  ignore_header = false 
)

ltl::FitsIn::FitsIn ( const string &  path,
const Region freg,
const bool  quiet_please = false,
const bool  ignore_header = false 
)

ltl::FitsIn::FitsIn ( const FitsIn other  ) 

Construct as copy from other.

virtual ltl::FitsIn::~FitsIn (  )  [virtual]


Member Function Documentation

void ltl::FitsIn::freeData (  ) 

Unmap data segment, free address space.

virtual void ltl::FitsIn::describeSelf ( ostream &  os  )  [virtual]

Write FITS file geometry and class interna to out stream.

Reimplemented from ltl::FitsHeader.

unsigned char* ltl::FitsIn::begin (  ) 

unsigned char* ltl::FitsIn::end (  ) 

void ltl::FitsIn::resetPosition (  ) 

void ltl::FitsIn::setPosition ( off_t  offset  ) 

ptrdiff_t ltl::FitsIn::getPosition (  ) 

void ltl::FitsIn::setRegion ( const Region fregion  )  throw (FitsException)

Select region of interest in data segment.

void ltl::FitsIn::resetRegion (  ) 

Reset region of interest in data segment to full region.

FitsHeader ltl::FitsIn::getHeader (  )  const

Return copy of FITS header.

virtual FitsIn ltl::FitsIn::getNextExtension (  )  [virtual]

Return input object for next FITS extension when present.

Reimplemented in ltl::FitsExtensionIn.

template<class T>
T * ltl::FitsIn::getRegionArray ( const Region reg  )  [inline]

Return array holding preselected region of data segment.

template<class T>
void ltl::FitsIn::readRegionArray ( T &  i,
const Region reg 
) [inline]

Fill container via iterator i with region reg of data segment.

template<class T>
void ltl::FitsIn::readRegionArray ( T &  i  )  [inline]

Fill container via iterator i with preselected region of data segment.

template<class T>
void ltl::FitsIn::readDataArray ( T &  i  )  [inline]

Fill container via iterator i with data segment.

template<class T>
T * ltl::FitsIn::getDataArray ( const T  dummy  )  [inline]

Return array holding data segment.

template<class T>
T ltl::FitsIn::getNextPixel ( const T  dummy  )  [inline]

Read next pixel of datasegment with per pixel read.

string ltl::FitsHeader::adjustKeyword ( 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 string &  keyword,
const 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 string &  history  )  [inherited]

Add a history of arbitrary length.

void ltl::FitsHeader::addComment ( const string &  comment  )  [inherited]

Add a history of arbitrary length.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const string &  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add a string value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const char *  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add a char value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const bool  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add a boolean value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const int  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add an integer value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const long  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add an integer value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const float  value,
const string  comment = "",
const bool  fixed = true 
) [inherited]

Add a floating point value card.

void ltl::FitsHeader::addValueCard ( const string &  keyword,
const double  value,
const 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.

Exceptions:
ltl::FitsException on error.

int ltl::FitsHeader::eraseCard ( const string &  keyword  )  throw (FitsException) [inherited]

Erase FITS card keyword.

Returns 0 on success, -1 on keyword not found.

Exceptions:
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.

int ltl::FitsHeader::getNaxis ( const int  i  )  const [inherited]

Return width of i NAXIS.

double ltl::FitsHeader::getBscale (  )  const [inherited]

Return BSCALE setting.

double ltl::FitsHeader::getBzero (  )  const [inherited]

Return BZERO setting.

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.

Region ltl::FitsHeader::getFullRegion (  )  const [inherited]

Return a util::Region according to the NAXIS geometry.

off_t ltl::FitsHeader::getDataLength (  )  const [inherited]

Return the size of the data segment in bytes.

string ltl::FitsHeader::getString ( const string &  keyword  )  const [inherited]

Return string value of FITS key keyword.

bool ltl::FitsHeader::getBool ( const string &  keyword  )  const [inherited]

Return boolean value of FITS key keyword.

long ltl::FitsHeader::getInt ( const string &  keyword  )  const [inherited]

Return integer value of FITS key keyword.

double ltl::FitsHeader::getFloat ( const string &  keyword  )  const [inherited]

Return floating point value of FITS key keyword.

bool ltl::FitsHeader::isFixed ( const string &  keyword  )  const [inherited]

Indicate if value of FITS key keyword is of fixed type.

string ltl::FitsHeader::getComment ( const string &  keyword  )  const [inherited]

Return comment of FITS key keyword.

string ltl::FitsHeader::getComment (  )  const [inherited]

Return complete COMMENT.

string ltl::FitsHeader::getHistory (  )  const [inherited]

Return complete HISTORY.

string ltl::FitsHeader::getValueAsString ( const string &  keyword  )  const [inherited]

Return value of FITS key keyword as a string irrespective of its type.

string ltl::FitsHeader::writeHeader ( const bool  with_junk = false  )  [inherited]

Return a new valid FITS file format header.

void ltl::FitsHeader::readHeader ( const string &  filename,
const bool  alljunk = false 
) throw (FitsException) [protected, inherited]

Read and parse a FITS header from file.

string::size_type ltl::FitsHeader::parseRecord ( const 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.

Exceptions:
ltl::FitsException on error.

string::size_type ltl::FitsHeader::parseMandatory ( const string &  record  )  throw (FitsException) [protected, inherited]

Parse the mandatory keys of record.

Return offset to next non-mandatory card within record.

Exceptions:
ltl::FitsException on error.

string::size_type ltl::FitsHeader::parseNaxis ( const string &  record,
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 string &  card  )  const throw (FitsException) [protected, inherited]

Parse 80 char line into an ltl::FitsCard object.

string ltl::FitsHeader::getCardComment ( const string &  teststring  )  const throw (FitsException) [protected, inherited]

Return the comment of a 80 char line card remainder.

void ltl::FitsHeader::parseCommentToCardList ( const string &  keyword,
const 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 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 string &  keyword,
const 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 ( list< FitsCard * > &  the_list  )  [protected, inherited]

Clear a whole list of cards.

int ltl::FitsHeader::eraseCardFromList ( const string &  keyword,
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 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 string &  keyword,
const list< FitsCard * > &  the_list 
) const [protected, inherited]

Return pointer to card matching keyword in the_list.

Return NULL if no card is found.

FitsCard * ltl::FitsHeader::getValueCard ( const string &  keyword  )  const throw (FitsException) [protected, inherited]

Return pointer to first card matching keyword on any non commentary list.

Exceptions:
ltl::FitsException on error, i.e. no matching card found.

string ltl::FitsHeader::writeCommentsOfList ( const list< FitsCard * > &  the_list  )  const [protected, inherited]

Return string holding new line broken comments of a whole list.

string ltl::FitsHeader::writeCardsOfList ( const 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 ( list< FitsCard * > &  dest_list,
const list< FitsCard * > &  src_list 
) [protected, inherited]

Copy list of ltl::FitsCard.

void ltl::FitsHeader::testRegion ( const 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_ .

unsigned char* ltl::FitsIO::streampos (  )  const [inline, inherited]

Return ltl::FitsIO::fitsstreamptr_ .

size_t ltl::FitsIO::getRegionLength (  )  const [inherited]

Get number of pixels in selected region.

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.

Region ltl::FitsIO::getRegion (  )  const [inherited]

Return copy of selected region.


Friends And Related Function Documentation

friend class FitsOut [friend]


Member Data Documentation

bool ltl::FitsIn::ignore_hd_ [protected]

Boolean indicating if header is not parsed.

bool ltl::FitsIn::bint_ [protected]

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.

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.

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.

double ltl::FitsHeader::bzero_ [protected, inherited]

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.

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.

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.

size_t ltl::FitsIO::fitsmaplength_ [protected, inherited]

Length of data segment map, multiple of page size.

Region* ltl::FitsIO::regionptr_ [protected, inherited]

Pointer to Region (if set).

off_t ltl::FitsIO::fitsregionoffset_ [protected, inherited]

Offset to determine first pixel of selected region.


Generated on Wed Mar 11 17:44:36 2009 for LTL by  doxygen 1.5.3