Go to the documentation of this file.
29 #ifndef FITS_FITSTABLE_H
30 #define FITS_FITSTABLE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Containers/Record.h>
35 #include <casacore/tables/Tables/TableRecord.h>
36 #include <casacore/casa/Containers/Block.h>
37 #include <casacore/fits/FITS/hdu.h>
38 #include <casacore/fits/FITS/fitsio.h>
39 #include <casacore/casa/iosfwd.h>
44 class FITSFieldCopier;
46 template<
class T>
class Vector;
379 const Record &extraKeywords,
457 const Record &extraKeywords,
Simplified interface to create and write to a FITS Binary Table.
virtual Bool reopen(const String &)
Reopen the table, default behavior is to do nothing, return False.
virtual const TableRecord & keywords() const
Returns keywords which are associated with the underlying FITS files.
BinaryTableExtension * raw_table_p
static Record nullsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TNULLnnn from a native-FITS hdu.
FITSTable(const String &fileName, uInt whichHDU=1, Bool allKeywords=False)
0-relative HDU.
virtual const Record & units() const =0
Returns any TUNITnnn associated with a column (the field names are the column names,...
static Record subStringShapeFromHDU(BinaryTableExtension &hdu)
Help function for retrieving any shape information from String columns using the SubString convention...
A drop-in replacement for Block<T*>.
virtual const Record & nulls() const =0
Returns any TNULLnnn associated with a column (the field names are the column names,...
virtual const Record & displayFormats() const
Returns any TDISPnnn associated with a column (the field names are the column names,...
fixed-length sequential blocked FITS output
helper class Note: Note that FitsField does not allocate space for the data; Space is external to Fi...
FITSTableWriter(FitsOutput *file, const RecordDesc &description, const Record &maxLengths, uInt nrows, const Record &extraKeywords, const Record &units, Bool freeOutput=True, const Record &variableShapes=Record())
You MUST have already written a first HDU to FitsOutput.
static Record displayFormatsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TDISPnnn from a native-FITS hdu.
FITSTableWriter()
Undefined and inaccessible.
virtual uInt nrow() const
single FITS tables know how many rows there are unlike general FITSTabulars, which may not know (e....
virtual Bool eof() const
Has the end of file been reached yet.
FITSTableWriter(const FITSTableWriter &)
TableRecord primaryKeys_p
FITSGroupWriter(const FITSGroupWriter &)
RecordInterface & row()
use this to set the value of the current row to be written
virtual const TableRecord & keywords() const =0
Returns keywords which are associated with the underlying FITS files.
Int nrows() const
return basic elements of a table
void check_error(const char *extra_info=0)
Checks error status of writer_p and group_p.
virtual const Record & currentRow() const =0
Return the currentRow.
FitsOutput * writer()
Don't delete this out from under us!
virtual Bool hasChanged() const
Has the description changed since construction, default is False.
Block< Int > field_types_p
virtual const Record & nulls() const
Returns any TNULLnnn associated with a column (the field names are the column names,...
VADescFitsField * va_p
I had trouble making a Block<VADescFitsField>
FITSTableWriter & operator=(const FITSTableWriter &)
Bool virtualColumns(const Vector< String > &keyNames)
SDFITSTable needs to make some keywords appear as columns, this requires access to description_p,...
virtual Int rownr() const
these tables should also know where they are
static TableDesc tableDesc(const FITSTabular &fitstabular)
Get a TableDesc appropriate to hold a FITSTabular the keywords, description, units,...
RecordInterface & row()
Set the values for the current group.
FITSGroupWriter()
Undefined and inaccessible.
Attach a FITSTabular to a binary or ASCII table.
virtual Bool reopen(const String &fileName)
Attach this FITSTable to a new file name, same HDU# as at open time.
virtual const String & name() const
return the name
static FitsOutput * makeWriter(const String &fileName)
Returns a writer, with the first HDU filled in (set to null).
virtual const Record & displayFormats() const =0
Returns any TDISPnnn associated with a column (the field names are the column names,...
PtrBlock< FITSFieldCopier * > copiers_p
virtual const Record & currentRow() const
Return the currentRow.
virtual const Record & units() const
Returns any TUNITnnn associated with a column (the field names are the column names,...
virtual const String & name() const =0
return the name
virtual const RecordDesc & description() const =0
Returns the description of the underlying FITS table.
this file contains all the compiler specific defines
Simplified interface to create and write to FITS random groups.
virtual Bool isValid() const =0
isValid() returns False if this object isn't a valid Tabular data structure.
static TableRecord keywordsFromHDU(HeaderDataUnit &hdu, Bool allKeywords=False)
Helper function for retrieving keywords from a native-FITS hdu.
virtual const RecordDesc & description() const
Returns the description of the underlying FITS table.
virtual Bool isValid() const
isValid() returns False if this object isn't a valid Tabular data structure.
Block< Int > vatypes_p
these are used by VADESC columns
virtual void move(Int torow)
and it should be possible to move to a desired row the rownr() member can be used to verify that a mo...
FITSTable & operator=(const FITSTable &)
FITSGroupWriter & operator=(const FITSGroupWriter &)
virtual void next()=0
Advance the row if possible (guaranteed harmless if pastEnd() is True.
Bool eof() const
test if end of file has been reached
PrimaryGroup< Float > * group_p
void reopenAtFirstHDU(const String &name)
It is necessary to read the PDA to get the primary keywords.
BinaryTableExtension * bintable_p
FITSTable(uInt whichHDU=1, Bool allKeywords=False)
this creates an invalid (isValid() return False) FITSTable Its primary purpose is so that FITSTables ...
virtual const TableRecord & primaryKeywords() const
the keywords from the Primary HDU
String: the storage and methods of handling collections of characters.
virtual Bool pastEnd() const =0
Returns True if we have advanced past the end of data.
void write()
Write the current row()
bool Bool
Define the standard types used by Casacore.
virtual Bool pastEnd() const
Returns True if we have advanced past the end of data.
Block< void * > row_fields_p
uInt nfields_p
One per field in row_p, of the right type.
static Record unitsFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving the TUNITnnn from a native-FITS hdu.
static RecordDesc descriptionFromHDU(BinaryTableExtension &hdu)
Helper function for retrieving a description from a native-FITS hdu.
FITSGroupWriter(const String &fileName, const RecordDesc &description, uInt nrows, const Record &extraKeywords, Bool freeOutput=True)
Since this must always be the first HDU, there is no point in constructing it with a FitsOutput.
FitsOutput * writer()
Don't delete this out from under us!
FITSTable(const FITSTable &)
Undefined and inaccessible.
virtual void next()
Advance the row if possible (guaranteed harmless if pastEnd() is True.
virtual void resetChangedFlag()
reset the changed flag, default do nothing
void write()
Write the current group (row()).