GBTAntennaFile.h

Classes

GBTAntennaFile -- GBTAntennaFile digests the FITS file holding GBT Antenna info (full description)

class GBTAntennaFile : public GBTFITSBase

Interface

Public Members
GBTAntennaFile()
GBTAntennaFile(const String &antennaFile)
GBTAntennaFile(const GBTAntennaFile &other)
~GBTAntennaFile()
GBTAntennaFile &operator=(const GBTAntennaFile &other)
Bool attach(const String &antennaFile)
Bool isAttached() const
const String &file() const
const String &opticsType() const
const MPosition &position() const
const Record &pointingModel() const
Bool equalPointingModel(const RecordInterface &other) const
Double equinox() const
MDirection::Types type() const
const String &radesys() const
const String &indicsys() const
Bool isUserCoordSys() const
Bool getPointing(Double time, Double interval, MDirection &j2000, MDirection &user)
Bool fillPointingTable(Table &pointingTable)
Bool getPrimeFocus(Double time, Double interval, Quantity &focus, Quantity &rotation, Quantity &x)
Bool getGregorianFocus(Double time, Double interval, Quantity &xp, Quantity &yp, Quantity &zp, Quantity &xt, Quantity &yt, Quantity &zt)
Bool fillFocusTable(Table &focusTable)
const Table &beamOffsetTable() const
Bool getFeedInfo(Int whichFeed, Double &xeloffset, Double &eloffset, Int &srfeed1, Int &srfeed2, String &feedName) const
uInt nfeeds() const
Int getFeedValue(uInt feedNumber) const
const String trckbeam() const
Private Members
void setDefaults()
void digestAntPosTab(FITSTable &antpostab, const String &extname)
void digestBeamOffTab(FITSTable &beamofftab)
Bool findTimeRange(Double time, Double interval, uInt &startRow, uInt &endRow)
Double getMean(ROScalarColumn<Double> &col, uInt startRow, uInt endRow, Bool canWrap=False)
Double getInterpolated(ROScalarColumn<Double> &col, uInt low, uInt high, Double fraction, Bool canWrap=False)

Description

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

To Do

Member Description

GBTAntennaFile()

This constructs a GBTAntennaFile that is not attached to any FITS file. The indicated default values are returned for the function calls.

GBTAntennaFile(const String &antennaFile)

Construct a GBTAntennaFile attached to the indicated FITS file. Warnings are sent to the logger if there is a problem with the file. In such a case, the resulting object will not be attached to any file. In this way, such a file will be ignored and filling can proceed - having notified the user of the problesm with that file.

GBTAntennaFile(const GBTAntennaFile &other)

Copy constructor.

~GBTAntennaFile()

GBTAntennaFile &operator=(const GBTAntennaFile &other)

Assignment operator, copy semantics.

Bool attach(const String &antennaFile)

attach this object to a new antenna 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.

Bool isAttached() const

Is this object attached to a FITS file.

const String &file() const

The name of the attached FITS file. Returns an empty string if it is not attached.

const String &opticsType() const

The value of the EXTNAME keyword for the ANTPOS* HDU. This indicates the type of optics in use for this scan. Possible values current include ANTPOSPF (prime focus), ANTPOSGR (Gregorian) and ANTPOSST (stow). Defaults to an empty string if not attached.

const MPosition &position() const

The position as determined by the SITE* keywords. This defaults to the value from MeasTable::Observatory for "GBT"

const Record &pointingModel() const

A record containing all of the keywords related to the pointing model. This is all of the keywords not otherwise used plus an OPTICS_TYPE keyword which holds the opticsType() for completeness. Returns an empty record if no file is attached.

Bool equalPointingModel(const RecordInterface &other) const

compares the otherPointingModel record to this one. Returns True if they both contain exactly the same fields, with exactly the same types and values.

Double equinox() const

The EQUINOX value, defaults to 2000.0 if not attached. This is the equinox at the start of the scan.

MDirection::Types type() const

