Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

FitsFile Class Reference

#include <FitsFile.h>

Inheritance diagram for FitsFile:

Inheritance graph
[legend]
Collaboration diagram for FitsFile:

Collaboration graph
[legend]
List of all members.

Detailed Description

Wrapper class to cfitsio.

Encapsulates the low level C interface to a higher level C++ interface. Does not currently handle everything, only those that were needed in some simple applications. This version handles arrays with the Standard Template Library (STL).

Author:
<Paul_Kunz@slac.stanford.edu>

Definition at line 29 of file FitsFile.h.

Public Types

enum  DataType {
  ByteU = TBYTE, Short = TSHORT, ShortU = TUSHORT, Int = TINT,
  IntU = TUINT, Long = TLONG, LongU = TULONG, LongLong = TLONGLONG,
  Float = TFLOAT, Double = TDOUBLE
}
 The data types supported by cfitsio. More...
enum  DataType {
  ByteU = TBYTE, Short = TSHORT, ShortU = TUSHORT, Int = TINT,
  IntU = TUINT, Long = TLONG, LongU = TULONG, LongLong = TLONGLONG,
  Float = TFLOAT, Double = TDOUBLE
}
 The data types supported by cfitsio. More...
enum  HduType { Image = IMAGE_HDU, Atable = ASCII_TBL, Btable = BINARY_TBL, Any = ANY_HDU }
 The type of HDU. More...
enum  HduType { Image = IMAGE_HDU, Atable = ASCII_TBL, Btable = BINARY_TBL, Any = ANY_HDU }
 The type of HDU. More...
enum  ImageType {
  ByteImg = BYTE_IMG, ShortImg = SHORT_IMG, LongImg = LONG_IMG, FloatImg = FLOAT_IMG,
  DoubleImg = DOUBLE_IMG, NoImg = 0
}
 The type of image in HDU. More...
enum  ImageType {
  ByteImg = BYTE_IMG, ShortImg = SHORT_IMG, LongImg = LONG_IMG, FloatImg = FLOAT_IMG,
  DoubleImg = DOUBLE_IMG, NoImg = 0
}
 The type of image in HDU. More...

Public Member Functions

void clearErrorMessageStack (void)
 Clear the entire error message stack.
void clearErrorMessageStack (void)
 Clear the entire error message stack.
double doubleValueForKey (const char *key) const
 Read a specified keyword value and return it as a double.
double doubleValueForKey (const char *key) const
 Read a specified keyword value and return it as a double.
int fillAxisSizes (std::vector< long > &vec) const
 Clears and fills the vector vec with the size of each dimension.
int fillAxisSizes (std::vector< long > &vec) const
 Clears and fills the vector vec with the size of each dimension.
int fillColumnNames (std::vector< std::string > &labels)
 Clears and fills the vector with the column labels of the current HDU table.
int fillColumnNames (std::vector< std::string > &labels)
 Clears and fills the vector with the column labels of the current HDU table.
int fillDoubleVectorFromColumn (std::vector< double > &vec, int column)
 Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.
int fillDoubleVectorFromColumn (std::vector< double > &vec, int column)
 Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.
void fillHDUNames (std::vector< std::string > &names)
 Clears and fills the vector with the HDU names.
void fillHDUNames (std::vector< std::string > &names)
 Clears and fills the vector with the HDU names.
void fillImageDeltas (std::vector< double > &deltas) const
 Clears and fills the vector with the delta values of an image.
void fillImageDeltas (std::vector< double > &deltas) const
 Clears and fills the vector with the delta values of an image.
int fillIntVectorFromColumn (std::vector< int > &vec, int column)
 Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.
int fillIntVectorFromColumn (std::vector< int > &vec, int column)
 Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.
void fillRefPixelIndices (std::vector< int > &indices) const
 Clears and fills the vector with the reference pixel's indexes.
void fillRefPixelIndices (std::vector< int > &indices) const
 Clears and fills the vector with the reference pixel's indexes.
void fillRefPixelValues (std::vector< double > &values) const
 Clears and fills the vector with the reference pixel's values.
void fillRefPixelValues (std::vector< double > &values) const
 Clears and fills the vector with the reference pixel's values.
 FitsFile (const std::string &filename)
 Public construction taking a filename as argument.
 FitsFile (const std::string &filename)
 Public construction taking a filename as argument.
int getHDUNumber () const
 Returns the current HDU number.
int getHDUNumber () const
 Returns the current HDU number.
HduType getHduType () const
 Returns the type of HDU.
HduType getHduType () const
 Returns the type of HDU.
int getNumberOfColumns () const
 Retursn the number of columns in a table.
int getNumberOfColumns () const
 Retursn the number of columns in a table.
int getNumberOfHDU () const
 Returns the number of HDU in the file.
int getNumberOfHDU () const
 Returns the number of HDU in the file.
long getNumberOfRows () const
 Returns the number of rows in the table.
long getNumberOfRows () const
 Returns the number of rows in the table.
bool hasKey (const char *key) const
 Returns true if the keyword key exists, otherwise returns false.
bool hasKey (const char *key) const
 Returns true if the keyword key exists, otherwise returns false.
int intValueForKey (const char *key) const
 Read a specified keyword value and returns it as a int.
int intValueForKey (const char *key) const
 Read a specified keyword value and returns it as a int.
bool isHammerAitoff () const
 Returns true if coordinate system of the axis is should undergo Hammer-Aitoff transformation.
bool isHammerAitoff () const
 Returns true if coordinate system of the axis is should undergo Hammer-Aitoff transformation.
int moveByHDU (int n)
 Move a relative number of HDUs forward or backwards in the FITS file from the current position and return the cfitsio status.
int moveByHDU (int n)
 Move a relative number of HDUs forward or backwards in the FITS file from the current position and return the cfitsio status.
int moveToHDU (const std::string &name)
 Move to a specified absolute HDU with name name in the FITS file and return the cfitsio status.
int moveToHDU (int hdunum)
 Move to a specified absolute HDU number in the FITS file and return the cfitsio status.
int moveToHDU (const std::string &name)
 Move to a specified absolute HDU with name name in the FITS file and return the cfitsio status.
int moveToHDU (int hdunum)
 Move to a specified absolute HDU number in the FITS file and return the cfitsio status.
int numKeywords () const
 Return the number of existing keywords (not counting the END keyword).
int numKeywords () const
 Return the number of existing keywords (not counting the END keyword).
void printKeywordRecords () const
 Print all the keyword records in the CHU.
void printKeywordRecords () const
 Print all the keyword records in the CHU.
int printNumberKeywords () const
 Print the number of keywords and return the status from the cfitsio function.
int printNumberKeywords () const
 Print the number of keywords and return the status from the cfitsio function.
int status () const
 Returns the cfitsio status code for the last operation.
int status () const
 Returns the cfitsio status code for the last operation.
std::string stringValueForKey (const char *key) const
 Read a specified keyword value and returns it as a string.
std::string stringValueForKey (const char *key) const
 Read a specified keyword value and returns it as a string.

Protected Member Functions

int getImageDimensions () const
 Returns the number of dimensions (axes) of an image.
int getImageDimensions () const
 Returns the number of dimensions (axes) of an image.
ImageType getImageType () const
 Returns the image type.
ImageType getImageType () const
 Returns the image type.

Protected Attributes

fitsfilem_fptr
 Pointer to the fits file data structure.
fitsfilem_fptr
 Pointer to the fits file data structure.
int m_status
 The status return code from the last cfitsio operation.

Private Member Functions

int fillFromImage (std::vector< double > &vec)
 Fills the vector vec from an image HDU.
int fillFromImage (std::vector< double > &vec)
 Fills the vector vec from an image HDU.
int fillFromTableColumn (std::vector< double > &vec, int column)
 Fills the vector vec from a table column.
int fillFromTableColumn (std::vector< double > &vec, int column)
 Fills the vector vec from a table column.


