casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
GBTFITSBase Class Reference

A base class for GBT FITS files - primary keywords. More...

#include <GBTFITSBase.h>

Inheritance diagram for GBTFITSBase:
GBTAntennaFile GBTGOFile GBTLO1File

List of all members.

Public Member Functions

 GBTFITSBase ()
 This constructs a GBTFITSBase that has no primary keywords.
 GBTFITSBase (const GBTFITSBase &other)
 Copy constructor.
virtual ~GBTFITSBase ()
GBTFITSBaseoperator= (const GBTFITSBase &other)
 Assignment operator, copy semantics.
virtual Bool attach (const String &fitsFile)=0
 attach this object to a new FITS file.
virtual Bool isAttached () const
 Is this object attached to a FITS file.
virtual const Stringfile () const =0
 The name of the attached FITS file.
virtual Bool setPrimaryKeys (const Record &keys, Bool scanlog=False)
 Attach this base class to a new primary keyword record.
virtual const Record & primaryKeys () const
 The record containing the primary keywords.
virtual const Vector< Bool > & usedPrimaryKeys () const
 A vector indicating which keywords in primaryKeys() have been used so (either by this base class or by a derived class).
virtual Bool markAsUsed (const String &keywordName)
 Mark the indicated keyword as being used.
virtual Record unusedPrimaryKeys () const
 Returns a record containing just the unused keywords.
virtual const Stringorigin () const
 ORIGIN - where this file originated.
virtual const Stringinstrume () const
 INSTRUME - device or program of origin.
virtual const StringmcVersion () const
 GBTMCVER - telescope control software release Default value: empty string.
virtual const StringfitsVers () const
 FITSVER - FITS definition version for this device.
virtual Int baseVersion () const
 Leading integer (before decimal) in FITSVER - version of base class.
virtual Int deviceVersion () const
 Trailing integer (after decimal) in FITS - version of device.
virtual const Stringdatebld () const
 DATEBLD - time program was linked Default value: empty string.
virtual Bool simulate () const
 SIMULATE - is the instrument in simulate mode? Default value: F.
virtual const MEpoch & dateObs () const
 DATE-OBS - Manager parameter startTime Default value: MEpoch(0, MEpoch::Ref(MEpoch::UTC)) This also uses the TIMESYS keyword when present (UTC is assumed if not)
virtual const Stringtelescop () const
 TELESCOP - green bank telescope Default value: GBT.
virtual const Stringobject () const
 OBJECT - source Default value: empty string.
virtual const Stringprojid () const
 PROJID - project ID Default value: empty string.
virtual const Stringobsid () const
 OBSID - scan id Default value: empty string.
virtual Int scan () const
 SCAN - scan number Default value: -1.

Static Public Member Functions

static Int stringToInt (const String &str)
 utility method to convert strings to integers
static Double stringToDouble (const String &str)
 utility method to convert strings to doubles
static Table * tableFromFITS (FITSTable &fits)
 utility to construct a scratch table from a FITSTable.

Private Member Functions

void init ()
 fill in the default values, clean up internals

Private Attributes

Record itsKeys
Vector< Bool > itsUsedKeys
String itsOrigin
String itsInstrume
String itsMCVersion
String itsFitsVer
String itsDatebld
String itsTelescop
String itsObject
String itsProjid
String itsObsid
Int itsBaseVer
Int itsDeviceVer
Int itsScan
Bool itsSimulate
MEpoch itsDateObs

Detailed Description

A base class for GBT FITS files - primary keywords.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Synopsis

Example

Motivation

GBT FITS files have several required keywords common to all of them. This class provides access to those fields and provides default values for older FITS files where the required keywords were not present. Specific classes for specific types of GBT FITS files are derived from this class. Only the record of keywords from the primary HDU are decoded here.

Thrown Exceptions

Definition at line 86 of file GBTFITSBase.h.


Constructor & Destructor Documentation

This constructs a GBTFITSBase that has no primary keywords.

Copy constructor.

