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

GBTPolarization holds polarization info for a correlation set. More...

#include <GBTPolarization.h>

List of all members.

Public Member Functions

 GBTPolarization ()
 The default correlation.
 GBTPolarization (Int numCorr, const Vector< String > polType)
 A specific correlation from vector of receptor polarization and a specific NUM_CORR.
 GBTPolarization (const GBTPolarization &other)
 copy constructor
 ~GBTPolarization ()
GBTPolarizationoperator= (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.
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.

Private Attributes

Int itsNumCorr
Vector< Int > itsCorrType
Vector< Int > itsSamplerRows
Matrix< Int > itsCorrProduct
SimpleOrderedMap< Int, Int > itsCorrMap
Bool itsIsDefault

Detailed Description

GBTPolarization holds polarization info for a correlation set.

Intended use:

Internal

Review Status

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

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.

Definition at line 74 of file GBTPolarization.h.


Constructor & Destructor Documentation

The default correlation.

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

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

copy constructor

Definition at line 92 of file GBTPolarization.h.


Member Function Documentation

const Matrix<Int>& GBTPolarization::corrProduct ( ) const [inline]

The receptor cross-products.

Definition at line 112 of file GBTPolarization.h.

References itsCorrProduct.

const Vector<Int>& GBTPolarization::corrType ( ) const [inline]

The polarization of the numCorr correlations.

Definition at line 109 of file GBTPolarization.h.

References itsCorrType.

Int GBTPolarization::numCorr ( ) const [inline]

the number of correlations

Definition at line 106 of file GBTPolarization.h.

References itsNumCorr.

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

Assignment operator, uses copy syntax.

Bool GBTPolarization::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".

const Vector<Int> GBTPolarization::samplerRows ( ) const [inline]

The samplerRows associated with corrType.

An element is -1 if no information has been provided yet.

Definition at line 116 of file GBTPolarization.h.

References itsSamplerRows.


Member Data Documentation

SimpleOrderedMap<Int, Int> GBTPolarization::itsCorrMap [private]

Definition at line 123 of file GBTPolarization.h.

Matrix<Int> GBTPolarization::itsCorrProduct [private]

Definition at line 120 of file GBTPolarization.h.

Referenced by corrProduct().

Vector<Int> GBTPolarization::itsCorrType [private]

Definition at line 119 of file GBTPolarization.h.

Referenced by corrType().

Definition at line 125 of file GBTPolarization.h.

Definition at line 118 of file GBTPolarization.h.

Referenced by numCorr().

Vector<Int> GBTPolarization::itsSamplerRows [private]

Definition at line 119 of file GBTPolarization.h.

Referenced by samplerRows().


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