The appropriate MDirection::Types given the RADECSYS keyword value. Returns MDirection::DEFAULT if no file is attached as well as if RADECSYS is "USER". Use isUserType() to check if this is a USER defined coordinate system. At this point, I don't know what to do with such a coordinate system.

const String &radesys() const

return the raw RADECSYS keyword value

const String &indicsys() const

return the raw INDICSYS keyword value

Bool isUserCoordSys() const

Returns TRUE if the INDICSYS keyword is "USER".

Bool getPointing(Double time, Double interval, MDirection &j2000, MDirection &user)

Get the mean pointing values at the given time using the indicated interval. This finds the mean values in that interval centered on time. Returns False if there is no table attached or if the interval falls off of the end of the table. In that case, the values are from the nearest value at that particular end of the table. If the requested interval falls completely between adjacent rows in this table, a simple linear interpolation is used.

Bool fillPointingTable(Table &pointingTable)

Fill the entire pointing information (RAJ2000, DECJ2000, MNT_AZ, MNT_EL, MAJOR and MINOR, and REFRACT) to the indicated Table. Columns are added as necessary. The incremental storage manager is used. The DMJD column is converted to a TIME column of MEpoch in seconds. Returns False if no file is attached. Only Epochs after the last value of any TIME column in pointingTable will be filled.

Bool getPrimeFocus(Double time, Double interval, Quantity &focus, Quantity &rotation, Quantity &x)

Get the mean focus values for the prime focus optics at the given time using the indicated interval.. Returns False if there is no table attached or if the interval falls off the end of the table or if the optics type is not that of prime focus. If the requested interval falls completely between adjacent rows in the table, a simple linear interpolation is used.

Bool getGregorianFocus(Double time, Double interval, Quantity &xp, Quantity &yp, Quantity &zp, Quantity &xt, Quantity &yt, Quantity &zt)

Get the mean focus values for the gregorian optics at the given time using the indicated interval.. Returns False if there is no table attached or if the interval falls off the end of the table or if the optics type is not that of prime focus. If the requested interval falls completely between adjacent rows in the table, a simple linear interpolation is used.

Bool fillFocusTable(Table &focusTable)

Fill the entire focus information to the indicated Table. Columns are addded as necessary. The incremental storage manager is used. The DJMD column is converted to a TIME column of MEpoch in seconds. Returns False if no file is attached. Only times after the last value of any TIME column in focusTable will be filled.

const Table &beamOffsetTable() const

return the beam offset table - defauls to an empty table

Bool getFeedInfo(Int whichFeed, Double &xeloffset, Double &eloffset, Int &srfeed1, Int &srfeed2, String &feedName) const

For a given physical feed number, return the corresponding offsets srfeed1 and srfeed2, and name. Returns -1 if that feed isn't found.

uInt nfeeds() const

how many physical feeds are present

Int getFeedValue(uInt feedNumber) const

get feed value from number, starting from 0 through (nfeeds-1), this can be used in getFeedInfo - returns -1 if outside of the range

const String trckbeam() const

return the tracking beam name

void setDefaults()

set the default values for internals

void digestAntPosTab(FITSTable &antpostab, const String &extname)

digest the EXTNAME=ANTPOS*

void digestBeamOffTab(FITSTable &beamofftab)

digest the BEAM_OFFSETS table

Bool findTimeRange(Double time, Double interval, uInt &startRow, uInt &endRow)

find the first and last row numbers given the indicated time and interval - this assumes that this is attached and that there are rows in the output table

Double getMean(ROScalarColumn<Double> &col, uInt startRow, uInt endRow, Bool canWrap=False)

get the mean value of the indicated column over the indicate row range. canWrap should be true if this is an angle which might go through 360/0

Double getInterpolated(ROScalarColumn<Double> &col, uInt low, uInt high, Double fraction, Bool canWrap=False)

get the interpolated value of the indicated column. Value is found assuming a linear intepolation between the values at the low and high row with the desired value being that at low+fraction. canWrap should be true if this is an angle which might go through 360/0.