virtual GBTFITSBase::~GBTFITSBase ( ) [inline, virtual]

Definition at line 95 of file GBTFITSBase.h.


Member Function Documentation

virtual Bool GBTFITSBase::attach ( const String fitsFile) [pure virtual]

attach this object to a new FITS file.

If there are problems with the file, the return value is False and appropriate warnings are sent to the logger. The resulting object is not attached to any file.

Implemented in GBTAntennaFile, GBTLO1File, and GBTGOFile.

virtual Int GBTFITSBase::baseVersion ( ) const [inline, virtual]

Leading integer (before decimal) in FITSVER - version of base class.

Definition at line 157 of file GBTFITSBase.h.

References itsBaseVer.

virtual const String& GBTFITSBase::datebld ( ) const [inline, virtual]

DATEBLD - time program was linked Default value: empty string.

Definition at line 164 of file GBTFITSBase.h.

References itsDatebld.

virtual const MEpoch& GBTFITSBase::dateObs ( ) const [inline, virtual]

DATE-OBS - Manager parameter startTime Default value: MEpoch(0, MEpoch::Ref(MEpoch::UTC)) This also uses the TIMESYS keyword when present (UTC is assumed if not)

Definition at line 173 of file GBTFITSBase.h.

References itsDateObs.

virtual Int GBTFITSBase::deviceVersion ( ) const [inline, virtual]

Trailing integer (after decimal) in FITS - version of device.

Definition at line 160 of file GBTFITSBase.h.

References itsDeviceVer.

virtual const String& GBTFITSBase::file ( ) const [pure virtual]

The name of the attached FITS file.

Returns an empty string if it is not attached.

Implemented in GBTAntennaFile, GBTLO1File, and GBTGOFile.

virtual const String& GBTFITSBase::fitsVers ( ) const [inline, virtual]

FITSVER - FITS definition version for this device.

Default value: "0.0"

Definition at line 154 of file GBTFITSBase.h.

References itsFitsVer.

void GBTFITSBase::init ( ) [private]

fill in the default values, clean up internals

Reimplemented in GBTLO1File, and GBTGOFile.

virtual const String& GBTFITSBase::instrume ( ) const [inline, virtual]

INSTRUME - device or program of origin.

Default value: empty string.

Definition at line 146 of file GBTFITSBase.h.

References itsInstrume.

virtual Bool GBTFITSBase::isAttached ( ) const [inline, virtual]

Is this object attached to a FITS file.

This base class is never attached to a file.

Reimplemented in GBTAntennaFile, GBTLO1File, and GBTGOFile.

Definition at line 107 of file GBTFITSBase.h.

References casa::False.

virtual Bool GBTFITSBase::markAsUsed ( const String keywordName) [virtual]

Mark the indicated keyword as being used.

Returns False if the keyword is not found.

virtual const String& GBTFITSBase::mcVersion ( ) const [inline, virtual]

GBTMCVER - telescope control software release Default value: empty string.

Definition at line 150 of file GBTFITSBase.h.

References itsMCVersion.

virtual const String& GBTFITSBase::object ( ) const [inline, virtual]

OBJECT - source Default value: empty string.

Definition at line 182 of file GBTFITSBase.h.

References itsObject.

virtual const String& GBTFITSBase::obsid ( ) const [inline, virtual]

OBSID - scan id Default value: empty string.

Definition at line 190 of file GBTFITSBase.h.

References itsObsid.

GBTFITSBase& GBTFITSBase::operator= ( const GBTFITSBase other)

Assignment operator, copy semantics.

virtual const String& GBTFITSBase::origin ( ) const [inline, virtual]

ORIGIN - where this file originated.

Default value: "NRAO Green Bank"

Definition at line 142 of file GBTFITSBase.h.

References itsOrigin.

virtual const Record& GBTFITSBase::primaryKeys ( ) const [inline, virtual]

The record containing the primary keywords.

Definition at line 123 of file GBTFITSBase.h.

References itsKeys.

virtual const String& GBTFITSBase::projid ( ) const [inline, virtual]

