casa
5.7.0-16
|
View multiple FITS files as a single table. More...
#include <FITSMultiTable.h>
Public Member Functions | |
FITSMultiTable (const Vector< String > &fileNames, FITSTabular *(*tabMaker)(const String &)=0) | |
The FITS files associated with the fileNames must all have the same description, the second argument is a function to generate the FITSTabular If not specified, a generic FITSTable is assumed. More... | |
~FITSMultiTable () | |
virtual Bool | isValid () const |
isValid() returns False if this object isn't a valid Tabular data structure. More... | |
virtual const TableRecord & | keywords () const |
Returns keywords which are associated with the underlying FITS files. More... | |
virtual const RecordDesc & | description () const |
Returns the description of the underlying FITS table. More... | |
virtual const Record & | units () const |
Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field). More... | |
virtual const Record & | displayFormats () const |
Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field). More... | |
virtual const Record & | nulls () const |
Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field). More... | |
virtual const String & | name () const |
return the name More... | |
virtual Bool | pastEnd () const |
Only returns True when all files are exhausted. More... | |
virtual void | next () |
When end of data is hit on the current file, the next file is opened automatically. More... | |
virtual const Record & | currentRow () const |
Return the currentRow. More... | |
const Vector< String > & | fileNames () const |
get the list of file names More... | |
virtual Bool | hasChanged () const |
Has the descriptor changed from when the file was opened. More... | |
void | resetChangedFlag () |
set hasChanged to False - used after hasChanged has been checked More... | |
Public Member Functions inherited from casacore::FITSTabular | |
virtual | ~FITSTabular () |
virtual Bool | reopen (const String &) |
Reopen the table, default behavior is to do nothing, return False. More... | |
Static Public Member Functions | |
static Vector< String > | filesInTimeRange (const String &directoryName, const Time &startTime, const Time &endTime, Bool verboseErrors=False, Bool verboseStatus=False) |
A helper function to generate a list of fileNames. More... | |
static Time | timeFromFile (const String &fileName) |
return the time as found in the given string using the form given above There are no sanity checks in this subroutine More... | |
Static Public Member Functions inherited from casacore::FITSTabular | |
static TableRecord | keywordsFromHDU (HeaderDataUnit &hdu, Bool allKeywords=False) |
Helper function for retrieving keywords from a native-FITS hdu. More... | |
static RecordDesc | descriptionFromHDU (BinaryTableExtension &hdu) |
Helper function for retrieving a description from a native-FITS hdu. More... | |
static Record | subStringShapeFromHDU (BinaryTableExtension &hdu) |
Help function for retrieving any shape information from String columns using the SubString convention. More... | |
static Record | unitsFromHDU (BinaryTableExtension &hdu) |
Helper function for retrieving the TUNITnnn from a native-FITS hdu. More... | |
static Record | displayFormatsFromHDU (BinaryTableExtension &hdu) |
Helper function for retrieving the TDISPnnn from a native-FITS hdu. More... | |
static Record | nullsFromHDU (BinaryTableExtension &hdu) |
Helper function for retrieving the TNULLnnn from a native-FITS hdu. More... | |
static TableDesc | tableDesc (const FITSTabular &fitstabular) |
Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units, displayFormats, and nulls are all used. More... | |
Private Member Functions | |
FITSMultiTable () | |
Undefined and inaccessible. More... | |
FITSMultiTable (const FITSMultiTable &other) | |
FITSMultiTable & | operator= (const FITSMultiTable &other) |
FITSTabular * | defaultMaker (const String &fileName) |
Private Attributes | |
FITSTabular * | table_p |
Vector< String > | file_names_p |
uInt | nfiles_p |
uInt | which_file_p |
Bool | hasChanged_p |
Record | row_p |
View multiple FITS files as a single table.
Internal
A FITSMultiTable is used to view a collection of FITS files on disk as a single Table. That is, when next() is called, when one Table ends the next is reopened until all files are exhausted. The FITS files must all have the same description. Something clever should be done about the keywords.
Definition at line 65 of file FITSMultiTable.h.
casacore::FITSMultiTable::FITSMultiTable | ( | const Vector< String > & | fileNames, |
FITSTabular *(*)(const String &) | tabMaker = 0 |
||
) |
The FITS files associated with the fileNames must all have the same description, the second argument is a function to generate the FITSTabular If not specified, a generic FITSTable is assumed.
The returned pointer IS controlled by this object.
casacore::FITSMultiTable::~FITSMultiTable | ( | ) |
|
private |
Undefined and inaccessible.
|
private |
|
virtual |
Return the currentRow.
This is guaranteed to be valid so long as only member functions of this base class are called (so you can safely attach RecordFieldPtr objects to it. The result is undefined if pastEnd() is True.
Implements casacore::FITSTabular.
|
private |
|
virtual |
Returns the description of the underlying FITS table.
Implements casacore::FITSTabular.
|
virtual |
Returns any TDISPnnn associated with a column (the field names are the column names, each field value is the TDISPnnn value for that field).
Note that only those columns with a non-empty TDISPnnn have an entry in the displayFormats() Record.
Implements casacore::FITSTabular.
|
static |
A helper function to generate a list of fileNames.
This function returns all the files in "directoryName" which have the form yyyy_mm_dd_hh:mm:ss_*.fits and which are (even partially) in the time range specified by startTime and endTime. It is used to generate a set of file names for use in the FITSMultiTable constructor. If verboseStatus is True, some status messages appear on cout. If verboseErrors is True improperly named files names (not matching the above pattern) are named on cerrt.
|
inlinevirtual |
Has the descriptor changed from when the file was opened.
Reimplemented from casacore::FITSTabular.
Definition at line 96 of file FITSMultiTable.h.
References hasChanged_p.
|
virtual |
isValid() returns False if this object isn't a valid Tabular data structure.
Implements casacore::FITSTabular.
|
virtual |
Returns keywords which are associated with the underlying FITS files.
Implements casacore::FITSTabular.
|
inlinevirtual |
return the name
Implements casacore::FITSTabular.
Definition at line 83 of file FITSMultiTable.h.
References casacore::FITSTabular::name(), and table_p.
|
virtual |
When end of data is hit on the current file, the next file is opened automatically.
Implements casacore::FITSTabular.
|
virtual |
Returns any TNULLnnn associated with a column (the field names are the column names, each field value is the TNULLnnn value for that field).
Note that only those columns with a specific entry for TNULLnnn and which have not been promoted to doubles due TSCAL and TZERO values will have an entry in the nulls() Record. The meaning of TNULL is only defined for integer and byte columns. When a column is promoted to a double because of scaling, any TNULL values will be assigned a value of NaN.
Implements casacore::FITSTabular.
|
private |
|
virtual |
Only returns True when all files are exhausted.
Implements casacore::FITSTabular.
|
inlinevirtual |
set hasChanged to False - used after hasChanged has been checked
Reimplemented from casacore::FITSTabular.
Definition at line 99 of file FITSMultiTable.h.
References casacore::False, and hasChanged_p.
return the time as found in the given string using the form given above There are no sanity checks in this subroutine
|
virtual |
Returns any TUNITnnn associated with a column (the field names are the column names, each field value is the TUNITnnn value for that field).
Note that only those columns with a non-empty TUNITnnn have an entry in the units() Record.
Implements casacore::FITSTabular.
Definition at line 125 of file FITSMultiTable.h.
Referenced by fileNames().
|
private |
Definition at line 128 of file FITSMultiTable.h.
Referenced by hasChanged(), and resetChangedFlag().
|
private |
Definition at line 126 of file FITSMultiTable.h.
|
private |
Definition at line 130 of file FITSMultiTable.h.
|
private |
Definition at line 123 of file FITSMultiTable.h.
Referenced by name().
|
private |
Definition at line 127 of file FITSMultiTable.h.