GBTPolarization.h

Classes

GBTPolarization -- GBTPolarization holds polarization info for a correlation set. (full description)

class GBTPolarization

Interface

Public Members
GBTPolarization()
GBTPolarization(Int numCorr, const Vector<String> polType)
GBTPolarization(const GBTPolarization &other)
~GBTPolarization()
GBTPolarization &operator=(const GBTPolarization &other)
Bool samplerInfo(Int samplerRow, const String &polA, const String &polB)
Int numCorr() const
const Vector<Int> &corrType() const
const Matrix<Int> &corrProduct() const
const Vector<Int> samplerRows() const

Description

Review Status

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

Prerequisite

Etymology

This holds information appropriate for a row of the POLARIZATION table of a MS plus information useful in associated a specific correlation with a specific sampler in a GBT backend FITS file (and from there, to an appropriate row in the IF table and a specific feed). Hence this holds GBT-specific polarization information.

Motivation

When this information was being held by a larger class, it was getting confused with other issues related to that class. By putting it in a smaller, simpler class the maintenance will be easier and usage will be less confusing.

Member Description

GBTPolarization()

The default correlation. NUM_CORR=1 and CORR_TYPE[0]=code for "X".

GBTPolarization(Int numCorr, const Vector<String> polType)

A specific correlation from vector of receptor polarization and a specific NUM_CORR. If NUM_CORR == 1 or 2 only the self-products are used and polType.nelements() should equal numCorr. If NUM_CORR==4 then polType.nelements() should equal 2 and cross-products will also be used. NUM_CORR==3 should never be used. For efficiency, this code only checks those values using DebugAssert and hence are only done if AIPS_DEBUG was defined at compile time.

GBTPolarization(const GBTPolarization &other)

copy constructor

~GBTPolarization()

GBTPolarization &operator=(const GBTPolarization &other)

Assignment operator, uses copy syntax.

Bool samplerInfo(Int samplerRow, const String &polA, const String &polB)

Set up information about a given sampler row. Returns False if the implied element in polType doesn't exist. samplerInfo always returns True if the default constructor was used. In that case polA and polB always combine to map to the single correlation of "XX".

Int numCorr() const

the number of correlations

const Vector<Int> &corrType() const

The polarization of the numCorr correlations

const Matrix<Int> &corrProduct() const

The receptor cross-products.

const Vector<Int> samplerRows() const

The samplerRows associated with corrType. An element is -1 if no information has been provided yet.