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

FitsFileBase Class Reference

#include <FitsFileBase.h>

Inheritance diagram for FitsFileBase:

Inheritance graph
[legend]
Collaboration diagram for FitsFileBase:

Collaboration graph
[legend]
List of all members.

Detailed Description

A base class for the concrete classes that wrap the cfitsio library.

Implemented in this class are those items that do not handle arrays of data. See the derived class FitsFile for handling arrays with STL. Other derived classes may use other classes for handling arrays.

Author:
Paul F. Kunz <Paul_Kunz@slac.stanford.edu>

Definition at line 27 of file FitsFileBase.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 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.
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.
virtual ~FitsFileBase ()
 Virtual destructor.
virtual ~FitsFileBase ()
 Virtual destructor.

Protected Member Functions

 FitsFileBase (const std::string &filename)
 Protected construction taking a filename as argument.
 FitsFileBase (const std::string &filename)
 Protected construction taking a filename as argument.
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

 FitsFileBase (const FitsFileBase &)
 Disallow copying.
 FitsFileBase (const FitsFileBase &)
 Disallow copying.
FitsFileBaseoperator= (const FitsFileBase &)
 Disallow assignment.
FitsFileBaseoperator= (const FitsFileBase &)
 Disallow assignment.

Static Private Member Functions

static HduType convert (int i)
 Converts an integer to HduType.
static HduType convert (int i)
 Converts an integer to HduType.


Member Enumeration Documentation

enum FitsFileBase::DataType
 

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
 

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
 

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
 

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
 

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
 

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

FitsFileBase::FitsFileBase const std::string filename  )  [protected]
 

Protected construction taking a filename as argument.

Definition at line 24 of file FitsFileBase.cxx.

References m_fptr, and m_status.

FitsFileBase::~FitsFileBase  )  [virtual]
 

Virtual destructor.

Definition at line 30 of file FitsFileBase.cxx.

References m_fptr, and m_status.

FitsFileBase::FitsFileBase const FitsFileBase  )  [private]
 

Disallow copying.

FitsFileBase::FitsFileBase const std::string filename  )  [protected]
 

Protected construction taking a filename as argument.

virtual FitsFileBase::~FitsFileBase  )  [virtual]
 

Virtual destructor.

FitsFileBase::FitsFileBase const FitsFileBase  )  [private]
 

Disallow copying.


Member Function Documentation

void FitsFileBase::clearErrorMessageStack void   ) 
 

Clear the entire error message stack.

void FitsFileBase::clearErrorMessageStack void   ) 
 

Clear the entire error message stack.

Definition at line 36 of file FitsFileBase.cxx.

static HduType FitsFileBase::convert int  i  )  [static, private]
 

Converts an integer to HduType.

FitsFileBase::HduType FitsFileBase::convert int  i  )  [static, private]
 

Converts an integer to HduType.

Definition at line 44 of file FitsFileBase.cxx.

References Any, Atable, Btable, and Image.

Referenced by getHduType().

double FitsFileBase::doubleValueForKey const char *  key  )  const
 

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
 

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 m_fptr, and m_status.

Referenced by FitsFile::fillImageDeltas(), and FitsFile::fillRefPixelValues().

int FitsFileBase::getHDUNumber  )  const
 

Returns the current HDU number.

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

int FitsFileBase::getHDUNumber  )  const
 

Returns the current HDU number.

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

Definition at line 141 of file FitsFileBase.cxx.

References m_fptr, and m_status.

HduType FitsFileBase::getHduType  )  const
 

Returns the type of HDU.

FitsFileBase::HduType FitsFileBase::getHduType  )  const
 

Returns the type of HDU.

Definition at line 55 of file FitsFileBase.cxx.

References convert(), m_fptr, and m_status.

Referenced by FitsFile::fillDoubleVectorFromColumn().

int FitsFileBase::getImageDimensions  )  const [protected]
 

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

int FitsFileBase::getImageDimensions  )  const [protected]
 

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

