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

This holds information about a specific feed with IFs. More...

#include <GBTFeed.h>

List of all members.

Public Member Functions

 GBTFeed ()
 The default feed.
 GBTFeed (Double xeloffset, Double eloffset, const String &feedName, Int srfeed1, Int srfeed2, const String &trckbeam)
 A specific feed with the values taken directly from one row of the BEAM_OFFSETS table.
 GBTFeed (const GBTFeed &other)
 Copy constructor.
 ~GBTFeed ()
GBTFeedoperator= (const GBTFeed &other)
 Assignment operator, copy semantics.
Int feedId () const
 This is the filled FEED_ID from the MS.
void setFeedId (Int feedid)
 Set the filled FEED_ID.
Int srFeedId () const
 This is the filled FEED_ID from the MS corresponding to the switched beam (i.e.
void setSRFeedId (Int srfeedid)
 Set the filled GBT_SRFEED_ID.
uInt nif () const
 The number of associated GBTIFs.
const GBTIFgetIF (uInt whichIF) const
 Get a specific GBTIF.
GBTIFgetIF (uInt whichIF)
 Get one to possibly modify.
Int addUniqueIF (const GBTIF &newIF, Bool mergeCorr, Bool bankCheck)
 Add a new GBTIF - copies the values over, only adds if the IF is unique.
void setReceiver (const String &receiver)
 Set the receiver name.
const Stringreceiver () const
 Get the receiver name.
Bool addReceptor (const String &pol, const String &receptorName)
 Add a receptor of a given polarization.
void freeze ()
 Freezes the number of receptors.
uInt numReceptors () const
 The number of receptors.
const Vector< String > & polType () const
 Returns the set of known receptors for this feed once the feed has been frozen.
const Vector< String > & receptorNames () const
 The names of the receptors as know in the IF FITS file once the feed has been frozen.
const Matrix< Double > & offsets () const
 Return the offsets - to be used when filling the MS::FEED table.
const Int fitsFeedId () const
 Return the feed number as it is known in the original FITS file, This is a direct translation of the String NAME column in the FITS file to an integer.
const String name () const
 The original feed name.
const String trckbeam () const
 The tracking beam string.
const Int srFitsFeedId () const
 Return the associated switching feed number as it appears in the FITS table as dediced from the SRFEED1 and SRFEED2 columns.
const GBTFeedsrFeedPtr () const
 Return a pointer to the associated switching feed.
void setSRFeedPtr (const GBTFeed *srFeedPtr)
 Set a pointer to the associated switching feed.

Private Attributes

Int itsFeedId
Int itsSRFeedId
String itsName
String itsTrckbeam
String itsRxName
const GBTFeeditsSRFeedPtr
Int itsNif
Block< GBTIF * > itsIFPtr
Bool itsFrozen
Vector< StringitsPolType
Vector< StringitsRecptNames
Double itsXeloffset
Double itsEloffset
Matrix< Double > itsOffsets
Int itsFitsFeedId
Int itsSRFitsFeedId

Detailed Description

This holds information about a specific feed with IFs.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd
Test programs:
tGBTFeed

Prerequisite

Motivation

It is necessary to collect information about the feeds in use in a given scan and associate each feed with a set of IFs.

Definition at line 64 of file GBTFeed.h.


Constructor & Destructor Documentation

The default feed.

Zero offsets and no associated srfeeds. Equivalent to GBTFeed(0.0, 0.0, -1, -1, -1, "");

GBTFeed::GBTFeed ( Double  xeloffset,
Double  eloffset,
const String feedName,
Int  srfeed1,
Int  srfeed2,
const String trckbeam 
)

A specific feed with the values taken directly from one row of the BEAM_OFFSETS table.

The offsets should be in deg, which is how they are expressed there. Since other parts of this class use the integer equivalences of the feedName and since the IF table only contains an integer FEED column, only the physical feeds present in the BEAM_OFFSETS table should be used here.

GBTFeed::GBTFeed ( const GBTFeed other)

Copy constructor.

Copy semantics.


Member Function Documentation

Bool GBTFeed::addReceptor ( const String pol,
const String receptorName 
)

Add a receptor of a given polarization.

Has no effect after freeze() has been called. Should be one of just X,Y,L, or R. The name comes from the IF manager. Returns False if that pol with a different receptorName has already been added.

Int GBTFeed::addUniqueIF ( const GBTIF newIF,
Bool  mergeCorr,
Bool  bankCheck 
)

Add a new GBTIF - copies the values over, only adds if the IF is unique.

Returns the index of the just newIF - which will be < nif() before this call if this IF has already been added (i.e. if it isn't unique). The returned value can be used as the whichIF argument of getIF. Also combines the ifrows and the correlations as necessary when mergeCorr is True. If bankCheck is true, then the correlations are only merged if the banks they came from are the same. That check should only be done on ACS data.

Int GBTFeed::feedId ( ) const [inline]

This is the filled FEED_ID from the MS.

Returns -1 if not yet known.

Definition at line 94 of file GBTFeed.h.

References itsFeedId.

const Int GBTFeed::fitsFeedId ( ) const [inline]

Return the feed number as it is known in the original FITS file, This is a direct translation of the String NAME column in the FITS file to an integer.

Only those feeds which have simple integer names will ever be used here..

Definition at line 176 of file GBTFeed.h.

References itsFitsFeedId.

void GBTFeed::freeze ( )

Freezes the number of receptors.

This is necessary so that receptors can be added in any order and sorted to a specific order. Sort order is x,y,r,l (although presumably in most case there will be just x,y and r,l - or perhaps just one of x,y,r, or l). If no receptors have been added by the time of the freeze, the default case of a single "x" receptor will be made.

const GBTIF& GBTFeed::getIF ( uInt  whichIF) const [inline]

Get a specific GBTIF.

Definition at line 114 of file GBTFeed.h.

References itsIFPtr.

GBTIF& GBTFeed::getIF ( uInt  whichIF) [inline]

Get one to possibly modify.

Definition at line 117 of file GBTFeed.h.

References itsIFPtr.

const String GBTFeed::name ( ) const [inline]

The original feed name.

Definition at line 179 of file GBTFeed.h.

References itsName.

uInt GBTFeed::nif ( ) const [inline]

The number of associated GBTIFs.

Definition at line 111 of file GBTFeed.h.

References itsNif.

uInt GBTFeed::numReceptors ( ) const [inline]

The number of receptors.

Returns 0 before freeze().

Definition at line 153 of file GBTFeed.h.

References itsFrozen, and itsPolType.

const Matrix<Double>& GBTFeed::offsets ( ) const [inline]

Return the offsets - to be used when filling the MS::FEED table.

The shape is (2,NUM_RECEPTORS). There is no actual dependence here on NUM_RECEPTORS (i.e. all NUM_RECEPTORS values of each row are identical). The units are radians. Prior to freeze being called, the contents of this Matrix are not reliable.

Definition at line 170 of file GBTFeed.h.

References itsOffsets.

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

Assignment operator, copy semantics.

This is the only way to "unfreeze" a GBTFeed. If other is not yet frozen than this will become unfrozen as a result if it being made to be a copy of other.

const Vector<String>& GBTFeed::polType ( ) const [inline]

Returns the set of known receptors for this feed once the feed has been frozen.

Prior to freeze() being called the contents of this vector are not reliable.

Definition at line 158 of file GBTFeed.h.

References itsPolType.

const String& GBTFeed::receiver ( ) const [inline]

Get the receiver name.

Definition at line 135 of file GBTFeed.h.

References itsRxName.

Referenced by setReceiver().

const Vector<String>& GBTFeed::receptorNames ( ) const [inline]

The names of the receptors as know in the IF FITS file once the feed has been frozen.

Prior to freeze() being called the contents of this vector are not reliable.

Definition at line 163 of file GBTFeed.h.

References itsRecptNames.

void GBTFeed::setFeedId ( Int  feedid) [inline]

Set the filled FEED_ID.

Definition at line 97 of file GBTFeed.h.

References itsFeedId.

void GBTFeed::setReceiver ( const String receiver) [inline]

Set the receiver name.

Definition at line 132 of file GBTFeed.h.

References itsRxName, and receiver().

void GBTFeed::setSRFeedId ( Int  srfeedid) [inline]

Set the filled GBT_SRFEED_ID.

Definition at line 108 of file GBTFeed.h.

References itsSRFeedId.

void GBTFeed::setSRFeedPtr ( const GBTFeed srFeedPtr) [inline]

Set a pointer to the associated switching feed.

Definition at line 198 of file GBTFeed.h.

References itsSRFeedPtr, and srFeedPtr().

Int GBTFeed::srFeedId ( ) const [inline]

This is the filled FEED_ID from the MS corresponding to the switched beam (i.e.

corresponding to sdFitsFeedId). Returns -1 if not yet known. This should be set equal to feedId() if there is no beam switching going on. This will be filled to the GBT_SRFEED_ID column of the FEED subtable.

Definition at line 105 of file GBTFeed.h.

References itsSRFeedId.

const GBTFeed* GBTFeed::srFeedPtr ( ) const [inline]

Return a pointer to the associated switching feed.

This is the value set by setSRFeedPtr. It should not be deleted.

Definition at line 195 of file GBTFeed.h.

References itsSRFeedPtr.

Referenced by setSRFeedPtr().

const Int GBTFeed::srFitsFeedId ( ) const [inline]

Return the associated switching feed number as it appears in the FITS table as dediced from the SRFEED1 and SRFEED2 columns.

Then the value here is the one that is NOT the fitsFeedId() for this feed. It therefore represents the fitsFeedId() for the other feed. If both SRFEED1 and SRFEED2 are <= 0 then that implies that no switching is going on. In that case srFitsFeedId() == fitsFeedId().

Definition at line 191 of file GBTFeed.h.

References itsSRFitsFeedId.

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

The tracking beam string.

Definition at line 182 of file GBTFeed.h.

References itsTrckbeam.


Member Data Documentation

Double GBTFeed::itsEloffset [private]

Definition at line 222 of file GBTFeed.h.

Int GBTFeed::itsFeedId [private]

Definition at line 200 of file GBTFeed.h.

Referenced by feedId(), and setFeedId().

Int GBTFeed::itsFitsFeedId [private]

Definition at line 226 of file GBTFeed.h.

Referenced by fitsFeedId().

Bool GBTFeed::itsFrozen [private]

Definition at line 210 of file GBTFeed.h.

Referenced by numReceptors().

Block<GBTIF *> GBTFeed::itsIFPtr [private]

Definition at line 208 of file GBTFeed.h.

Referenced by getIF().

Definition at line 201 of file GBTFeed.h.

Referenced by name().

Int GBTFeed::itsNif [private]

Definition at line 207 of file GBTFeed.h.

Referenced by nif().

Matrix<Double> GBTFeed::itsOffsets [private]

Definition at line 224 of file GBTFeed.h.

Referenced by offsets().

Vector<String> GBTFeed::itsPolType [private]

Definition at line 217 of file GBTFeed.h.

Referenced by numReceptors(), and polType().

Vector<String> GBTFeed::itsRecptNames [private]

Definition at line 219 of file GBTFeed.h.

Referenced by receptorNames().

Definition at line 201 of file GBTFeed.h.

Referenced by receiver(), and setReceiver().

Int GBTFeed::itsSRFeedId [private]

Definition at line 200 of file GBTFeed.h.

Referenced by setSRFeedId(), and srFeedId().

const GBTFeed* GBTFeed::itsSRFeedPtr [private]

Definition at line 203 of file GBTFeed.h.

Referenced by setSRFeedPtr(), and srFeedPtr().

Int GBTFeed::itsSRFitsFeedId [private]

Definition at line 226 of file GBTFeed.h.

Referenced by srFitsFeedId().

Definition at line 201 of file GBTFeed.h.

Referenced by trckbeam().

Double GBTFeed::itsXeloffset [private]

Definition at line 222 of file GBTFeed.h.


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