casacore
|
Modules | |
FITS_module_internal_classes | |
Internal FITS_module classes and functions. | |
Typedefs | |
typedef void(* | casacore::FITSErrorHandler) (const char *errMessage, FITSError::ErrorLevel severity) |
Define a typedef for the handler function signature for convenience. More... | |
Classes and global functions for system use
See below for an overview of the classes in this module.
This module is a bag of related fits classes and global functions.
The following functionality is available:
Class BinaryTable BinaryTable is used to translate a FITS binary table to a Casacore Table. BinaryTable inherits from the FITS BinaryTableExtension class and its primary use is to convert that class to a Casacore Table. The class starts with an already existing FitsInput object, which should be set at a BinaryTableExtension HDU. Member functions provide a TableDesc appropriate for the FITS data (to help in constructing a Casacore Table compatible with the BinaryTableExtension), a Table containing the current row of FITS data and a Table containing the next row of FITS data (which can be used to step through the FitsInput, copying each row using the RowCopier class), and a Table containin the entire FITS binary table from the current row to the end of the table.
We need a way to get FITS data into Casacore Tables.
Class CopyRecordToTable Copies fields from a Record to columns of a Table. This class should be generalized, and made better. It is the analog of RowCopier, i.e. it copies all the fields from some Record to certain columns of a table. The mapping from fields to columns occurs at construction of the CopyRecordToTable object.
This class should be generalized, and made better. It is the analog of RowCopier, i.e. it copies all the fields from some Record to certain columns of a table. The mapping from fields to columns occurs at construction of the CopyRecordToTable object.
NAXIS
keyword, FITS::NAXIS
should be used. Class FITSDateUtil A class with static functions to help deal with FITS dates This is a collection of static utility functions for creating and interpreting FITS date keywords (e.g. DATE-OBS). Its never necessary to construct a FITSDateUtil, just use the static functions to help handle FITS dates.
The strings that make up the value of FITS dates have a precise format. This class encompasses knowlege of the formats used and hopefully simplifies their creation and conversion to and from Casacore MVTimes.
Class FITSError Default FITS error handling function, typdef, and enumeration. FITSError contains the enumeration specifying the possible error message levels. It also contains the default error handling function for the FITS classes.
Originally, FITS error message were simply sent to an ostream. In order to have these error messages go to the Casacore logger by default, this class was added. This was made a separate class because both BlockIo and FITS need to use this class. The anticipated replacements for the current FITS classes use a somewhat similar scheme.
Class FITSHistoryUtil A class with static functions to help deal with FITS History cards. This is a collection of static utility functions for use with FITS HISTORY keywords. Manipulate HISTORY information. FITS HISTORY cards are interconverted with String as follows:
The FitsKeywordList class can be somewhat tedious to use, as it deals with, e.g., char* pointers rather than Strings. This class makes it easy to interconvert between the HISTORY keywords and a Vector of related history information.
Class FITSKeywordUtil A class with static functions to help deal with FITS Keywords. This class provides functions to conveniently interconvert between Casacore types and a FitsKeywordList which is needed by the native FITS classes. It is more convenient to maintain the list within Casacore as a Record, so we only need methods to turn a FitsKeywordList into a Record, and vice versa. Note that it is not necessary to construct a FITSKeywordUtil object since you can use its static functions directly.
The FitsKeywordList class can be somewhat tedious to use, as it deals with, e.g., char* pointers rather than Strings. This class makes it easy to interconvert between FITS keywords and Casacore types.
Class FITSSpectralUtil A class with static functions to help deal with FITS spectral axes. This class provides functions to extract information from a FITS header about the spectral axis, to setup a FITS header with appropriate information for the spectral axis, and to translate to and from the MFrequency refrence frame codes and their FITS equivalents. It is never necessary to construct a FITSSpectralUtil, just use the static functions to help handle FITS Spectral axes.
This is designed to be used after the keywords have been extracted from the FITS file using the FITSKeywordUtil class. Extracting spectral axis and related information requires detailed knowledge of FITS conventions that this class strives to encapsulize.
FitsArray<FitsBit>
FITS array of FitsBit type. FitsField<FitsBit>
Helper class. Class PrimaryArray Templated primary array base class of given type. A Primary Data Array is represented by the following:
For a PrimaryArray, dims() gives the number of dimensions and dim(i) gives the value of the i-th dimension WARNING! Multi-dimensional arrays are stored in FORTRAN order, NOT in C order. Options on the store, copy, and move functions exist to convert from one order to the other, if that is necessary.
It is important to understand the proper sequence of operations with respect to I/O and data access. For input, the ‘read()’ functions allocate an internal buffer of the appropriate size, if not already allocated, as well as reading and converting data; a ‘read()’ function must be performed prior to accessing the data, i. e. before executing any ‘()’, ‘data()’, ‘copy()’, or ‘move()’ function. For output, the ‘store()’ function similarly allocates an internal buffer before transfering data, and must be executed prior to any data access or ‘write()’ function. Note: If you call any version of store(), do not call set_next().
Writing portions of an array at a time, rather than the entire array, is a special case. The ‘set_next()’ function is provided for this purpose. It declares the intention to write out the next N elements and must be executed prior to any ‘data()’ function. It allocates a buffer of appropriate size, if not already allocated. Again, via the ‘data()’ functions, one accesses the array as if the entire array were in memory. The ‘write()’ function always writes the number of current elements in the internal buffer. The sequence of operations for each portion of the array written would be:
The ‘set_next()’ function must NOT be used with ‘read()’ or ‘store()’ functions; unpredictable results will occur.
Class SDFITSTable SDFITSTable is derived from FITSTable. It contains additional checks and behaviour appropriate to the Single Dish FITS Convention hence this is a Single Dish FITS Table, or SDFITSTable. This class behaves much like FITSTable. It additionally verifies that the indicated HDU in the input FITS file follows the SDFITS convention (it has all of the required columns) and it treats keywords as virtual columns when appropriate. These virtual columns will appear as fields in the currentRecord and description and will NOT appear in the keywords.
It was useful to encapsulate this behaviour in a class so that the checks on a valid SDFITS table and the treatment of keywords as virtual columns would not need to appear everywhere it might be used.
Tip: You may want to look at the individual header files to see whether you might not prefer to include only the header files you really need; it may be more efficient to do so;
typedef void(* casacore::FITSErrorHandler) (const char *errMessage, FITSError::ErrorLevel severity) |
Define a typedef for the handler function signature for convenience.
Public interface
Definition at line 111 of file FITSError.h.