Member Enumeration Documentation

enum FitsFileBase::DataType [inherited]
 

The data types supported by cfitsio.

Enumerator:
ByteU  unsigned char
Short  signed short
ShortU  unsigned short
Int  signed integer
IntU  unsigned integer
Long  signed long
LongU  unsigned long
LongLong  signed long long
Float  32 bit floating point
Double  64 bit floating point

Definition at line 53 of file LdfFileBase.h.

enum FitsFileBase::DataType [inherited]
 

The data types supported by cfitsio.

Enumerator:
ByteU  unsigned char
Short  signed short
ShortU  unsigned short
Int  signed integer
IntU  unsigned integer
Long  signed long
LongU  unsigned long
LongLong  signed long long
Float  32 bit floating point
Double  64 bit floating point

Definition at line 53 of file FitsFileBase.h.

enum FitsFileBase::HduType [inherited]
 

The type of HDU.

Enumerator:
Image  Image.
Atable  ASCII table.
Btable  Binary table.
Any  Matchs any.

Definition at line 33 of file LdfFileBase.h.

enum FitsFileBase::HduType [inherited]
 

The type of HDU.

Enumerator:
Image  Image.
Atable  ASCII table.
Btable  Binary table.
Any  Matchs any.

Definition at line 33 of file FitsFileBase.h.

enum FitsFileBase::ImageType [inherited]
 

The type of image in HDU.

Enumerator:
ByteImg  8 bit integer per pixel
ShortImg  16 bit integer per pixel
LongImg  32 bit integer per pixel
FloatImg  32 bit floating point per pixel
DoubleImg  64 bit floating point per pixel
NoImg  not an image HDU

Definition at line 42 of file LdfFileBase.h.

enum FitsFileBase::ImageType [inherited]
 

The type of image in HDU.

Enumerator:
ByteImg  8 bit integer per pixel
ShortImg  16 bit integer per pixel
LongImg  32 bit integer per pixel
FloatImg  32 bit floating point per pixel
DoubleImg  64 bit floating point per pixel
NoImg  not an image HDU

Definition at line 42 of file FitsFileBase.h.


Constructor & Destructor Documentation

FitsFile::FitsFile const std::string filename  ) 
 

Public construction taking a filename as argument.

Definition at line 19 of file FitsFile.cxx.

FitsFile::FitsFile const std::string filename  ) 
 

Public construction taking a filename as argument.


Member Function Documentation

void FitsFileBase::clearErrorMessageStack void   )  [inherited]
 

Clear the entire error message stack.

void FitsFileBase::clearErrorMessageStack void   )  [inherited]
 

Clear the entire error message stack.

Definition at line 36 of file FitsFileBase.cxx.

double FitsFileBase::doubleValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and return it as a double.

Data type conversion will be performed for numeric values if the keyword value does not have the type double. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

double FitsFileBase::doubleValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and return it as a double.

Data type conversion will be performed for numeric values if the keyword value does not have the type double. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

Definition at line 161 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillImageDeltas(), and fillRefPixelValues().

int FitsFile::fillAxisSizes std::vector< long > &  vec  )  const
 

Clears and fills the vector vec with the size of each dimension.

The size of the returned vector gives the number of dimensions.

int FitsFile::fillAxisSizes std::vector< long > &  vec  )  const
 

Clears and fills the vector vec with the size of each dimension.

The size of the returned vector gives the number of dimensions.

Definition at line 110 of file FitsFile.cxx.

References FitsFileBase::getImageDimensions(), FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillFromImage().

int FitsFile::fillColumnNames std::vector< std::string > &  labels  ) 
 

Clears and fills the vector with the column labels of the current HDU table.

int FitsFile::fillColumnNames std::vector< std::string > &  labels  ) 
 

Clears and fills the vector with the column labels of the current HDU table.

Definition at line 51 of file FitsFile.cxx.

References FitsFileBase::getNumberOfColumns(), FitsFileBase::m_fptr, and FitsFileBase::m_status.

