#include <FitsFile.h>
Inheritance diagram for FitsFile:
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).
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 | |
fitsfile * | m_fptr |
Pointer to the fits file data structure. | |
fitsfile * | m_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. |
|
The data types supported by cfitsio.
Definition at line 53 of file LdfFileBase.h. |
|
The data types supported by cfitsio.
Definition at line 53 of file FitsFileBase.h. |
|
The type of HDU.
Definition at line 33 of file LdfFileBase.h. |
|
The type of HDU.
Definition at line 33 of file FitsFileBase.h. |
|
The type of image in HDU.
Definition at line 42 of file LdfFileBase.h. |
|
The type of image in HDU.
Definition at line 42 of file FitsFileBase.h. |
|
Public construction taking a filename as argument.
Definition at line 19 of file FitsFile.cxx. |
|
Public construction taking a filename as argument.
|
|
Clear the entire error message stack.
|
|
Clear the entire error message stack.
Definition at line 36 of file FitsFileBase.cxx. |
|
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. |
|
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(). |
|
Clears and fills the vector vec with the size of each dimension. The size of the returned vector gives the number of dimensions. |
|
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(). |
|
Clears and fills the vector with the column labels of the current HDU table.
|
|
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. |
|
Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.
|
|
Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<double> with its contents.
Definition at line 76 of file FitsFile.cxx. References FitsFileBase::Atable, FitsFileBase::Btable, fillFromImage(), fillFromTableColumn(), FitsFileBase::getHduType(), and num_util::type(). |
|
Fills the vector vec from an image HDU.
|
|
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(). |
|
Fills the vector vec from a table column. The first column index is 0, unlike cfitsio. |
|
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(). |
|
Clears and fills the vector with the HDU names. If an HDU doesn't have a name, one is generated for it. |
|
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(). |
|
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. |
|
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. |
|
Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.
|
|
Read elements from an ASCII or binary table column (in the CDU) and fill STL vector<int> with its contents.
Definition at line 257 of file FitsFile.cxx. References std::copy(), FitsFileBase::m_fptr, FitsFileBase::m_status, and FitsFileBase::status(). |
|
Clears and fills the vector with the reference pixel's indexes.
|
|
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. |
|
Clears and fills the vector with the reference pixel's values.
|
|
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. |
|
Returns the current HDU number. The first (primary) HDU has number value = 1. |
|
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. |
|
Returns the type of HDU.
|
|
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(). |
|
Returns the number of dimensions (axes) of an image.
|
|
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(). |
|
Returns the image type.
|
|
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(). |
|
Retursn the number of columns in a table.
|
|
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(). |
|
Returns the number of HDU in the file.
|
|
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(). |
|
Returns the number of rows in the table.
|
|
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. |
|
Returns
|
|
Returns
Definition at line 172 of file FitsFileBase.cxx. References FitsFileBase::m_fptr, and FitsFileBase::m_status. Referenced by fillImageDeltas(), fillRefPixelIndices(), fillRefPixelValues(), and isHammerAitoff(). |
|
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. |
|
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(). |
|
Returns
|
|
Returns
Definition at line 202 of file FitsFile.cxx. References FitsFileBase::hasKey(), FitsFileBase::m_status, and FitsFileBase::stringValueForKey(). |
|
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. |
|
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. |
|
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. |
|
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. |
|
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. |
|
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(). |
|
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. |
|
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(). |
|
Print all the keyword records in the CHU.
|
|
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(). |
|
Print the number of keywords and return the status from the cfitsio function.
|
|
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. |
|
Returns the cfitsio status code for the last operation.
|
|
Returns the cfitsio status code for the last operation.
Definition at line 230 of file FitsFileBase.cxx. References FitsFileBase::m_status. Referenced by fillIntVectorFromColumn(). |
|
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. |
|
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(). |
|
Pointer to the fits file data structure.
Definition at line 80 of file LdfFileBase.h. |
|
|