Definition at line 84 of file FitsFileBase.cxx.

References m_fptr, and m_status.

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

ImageType FitsFileBase::getImageType  )  const [protected]
 

Returns the image type.

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

Returns the image type.

Definition at line 66 of file FitsFileBase.cxx.

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

int FitsFileBase::getNumberOfColumns  )  const
 

Retursn the number of columns in a table.

int FitsFileBase::getNumberOfColumns  )  const
 

Retursn the number of columns in a table.

Definition at line 260 of file FitsFileBase.cxx.

References m_fptr, and m_status.

Referenced by FitsFile::fillColumnNames().

int FitsFileBase::getNumberOfHDU  )  const
 

Returns the number of HDU in the file.

int FitsFileBase::getNumberOfHDU  )  const
 

Returns the number of HDU in the file.

Definition at line 96 of file FitsFileBase.cxx.

References m_fptr, and m_status.

Referenced by FitsFile::fillHDUNames().

long FitsFileBase::getNumberOfRows  )  const
 

Returns the number of rows in the table.

long FitsFileBase::getNumberOfRows  )  const
 

Returns the number of rows in the table.

Definition at line 237 of file FitsFileBase.cxx.

References intValueForKey(), m_fptr, and m_status.

bool FitsFileBase::hasKey const char *  key  )  const
 

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

bool FitsFileBase::hasKey const char *  key  )  const
 

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

Definition at line 172 of file FitsFileBase.cxx.

References m_fptr, and m_status.

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

int FitsFileBase::intValueForKey const char *  key  )  const
 

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
 

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 m_fptr, and m_status.

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

int FitsFileBase::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.

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

int FitsFileBase::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.

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

Definition at line 130 of file FitsFileBase.cxx.

References m_fptr, and m_status.

int FitsFileBase::moveToHDU const std::string name  ) 
 

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  ) 
 

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  ) 
 

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 m_fptr, and m_status.

int FitsFileBase::moveToHDU int  hdunum  ) 
 

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 m_fptr, and m_status.

Referenced by FitsFile::fillHDUNames().

int FitsFileBase::numKeywords  )  const
 

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
 

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 m_fptr, and m_status.

Referenced by printKeywordRecords().

FitsFileBase& FitsFileBase::operator= const FitsFileBase  )  [private]
 

Disallow assignment.

FitsFileBase& FitsFileBase::operator= const FitsFileBase  )  [private]
 

Disallow assignment.

void FitsFileBase::printKeywordRecords  )  const
 

Print all the keyword records in the CHU.

void FitsFileBase::printKeywordRecords  )  const
 

Print all the keyword records in the CHU.

Definition at line 216 of file FitsFileBase.cxx.

References m_fptr, m_status, and numKeywords().

int FitsFileBase::printNumberKeywords  )  const
 

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

int FitsFileBase::printNumberKeywords  )  const
 

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

Definition at line 203 of file FitsFileBase.cxx.

References m_fptr, and m_status.

int FitsFileBase::status  )  const
 

Returns the cfitsio status code for the last operation.

int FitsFileBase::status  )  const
 

Returns the cfitsio status code for the last operation.

Definition at line 230 of file FitsFileBase.cxx.

References m_status.

Referenced by FitsFile::fillIntVectorFromColumn().

std::string FitsFileBase::stringValueForKey const char *  key  )  const
 

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
 

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 m_fptr, and m_status.

Referenced by FitsFile::fillHDUNames(), and FitsFile::isHammerAitoff().


Member Data Documentation

fitsfile* FitsFileBase::m_fptr [protected]
 

Pointer to the fits file data structure.

Definition at line 80 of file LdfFileBase.h.

fitsfile* FitsFileBase::m_fptr [protected]
 

Pointer to the fits file data structure.

Definition at line 80 of file FitsFileBase.h.

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

int FitsFileBase::m_status [mutable, protected]
 

The status return code from the last cfitsio operation.

Definition at line 77 of file LdfFileBase.h.

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


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