GBTFeed.h

Classes

GBTFeed -- This holds information about a specific feed with IFs (full description)

class GBTFeed

Interface

Public Members
GBTFeed()
GBTFeed(Double xeloffset, Double eloffset, const String &feedName, Int srfeed1, Int srfeed2, const String &trckbeam)
GBTFeed(const GBTFeed &other)
~GBTFeed()
GBTFeed &operator=(const GBTFeed &other)
Int feedId() const
void setFeedId(Int feedid)
Int srFeedId() const
void setSRFeedId(Int srfeedid)
uInt nif() const
const GBTIF &getIF(uInt whichIF) const
GBTIF &getIF(uInt whichIF)
Int addUniqueIF(const GBTIF &newIF, Bool mergeCorr, Bool bankCheck)
void setReceiver(const String &receiver)
const String &receiver() const
Bool addReceptor(const String &pol, const String &receptorName)
void freeze()
uInt numReceptors() const
const Vector<String> &polType() const
const Vector<String> &receptorNames() const
const Matrix<Double> &offsets() const
const Int fitsFeedId() const
const String name() const
const String trckbeam() const
const Int srFitsFeedId() const
const GBTFeed *srFeedPtr() const
void setSRFeedPtr(const GBTFeed *srFeedPtr)

Description

Review Status

Date Reviewed:
yyyy/mm/dd
Programs:
Tests:

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.

Member Description

GBTFeed()

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

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(const GBTFeed &other)

Copy constructor. Copy semantics.

~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.

Int feedId() const

This is the filled FEED_ID from the MS. Returns -1 if not yet known.

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

void setSRFeedId(Int srfeedid)

Set the filled GBT_SRFEED_ID.

uInt nif() const

The number of associated GBTIFs.

const GBTIF &getIF(uInt whichIF) const

Get a specific GBTIF

GBTIF &getIF(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. 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.

void setReceiver(const String &receiver)

Set the receiver name.

const String &receiver() const

Get the receiver name.

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

void 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.

uInt numReceptors() const

The number of receptors. Returns 0 before freeze().

const Vector<String> &polType() const

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.

const Vector<String> &receptorNames() const

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.

const Matrix<Double> &offsets() const

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.

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. Only those feeds which have simple integer names will ever be used here..

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. 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().

const GBTFeed *srFeedPtr() const

Return a pointer to the associated switching feed. This is the value set by setSRFeedPtr. It should not be deleted.

void setSRFeedPtr(const GBTFeed *srFeedPtr)

Set a pointer to the associated switching feed.