int FitsFile::fillDoubleVectorFromColumn std::vector< double > &  vec,
int  column
 

Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.

Parameters:
vec The vector of doubles provided by the caller.
column The index to the column number starting at 1.
Returns:
0 if successful, else the cfitsio status word.
Data is converted to type double if necessary. This routines returns the values of the table column array elements. Data is taken from the first row and first element for a length equal to the size of the vector<double>. Undefined array elements will be returned with a value `0'. The ANYF parameter of the underlying call to the cfitsio function `fits_read_col_dbl()' is ignored.

int FitsFile::fillDoubleVectorFromColumn std::vector< double > &  vec,
int  column
 

Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.

Parameters:
vec The vector of doubles provided by the caller.
column The index to the column number starting at 1.
Returns:
0 if successful, else the cfitsio status word.
Data is converted to type double if necessary. This routines returns the values of the table column array elements. Data is taken from the first row and first element for a length equal to the size of the vector<double>. Undefined array elements will be returned with a value `0'. The ANYF parameter of the underlying call to the cfitsio function `fits_read_col_dbl()' is ignored.

Definition at line 76 of file FitsFile.cxx.

References FitsFileBase::Atable, FitsFileBase::Btable, fillFromImage(), fillFromTableColumn(), FitsFileBase::getHduType(), and num_util::type().

int FitsFile::fillFromImage std::vector< double > &  vec  )  [private]
 

Fills the vector vec from an image HDU.

int FitsFile::fillFromImage std::vector< double > &  vec  )  [private]
 

Fills the vector vec from an image HDU.

Definition at line 227 of file FitsFile.cxx.

References FitsFileBase::Double, fillAxisSizes(), FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillDoubleVectorFromColumn().

int FitsFile::fillFromTableColumn std::vector< double > &  vec,
int  column
[private]
 

Fills the vector vec from a table column.

The first column index is 0, unlike cfitsio.

int FitsFile::fillFromTableColumn std::vector< double > &  vec,
int  column
[private]
 

Fills the vector vec from a table column.

The first column index is 0, unlike cfitsio.

Definition at line 93 of file FitsFile.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillDoubleVectorFromColumn().

void FitsFile::fillHDUNames std::vector< std::string > &  names  ) 
 

Clears and fills the vector with the HDU names.

If an HDU doesn't have a name, one is generated for it.

void FitsFile::fillHDUNames std::vector< std::string > &  names  ) 
 

Clears and fills the vector with the HDU names.

If an HDU doesn't have a name, one is generated for it.

Definition at line 26 of file FitsFile.cxx.

References FitsFileBase::getNumberOfHDU(), FitsFileBase::intValueForKey(), FitsFileBase::moveToHDU(), and FitsFileBase::stringValueForKey().

void FitsFile::fillImageDeltas std::vector< double > &  deltas  )  const
 

Clears and fills the vector with the delta values of an image.

If the delta parameter is not give in the image's header, then use the value 1.0.

void FitsFile::fillImageDeltas std::vector< double > &  deltas  )  const
 

Clears and fills the vector with the delta values of an image.

If the delta parameter is not give in the image's header, then use the value 1.0.

Definition at line 127 of file FitsFile.cxx.

References FitsFileBase::doubleValueForKey(), FitsFileBase::getImageDimensions(), FitsFileBase::hasKey(), and FitsFileBase::m_status.

int FitsFile::fillIntVectorFromColumn std::vector< int > &  vec,
int  column
 

Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.

Parameters:
vec The STL vector of doubles provided by the caller.
column The column index which starts a 1.
Returns:
0 if successful, else the cfitsio status word.
Data is converted to type int if necessary. This routines returns the values of the table column array elements. Data is taken from the first row and first element for a length equal to the size of the vector<int>. Undefined array elements will be returned with a value `0'. The ANYF parameter of the underlying call to the cfitsio function `fits_read_col_dbl()' is ignored.

int FitsFile::fillIntVectorFromColumn std::vector< int > &  vec,
int  column
 

Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.

