casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casacore::SDFITSTable Class Reference

SDFITSTable is a FITSTable which follows the Single Dish FITS Convention. More...

#include <SDFITSTable.h>

Inheritance diagram for casacore::SDFITSTable:
casacore::FITSTable casacore::FITSTabular

Public Types

enum  CoreKeyword {
  OBJECT,
  TELESCOP,
  BANDWID,
  DATEOBS,
  EXPOSURE,
  TSYS,
  NUM_CORE_KEYWORDS,
  UNKNOWN
}
 the core keywords, UNKNOWN is not a core keyword, NUM_CORE_KEYWORDS is a place holder More...
 

Public Member Functions

 SDFITSTable (const String &fileName, uInt whichHDU=1)
 construct from a file More...
 
 ~SDFITSTable ()
 The destructor. More...
 
virtual Bool reopen (const String &fileName)
 Attach this SDFITSTable to a new file name, same HDU# as at open time. More...
 
virtual Bool isSDFITS () const
 is this a valid SDFITS file More...
 
- Public Member Functions inherited from casacore::FITSTable
 FITSTable (uInt whichHDU=1, Bool allKeywords=False)
 this creates an invalid (isValid() return False) FITSTable Its primary purpose is so that FITSTables can be created before the file name is known. More...
 
 FITSTable (const String &fileName, uInt whichHDU=1, Bool allKeywords=False)
 0-relative HDU. More...
 
 ~FITSTable ()
 
virtual Bool eof () const
 Has the end of file been reached yet. More...
 
virtual const Stringname () const
 return the name More...
 
virtual Bool isValid () const
 isValid() returns False if this object isn't a valid Tabular data structure. More...
 
virtual const TableRecordkeywords () const
 Returns keywords which are associated with the underlying FITS files. More...
 
virtual const RecordDescdescription () const
 Returns the description of the underlying FITS table. More...
 
virtual const Recordunits () 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 RecorddisplayFormats () 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 Recordnulls () 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 Bool pastEnd () const
 Returns True if we have advanced past the end of data. More...
 
virtual void next ()
 Advance the row if possible (guaranteed harmless if pastEnd() is True. More...
 
virtual const RecordcurrentRow () const
 Return the currentRow. More...
 
virtual uInt nrow () const
 single FITS tables know how many rows there are unlike general FITSTabulars, which may not know (e.g. More...
 
virtual Int rownr () const
 these tables should also know where they are More...
 
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 move was successful - this will happen if the requested row was < rownr() or >= nrow() - i.e. More...
 
virtual const TableRecordprimaryKeywords () const
 the keywords from the Primary HDU More...
 
- Public Member Functions inherited from casacore::FITSTabular
virtual ~FITSTabular ()
 
virtual Bool hasChanged () const
 Has the description changed since construction, default is False. More...
 
virtual void resetChangedFlag ()
 reset the changed flag, default do nothing More...
 

Static Public Member Functions

static CoreKeyword coreKeyword (const String &name)
 translate to/from core keyword names to enumeration More...
 
static String coreKeywordName (CoreKeyword kw)
 
- 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

void sdfits_shuffle ()
 the array of keyword names the regular FITSTable::reopen does nearly everything fine, this function moves stuff out of the keywords and into the output record as appropriate More...
 
 SDFITSTable ()
 undefined an inaccessible More...
 
 SDFITSTable (const SDFITSTable &)
 
SDFITSTableoperator= (const SDFITSTable &)
 

Static Private Member Functions

static void init_kwNames ()
 kwNames initialization function More...
 
static Bool isSDFitsColumn (const String &name)
 check to see if the named keyword should be turned into a column, all non-reserved keywords will always be turned into a column. More...
 

Private Attributes

Bool isSDFITS_p
 

Static Private Attributes

static Block< StringkwNames
 block of core keyword names More...
 

Additional Inherited Members

- Protected Member Functions inherited from casacore::FITSTable
Bool virtualColumns (const Vector< String > &keyNames)
 SDFITSTable needs to make some keywords appear as columns, this requires access to description_p, keywords_p, and row_p. More...
 

Detailed Description

SDFITSTable is a FITSTable which follows the Single Dish FITS Convention.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

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.

Synopsis

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.

Example

Motivation

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.

Thrown Exceptions

To Do

Definition at line 86 of file SDFITSTable.h.

Member Enumeration Documentation

the core keywords, UNKNOWN is not a core keyword, NUM_CORE_KEYWORDS is a place holder

Enumerator
OBJECT 
TELESCOP 
BANDWID 
DATEOBS 
EXPOSURE 
TSYS 
NUM_CORE_KEYWORDS 
UNKNOWN 

Definition at line 91 of file SDFITSTable.h.

Constructor & Destructor Documentation

casacore::SDFITSTable::SDFITSTable ( const String fileName,
uInt  whichHDU = 1 
)

construct from a file

casacore::SDFITSTable::~SDFITSTable ( )

The destructor.

casacore::SDFITSTable::SDFITSTable ( )
private

undefined an inaccessible

casacore::SDFITSTable::SDFITSTable ( const SDFITSTable )
private

Member Function Documentation

static CoreKeyword casacore::SDFITSTable::coreKeyword ( const String name)
static

translate to/from core keyword names to enumeration

static String casacore::SDFITSTable::coreKeywordName ( CoreKeyword  kw)
static
static void casacore::SDFITSTable::init_kwNames ( )
staticprivate

kwNames initialization function

virtual Bool casacore::SDFITSTable::isSDFITS ( ) const
inlinevirtual

is this a valid SDFITS file

Definition at line 105 of file SDFITSTable.h.

References isSDFITS_p.

static Bool casacore::SDFITSTable::isSDFitsColumn ( const String name)
staticprivate

check to see if the named keyword should be turned into a column, all non-reserved keywords will always be turned into a column.

SDFITSTable& casacore::SDFITSTable::operator= ( const SDFITSTable )
private
virtual Bool casacore::SDFITSTable::reopen ( const String fileName)
virtual

Attach this SDFITSTable to a new file name, same HDU# as at open time.

Reimplemented from casacore::FITSTable.

void casacore::SDFITSTable::sdfits_shuffle ( )
private

the array of keyword names the regular FITSTable::reopen does nearly everything fine, this function moves stuff out of the keywords and into the output record as appropriate

Member Data Documentation

Bool casacore::SDFITSTable::isSDFITS_p
private

Definition at line 112 of file SDFITSTable.h.

Referenced by isSDFITS().

Block<String> casacore::SDFITSTable::kwNames
staticprivate

block of core keyword names

Definition at line 115 of file SDFITSTable.h.


The documentation for this class was generated from the following file: