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

GBTAntennaFile digests the FITS file holding GBT Antenna info. More...

#include <GBTAntennaFile.h>

Inheritance diagram for GBTAntennaFile:
GBTFITSBase

List of all members.

Public Member Functions

 GBTAntennaFile ()
 This constructs a GBTAntennaFile that is not attached to any FITS file.
 GBTAntennaFile (const String &antennaFile)
 Construct a GBTAntennaFile attached to the indicated FITS file.
 GBTAntennaFile (const GBTAntennaFile &other)
 Copy constructor.
 ~GBTAntennaFile ()
GBTAntennaFileoperator= (const GBTAntennaFile &other)
 Assignment operator, copy semantics.
Bool attach (const String &antennaFile)
 attach this object to a new antenna file.
Bool isAttached () const
 Is this object attached to a FITS file.
const Stringfile () const
 The name of the attached FITS file.
const StringopticsType () const
 The value of the EXTNAME keyword for the ANTPOS* HDU.
const MPosition & position () const
 The position as determined by the SITE* keywords.
const Record & pointingModel () const
 A record containing all of the keywords related to the pointing model.
Bool equalPointingModel (const RecordInterface &other) const
 compares the otherPointingModel record to this one.
Double equinox () const
 The EQUINOX value, defaults to 2000.0 if not attached.
MDirection::Types type () const
 The appropriate MDirection::Types given the RADECSYS keyword value.
const Stringradesys () const
 return the raw RADECSYS keyword value
const Stringindicsys () 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.
Bool fillPointingTable (Table &pointingTable)
 Fill the entire pointing information (RAJ2000, DECJ2000, MNT_AZ, MNT_EL, MAJOR and MINOR, and REFRACT) to the indicated Table.
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.
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.
Bool fillFocusTable (Table &focusTable)
 Fill the entire focus information to the indicated Table.
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.
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

Private Member Functions

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.
Double getInterpolated (ROScalarColumn< Double > &col, uInt low, uInt high, Double fraction, Bool canWrap=False)
 get the interpolated value of the indicated column.

Private Attributes

Table * itsTable
Table * itsBeamOffTable
Table emptyTable
String itsFileName
Bool itsAttached
String itsExtname
MPosition itsPosition
Record itsPointingKeywords
Double itsEquinox
MDirection::Types itsCoordType
Bool itsIsUser
String itsRadesys
String itsIndicsys
ROScalarColumn< Double > itsDMJD
ROScalarColumn< Double > itsRAJ2000
ROScalarColumn< Double > itsDECJ2000
ROScalarColumn< Double > itsMAJOR
ROScalarColumn< Double > itsMINOR
ROScalarColumn< Double > itsMNT_AZ
ROScalarColumn< Double > itsMNT_EL
ROScalarColumn< Double > itsREFRACT
Unit itsDMJDunit
Unit itsRAunit
Unit itsDECunit
Unit itsMAJORunit
Unit itsMINORunit
Unit itsMNT_AZunit
Unit itsMNT_ELunit
Unit itsREFRACTunit
ROScalarColumn< Double > itsFOCUS
ROScalarColumn< Double > itsROTATION
ROScalarColumn< Double > itsX
ROScalarColumn< Double > itsXP
ROScalarColumn< Double > itsYP
ROScalarColumn< Double > itsZP
ROScalarColumn< Double > itsXT
ROScalarColumn< Double > itsYT
ROScalarColumn< Double > itsZT
Unit itsFOCUSunit
Unit itsROTATIONunit
Unit itsXunit
Unit itsXPunit
Unit itsYPunit
Unit itsZPunit
Unit itsXTunit
Unit itsYTunit
Unit itsZTunit
Double itsLastTime
Double itsLastInterval
Double itsLastStartTime
Double itsLastEndTime
uInt itsLastStart
uInt itsLastEnd
uInt itsLastReturnedStart
uInt itsLastReturnedEnd
Double itsSecondsPerDay
SimpleOrderedMap< Int, Int > itsRowFromFeed
ScalarColumn< StringitsFeedNameCol
ScalarColumn< Double > itsXELOffCol
ScalarColumn< Double > itsELOffCol
ScalarColumn< Int > itsSR1Col
ScalarColumn< Int > itsSR2Col
String itsTrckBeam

Detailed Description

GBTAntennaFile digests the FITS file holding GBT Antenna info.

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

Synopsis

Example

Motivation

Thrown Exceptions

Definition at line 91 of file GBTAntennaFile.h.


Constructor & Destructor Documentation

This constructs a GBTAntennaFile that is not attached to any FITS file.

The indicated default values are returned for the function calls.

GBTAntennaFile::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.

Copy constructor.


Member Function Documentation

Bool GBTAntennaFile::attach ( const String antennaFile) [virtual]

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.

Implements GBTFITSBase.

const Table& GBTAntennaFile::beamOffsetTable ( ) const [inline]

return the beam offset table - defauls to an empty table

Definition at line 211 of file GBTAntennaFile.h.

References emptyTable, and itsBeamOffTable.

void GBTAntennaFile::digestAntPosTab ( FITSTable &  antpostab,
const String extname 
) [private]

digest the EXTNAME=ANTPOS*

void GBTAntennaFile::digestBeamOffTab ( FITSTable &  beamofftab) [private]

digest the BEAM_OFFSETS table

Bool GBTAntennaFile::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 GBTAntennaFile::equinox ( ) const [inline]

The EQUINOX value, defaults to 2000.0 if not attached.

This is the equinox at the start of the scan.

Definition at line 148 of file GBTAntennaFile.h.

References itsEquinox.

const String& GBTAntennaFile::file ( ) const [inline, virtual]

The name of the attached FITS file.

Returns an empty string if it is not attached.

Implements GBTFITSBase.

Definition at line 124 of file GBTAntennaFile.h.

References itsFileName.

Bool GBTAntennaFile::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.

Bool GBTAntennaFile::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 GBTAntennaFile::findTimeRange ( Double  time,
Double  interval,
uInt &  startRow,
uInt &  endRow 
) [private]

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

Bool GBTAntennaFile::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.

Int GBTAntennaFile::getFeedValue ( uInt  feedNumber) const [inline]

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

Definition at line 223 of file GBTAntennaFile.h.

References itsRowFromFeed, and nfeeds().

Bool GBTAntennaFile::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.

Double GBTAntennaFile::getInterpolated ( ROScalarColumn< Double > &  col,
uInt  low,
uInt  high,
Double  fraction,
Bool  canWrap = False 
) [private]

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.

Double GBTAntennaFile::getMean ( ROScalarColumn< Double > &  col,
uInt  startRow,
uInt  endRow,
Bool  canWrap = False 
) [private]

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

Bool GBTAntennaFile::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 GBTAntennaFile::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.

const String& GBTAntennaFile::indicsys ( ) const [inline]

return the raw INDICSYS keyword value

Definition at line 161 of file GBTAntennaFile.h.

References itsIndicsys.

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

Is this object attached to a FITS file.

Reimplemented from GBTFITSBase.

Definition at line 120 of file GBTAntennaFile.h.

References itsAttached.

Bool GBTAntennaFile::isUserCoordSys ( ) const [inline]

Returns TRUE if the INDICSYS keyword is "USER".

Definition at line 164 of file GBTAntennaFile.h.

References itsIsUser.

uInt GBTAntennaFile::nfeeds ( ) const [inline]

how many physical feeds are present

Definition at line 219 of file GBTAntennaFile.h.

References itsRowFromFeed.

Referenced by getFeedValue().

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

Assignment operator, copy semantics.

const String& GBTAntennaFile::opticsType ( ) const [inline]

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.

Definition at line 130 of file GBTAntennaFile.h.

References itsExtname.

const Record& GBTAntennaFile::pointingModel ( ) const [inline]

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.

Definition at line 140 of file GBTAntennaFile.h.

References itsPointingKeywords.

const MPosition& GBTAntennaFile::position ( ) const [inline]

The position as determined by the SITE* keywords.

This defaults to the value from MeasTable::Observatory for "GBT"

Definition at line 134 of file GBTAntennaFile.h.

References itsPosition.