Parameters:
vec The STL vector of doubles provided by the caller.
column The column index which starts a 1.
Returns:
0 if successful, else the cfitsio status word.
Data is converted to type int if necessary. This routines returns the values of the table column array elements. Data is taken from the first row and first element for a length equal to the size of the vector<int>. Undefined array elements will be returned with a value `0'. The ANYF parameter of the underlying call to the cfitsio function `fits_read_col_dbl()' is ignored.

Definition at line 257 of file FitsFile.cxx.

References std::copy(), FitsFileBase::m_fptr, FitsFileBase::m_status, and FitsFileBase::status().

void FitsFile::fillRefPixelIndices std::vector< int > &  indices  )  const
 

Clears and fills the vector with the reference pixel's indexes.

void FitsFile::fillRefPixelIndices std::vector< int > &  indices  )  const
 

Clears and fills the vector with the reference pixel's indexes.

Definition at line 152 of file FitsFile.cxx.

References FitsFileBase::getImageDimensions(), FitsFileBase::hasKey(), FitsFileBase::intValueForKey(), and FitsFileBase::m_status.

void FitsFile::fillRefPixelValues std::vector< double > &  values  )  const
 

Clears and fills the vector with the reference pixel's values.

void FitsFile::fillRefPixelValues std::vector< double > &  values  )  const
 

Clears and fills the vector with the reference pixel's values.

Definition at line 177 of file FitsFile.cxx.

References FitsFileBase::doubleValueForKey(), FitsFileBase::getImageDimensions(), FitsFileBase::hasKey(), and FitsFileBase::m_status.

int FitsFileBase::getHDUNumber  )  const [inherited]
 

Returns the current HDU number.

The first (primary) HDU has number value = 1.

int FitsFileBase::getHDUNumber  )  const [inherited]
 

Returns the current HDU number.

The first (primary) HDU has number value = 1.

Definition at line 141 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

HduType FitsFileBase::getHduType  )  const [inherited]
 

Returns the type of HDU.

FitsFileBase::HduType FitsFileBase::getHduType  )  const [inherited]
 

Returns the type of HDU.

Definition at line 55 of file FitsFileBase.cxx.

References FitsFileBase::convert(), FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillDoubleVectorFromColumn().

int FitsFileBase::getImageDimensions  )  const [protected, inherited]
 

Returns the number of dimensions (axes) of an image.

int FitsFileBase::getImageDimensions  )  const [protected, inherited]
 

Returns the number of dimensions (axes) of an image.

Definition at line 84 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillAxisSizes(), fillImageDeltas(), fillRefPixelIndices(), and fillRefPixelValues().

ImageType FitsFileBase::getImageType  )  const [protected, inherited]
 

Returns the image type.

FitsFileBase::ImageType FitsFileBase::getImageType  )  const [protected, inherited]
 

Returns the image type.

Definition at line 66 of file FitsFileBase.cxx.

References FitsFileBase::ByteImg, FitsFileBase::DoubleImg, FitsFileBase::FloatImg, FitsFileBase::LongImg, FitsFileBase::m_fptr, FitsFileBase::m_status, FitsFileBase::NoImg, FitsFileBase::ShortImg, and num_util::type().

int FitsFileBase::getNumberOfColumns  )  const [inherited]
 

Retursn the number of columns in a table.

int FitsFileBase::getNumberOfColumns  )  const [inherited]
 

Retursn the number of columns in a table.

Definition at line 260 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillColumnNames().

int FitsFileBase::getNumberOfHDU  )  const [inherited]
 

Returns the number of HDU in the file.

int FitsFileBase::getNumberOfHDU  )  const [inherited]
 

Returns the number of HDU in the file.

Definition at line 96 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillHDUNames().

long FitsFileBase::getNumberOfRows  )  const [inherited]
 

Returns the number of rows in the table.

long FitsFileBase::getNumberOfRows  )  const [inherited]
 

Returns the number of rows in the table.

Definition at line 237 of file FitsFileBase.cxx.