PROJID - project ID Default value: empty string.

Definition at line 186 of file GBTFITSBase.h.

References itsProjid.

virtual Int GBTFITSBase::scan ( ) const [inline, virtual]

SCAN - scan number Default value: -1.

Definition at line 194 of file GBTFITSBase.h.

References itsScan.

virtual Bool GBTFITSBase::setPrimaryKeys ( const Record &  keys,
Bool  scanlog = False 
) [virtual]

Attach this base class to a new primary keyword record.

This resets all of the internals (including usedPrimaryKeys()). Usually, a derived classes implementation of attach() will invoke this function at some point. Returns false if any of the expected keywords for this FITSVER were not found. If scanlog is True, then the more limited set of keywords for the scanlog will be expected.

virtual Bool GBTFITSBase::simulate ( ) const [inline, virtual]

SIMULATE - is the instrument in simulate mode? Default value: F.

Definition at line 168 of file GBTFITSBase.h.

References itsSimulate.

static Double GBTFITSBase::stringToDouble ( const String str) [static]

utility method to convert strings to doubles

static Int GBTFITSBase::stringToInt ( const String str) [static]

utility method to convert strings to integers

static Table* GBTFITSBase::tableFromFITS ( FITSTable &  fits) [static]

utility to construct a scratch table from a FITSTable.

It is the responsibility of the calling entity to delete the returned pointer.

virtual const String& GBTFITSBase::telescop ( ) const [inline, virtual]

TELESCOP - green bank telescope Default value: GBT.

The string NRAO_GBT is changed to GBT for use within AIPS++.

Definition at line 178 of file GBTFITSBase.h.

References itsTelescop.

virtual Record GBTFITSBase::unusedPrimaryKeys ( ) const [virtual]

Returns a record containing just the unused keywords.

virtual const Vector<Bool>& GBTFITSBase::usedPrimaryKeys ( ) const [inline, virtual]

A vector indicating which keywords in primaryKeys() have been used so (either by this base class or by a derived class).

The index here is the fieldNumber of the desired key. If that element is True, its value has been used. Standard keywords required by the FITS standard (e.g. SIMPLE, BITPIX, NAXIS, EXTEND, and END) are always marked as used.

Definition at line 131 of file GBTFITSBase.h.

References itsUsedKeys.


Member Data Documentation

Int GBTFITSBase::itsBaseVer [private]

Definition at line 212 of file GBTFITSBase.h.

Referenced by baseVersion().

Definition at line 210 of file GBTFITSBase.h.

Referenced by datebld().

MEpoch GBTFITSBase::itsDateObs [private]

Definition at line 214 of file GBTFITSBase.h.

Referenced by dateObs().

Definition at line 212 of file GBTFITSBase.h.

Referenced by deviceVersion().

Definition at line 210 of file GBTFITSBase.h.

Referenced by fitsVers().

Definition at line 210 of file GBTFITSBase.h.

Referenced by instrume().

Record GBTFITSBase::itsKeys [private]

Definition at line 207 of file GBTFITSBase.h.

Referenced by primaryKeys().

Definition at line 210 of file GBTFITSBase.h.

Referenced by mcVersion().

Definition at line 210 of file GBTFITSBase.h.

Referenced by object().

Definition at line 210 of file GBTFITSBase.h.

Referenced by obsid().

Definition at line 210 of file GBTFITSBase.h.

Referenced by origin().

Definition at line 210 of file GBTFITSBase.h.

Referenced by projid().

Int GBTFITSBase::itsScan [private]

Definition at line 212 of file GBTFITSBase.h.

Referenced by scan().

Bool GBTFITSBase::itsSimulate [private]

Definition at line 213 of file GBTFITSBase.h.

Referenced by simulate().

Definition at line 210 of file GBTFITSBase.h.

Referenced by telescop().

Vector<Bool> GBTFITSBase::itsUsedKeys [private]

Definition at line 208 of file GBTFITSBase.h.

Referenced by usedPrimaryKeys().


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