const String& GBTAntennaFile::radesys ( ) const [inline]

return the raw RADECSYS keyword value

Definition at line 158 of file GBTAntennaFile.h.

References itsRadesys.

void GBTAntennaFile::setDefaults ( ) [private]

set the default values for internals

const String GBTAntennaFile::trckbeam ( ) const [inline]

return the tracking beam name

Definition at line 227 of file GBTAntennaFile.h.

References itsTrckBeam.

MDirection::Types GBTAntennaFile::type ( ) const [inline]

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.

Definition at line 155 of file GBTAntennaFile.h.

References itsCoordType.


Member Data Documentation

Table GBTAntennaFile::emptyTable [private]

Definition at line 237 of file GBTAntennaFile.h.

Referenced by beamOffsetTable().

Definition at line 243 of file GBTAntennaFile.h.

Referenced by isAttached().

Definition at line 234 of file GBTAntennaFile.h.

Referenced by beamOffsetTable().

MDirection::Types GBTAntennaFile::itsCoordType [private]

Definition at line 250 of file GBTAntennaFile.h.

Referenced by type().

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

ScalarColumn<Double> GBTAntennaFile::itsELOffCol [private]

Definition at line 277 of file GBTAntennaFile.h.

Double GBTAntennaFile::itsEquinox [private]

Definition at line 249 of file GBTAntennaFile.h.

Referenced by equinox().

Definition at line 246 of file GBTAntennaFile.h.

Referenced by opticsType().

ScalarColumn<String> GBTAntennaFile::itsFeedNameCol [private]

Definition at line 276 of file GBTAntennaFile.h.

Definition at line 240 of file GBTAntennaFile.h.

Referenced by file().

Definition at line 263 of file GBTAntennaFile.h.

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 253 of file GBTAntennaFile.h.

Referenced by indicsys().

Bool GBTAntennaFile::itsIsUser [private]

Definition at line 251 of file GBTAntennaFile.h.

Referenced by isUserCoordSys().

Definition at line 270 of file GBTAntennaFile.h.

Definition at line 269 of file GBTAntennaFile.h.

Definition at line 269 of file GBTAntennaFile.h.

Definition at line 270 of file GBTAntennaFile.h.

Definition at line 270 of file GBTAntennaFile.h.

Definition at line 270 of file GBTAntennaFile.h.

Definition at line 269 of file GBTAntennaFile.h.

Double GBTAntennaFile::itsLastTime [private]

Definition at line 269 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 248 of file GBTAntennaFile.h.

Referenced by pointingModel().

MPosition GBTAntennaFile::itsPosition [private]

Definition at line 247 of file GBTAntennaFile.h.

Referenced by position().

Definition at line 252 of file GBTAntennaFile.h.

Referenced by radesys().

Definition at line 256 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsRAunit [private]

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 256 of file GBTAntennaFile.h.

Definition at line 259 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Definition at line 266 of file GBTAntennaFile.h.

SimpleOrderedMap<Int, Int> GBTAntennaFile::itsRowFromFeed [private]

Definition at line 274 of file GBTAntennaFile.h.

Referenced by getFeedValue(), and nfeeds().

Definition at line 272 of file GBTAntennaFile.h.

ScalarColumn<Int> GBTAntennaFile::itsSR1Col [private]

Definition at line 278 of file GBTAntennaFile.h.

ScalarColumn<Int> GBTAntennaFile::itsSR2Col [private]

Definition at line 278 of file GBTAntennaFile.h.

Table* GBTAntennaFile::itsTable [private]

Definition at line 231 of file GBTAntennaFile.h.

Definition at line 280 of file GBTAntennaFile.h.

Referenced by trckbeam().

Definition at line 263 of file GBTAntennaFile.h.

ScalarColumn<Double> GBTAntennaFile::itsXELOffCol [private]

Definition at line 277 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsXPunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsXTunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsXunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsYPunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsYTunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsZPunit [private]

Definition at line 266 of file GBTAntennaFile.h.

Definition at line 263 of file GBTAntennaFile.h.

Unit GBTAntennaFile::itsZTunit [private]

Definition at line 266 of file GBTAntennaFile.h.


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