References FitsFileBase::intValueForKey(), FitsFileBase::m_fptr, and FitsFileBase::m_status.

bool FitsFileBase::hasKey const char *  key  )  const [inherited]
 

Returns true if the keyword key exists, otherwise returns false.

bool FitsFileBase::hasKey const char *  key  )  const [inherited]
 

Returns true if the keyword key exists, otherwise returns false.

Definition at line 172 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillImageDeltas(), fillRefPixelIndices(), fillRefPixelValues(), and isHammerAitoff().

int FitsFileBase::intValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and returns it as a int.

Data type conversion will be performed for numeric values if the keyword value does not have the type int. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

int FitsFileBase::intValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and returns it as a int.

Data type conversion will be performed for numeric values if the keyword value does not have the type int. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

Definition at line 184 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillHDUNames(), fillRefPixelIndices(), and FitsFileBase::getNumberOfRows().

bool FitsFile::isHammerAitoff  )  const
 

Returns true if coordinate system of the axis is should undergo Hammer-Aitoff transformation.

bool FitsFile::isHammerAitoff  )  const
 

Returns true if coordinate system of the axis is should undergo Hammer-Aitoff transformation.

Definition at line 202 of file FitsFile.cxx.

References FitsFileBase::hasKey(), FitsFileBase::m_status, and FitsFileBase::stringValueForKey().

int FitsFileBase::moveByHDU int  n  )  [inherited]
 

Move a relative number of HDUs forward or backwards in the FITS file from the current position and return the cfitsio status.

The hdutype parameter of the underlying cfitsio function call to `fits_movrel_hdu()' is irgnored.

int FitsFileBase::moveByHDU int  n  )  [inherited]
 

Move a relative number of HDUs forward or backwards in the FITS file from the current position and return the cfitsio status.

The hdutype parameter of the underlying cfitsio function call to `fits_movrel_hdu()' is irgnored.

Definition at line 130 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

int FitsFileBase::moveToHDU const std::string name  )  [inherited]
 

Move to a specified absolute HDU with name name in the FITS file and return the cfitsio status.

When a FITS file is first opened or created it is automatically positioned to the first HDU (the primary array) in the file which has hdunum = 1.

int FitsFileBase::moveToHDU int  hdunum  )  [inherited]
 

Move to a specified absolute HDU number in the FITS file and return the cfitsio status.

When a FITS file is first opened or created it is automatically positioned to the first HDU (the primary array) in the file which has hdunum = 0 ( = 1 in cfitsio call) . The hdutype parameter of the underlying call to cfitsio function `fits_movabs_hdu()' is igrnoted.

int FitsFileBase::moveToHDU const std::string name  )  [inherited]
 

Move to a specified absolute HDU with name name in the FITS file and return the cfitsio status.

When a FITS file is first opened or created it is automatically positioned to the first HDU (the primary array) in the file which has hdunum = 1.

Definition at line 119 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

int FitsFileBase::moveToHDU int  hdunum  )  [inherited]
 

Move to a specified absolute HDU number in the FITS file and return the cfitsio status.

When a FITS file is first opened or created it is automatically positioned to the first HDU (the primary array) in the file which has hdunum = 0 ( = 1 in cfitsio call) . The hdutype parameter of the underlying call to cfitsio function `fits_movabs_hdu()' is igrnoted.

Definition at line 107 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillHDUNames().

int FitsFileBase::numKeywords  )  const [inherited]
 

Return the number of existing keywords (not counting the END keyword).

Ignornes the parameter in the underlying call to the cfitsio funcation `fits_get_hdrspace()' dealing with the amount of space currently available for more keywords.

int FitsFileBase::numKeywords  )  const [inherited]
 

Return the number of existing keywords (not counting the END keyword).

Ignornes the parameter in the underlying call to the cfitsio funcation `fits_get_hdrspace()' dealing with the amount of space currently available for more keywords.

Definition at line 151 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by FitsFileBase::printKeywordRecords().

void FitsFileBase::printKeywordRecords  )  const [inherited]
 

Print all the keyword records in the CHU.

void FitsFileBase::printKeywordRecords  )  const [inherited]
 

Print all the keyword records in the CHU.

Definition at line 216 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, FitsFileBase::m_status, and FitsFileBase::numKeywords().

int FitsFileBase::printNumberKeywords  )  const [inherited]
 

Print the number of keywords and return the status from the cfitsio function.

int FitsFileBase::printNumberKeywords  )  const [inherited]
 

Print the number of keywords and return the status from the cfitsio function.

Definition at line 203 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

int FitsFileBase::status  )  const [inherited]
 

Returns the cfitsio status code for the last operation.

int FitsFileBase::status  )  const [inherited]
 

Returns the cfitsio status code for the last operation.

Definition at line 230 of file FitsFileBase.cxx.

References FitsFileBase::m_status.

Referenced by fillIntVectorFromColumn().

std::string FitsFileBase::stringValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and returns it as a string.

Data type conversion will be performed for numeric values if the keyword value does not have the type int. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

string FitsFileBase::stringValueForKey const char *  key  )  const [inherited]
 

Read a specified keyword value and returns it as a string.

Data type conversion will be performed for numeric values if the keyword value does not have the type int. If the value of the keyword is undefined (i.e., the value field is blank) then an undefined value will be returned.

Definition at line 193 of file FitsFileBase.cxx.

References FitsFileBase::m_fptr, and FitsFileBase::m_status.

Referenced by fillHDUNames(), and isHammerAitoff().


Member Data Documentation

fitsfile* FitsFileBase::m_fptr [protected, inherited]
 

Pointer to the fits file data structure.

Definition at line 80 of file LdfFileBase.h.

fitsfile* FitsFileBase::m_fptr [protected, inherited]
 

Pointer to the fits file data structure.

Definition at line 80 of file FitsFileBase.h.

Referenced by FitsFileBase::doubleValueForKey(), fillAxisSizes(), fillColumnNames(), fillFromImage(), fillFromTableColumn(), fillIntVectorFromColumn(), FitsFileBase::FitsFileBase(), FitsFileBase::getHDUNumber(), FitsFileBase::getHduType(), FitsFileBase::getImageDimensions(), FitsFileBase::getImageType(), FitsFileBase::getNumberOfColumns(), FitsFileBase::getNumberOfHDU(), FitsFileBase::getNumberOfRows(), FitsFileBase::hasKey(), FitsFileBase::intValueForKey(), FitsFileBase::moveByHDU(), FitsFileBase::moveToHDU(), FitsFileBase::numKeywords(), FitsFileBase::printKeywordRecords(), FitsFileBase::printNumberKeywords(), FitsFileBase::stringValueForKey(), and FitsFileBase::~FitsFileBase().

int FitsFileBase::m_status [mutable, protected, inherited]
 

The status return code from the last cfitsio operation.

Definition at line 77 of file LdfFileBase.h.

Referenced by FitsFileBase::doubleValueForKey(), fillAxisSizes(), fillColumnNames(), fillFromImage(), fillFromTableColumn(), fillImageDeltas(), fillIntVectorFromColumn(), fillRefPixelIndices(), fillRefPixelValues(), FitsFileBase::FitsFileBase(), FitsFileBase::getHDUNumber(), FitsFileBase::getHduType(), FitsFileBase::getImageDimensions(), FitsFileBase::getImageType(), FitsFileBase::getNumberOfColumns(), FitsFileBase::getNumberOfHDU(), FitsFileBase::getNumberOfRows(), FitsFileBase::hasKey(), FitsFileBase::intValueForKey(), isHammerAitoff(), FitsFileBase::moveByHDU(), FitsFileBase::moveToHDU(), FitsFileBase::numKeywords(), FitsFileBase::printKeywordRecords(), FitsFileBase::printNumberKeywords(), FitsFileBase::status(), FitsFileBase::stringValueForKey(), and FitsFileBase::~FitsFileBase().


The documentation for this class was generated from the following files:
Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3