MirPolCorr Class Reference

a container for a single Miriad polarization correlation More...

#include <FillMetadata.h>

Inheritance diagram for MirPolCorr:
MirInfo MirTypeAssert

List of all members.

Public Member Functions

 MirPolCorr (Int poltype)
 create a container.
 MirPolCorr (const MirPolCorr &that)
 create a copy of a container.
virtual ~MirPolCorr ()
 delete the container
Bool operator== (const MirPolCorr &that) const
Bool operator== (Int poltype) const
void setID (Int val) const
 set the independent ID.
Int getID () const
 return the independent ID.
void clearID () const
 clear the independent ID value
Int getType () const
 return the polarization correlation type in the Miriad convention (i.e.
Stokes::StokesTypes getFirstPolType () const
 return the polarization type associated with the first receptor for this correlation type.
Stokes::StokesTypes getSecondPolType () const
 return the polarization type associated with the second receptor for the given correlation type.
Bool hasPol (Stokes::StokesTypes pol) const
 return True if the given single polarization type is one of the components of this correlation type
Stokes::StokesTypes getAipsType () const
 return the AIPS++ Stokes type for the current polarization
String toString () const
 return a string representation of this polarization

Static Public Member Functions

static Stokes::StokesTypes toAips (Int pol)
 convert the Miriad polarization code to the AIPS
static Int toMiriad (Stokes::StokesTypes pol)
 convert the Aips Stokes polarization code to the Miriad convention

Private Attributes

Int corr
Int id

Static Private Attributes

static const Stokes::StokesTypes corratopol []
static const Stokes::StokesTypes corrbtopol []

Detailed Description

a container for a single Miriad polarization correlation

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

the name is short for Miriad Polarization Correlation. A polarization correlation type refers to the combination (via cross-correlation) of two polarizations.

Synopsis

This class contains a polarization cross-correlation combination. It provides methods for determining the constituent polarization types. An integer Id can be associated with it as well; this is used by the MirFiller class to remember what table entry it is associated with.

Motivation

Miriad datasets record different polarization measurements in seperate records; thus, there is a notion of a current polarization among several being read. Furthermore, you usually don't know which polarizations are in the dataset until you've read at least one record with each kind of polarization. You do usually know the total number of different polarizations after reading the first record.

Definition at line 315 of file FillMetadata.h.


Constructor & Destructor Documentation

MirPolCorr::MirPolCorr ( Int  poltype  ) 

create a container.

Poltype is the polarization type in the Miriad convention (i.e. as read from the "pol" variable in a Miriad dataset).

MirPolCorr::MirPolCorr ( const MirPolCorr that  )  [inline]

create a copy of a container.

Definition at line 329 of file FillMetadata.h.

References corr.

virtual MirPolCorr::~MirPolCorr (  )  [virtual]

delete the container


Member Function Documentation

void MirPolCorr::clearID (  )  const [inline]

clear the independent ID value

Definition at line 346 of file FillMetadata.h.

Stokes::StokesTypes MirPolCorr::getAipsType (  )  const [inline]

return the AIPS++ Stokes type for the current polarization

Definition at line 381 of file FillMetadata.h.

References corr, and toAips().

Referenced by toString().

Stokes::StokesTypes MirPolCorr::getFirstPolType (  )  const [inline]

return the polarization type associated with the first receptor for this correlation type.

The returned StokesType for non-true Stokes types will be that for a single type cross-correlated with itself.

Definition at line 356 of file FillMetadata.h.

References corr, and corratopol.

Referenced by MirPolRecps::addPolsFor(), and hasPol().

Int MirPolCorr::getID (  )  const [inline]

return the independent ID.

A value less than zero should be interpreted as meaning unset.

Definition at line 343 of file FillMetadata.h.

References id.

Stokes::StokesTypes MirPolCorr::getSecondPolType (  )  const [inline]

return the polarization type associated with the second receptor for the given correlation type.

The returned StokesType for non-true Stokes types will be that for a single type cross-correlated with itself.

Definition at line 364 of file FillMetadata.h.

References corr, and corrbtopol.

Referenced by MirPolRecps::addPolsFor(), and hasPol().

Int MirPolCorr::getType (  )  const [inline]

return the polarization correlation type in the Miriad convention (i.e.

as read from the "pol" variable in a Miriad dataset).

Definition at line 350 of file FillMetadata.h.

References corr.

Bool MirPolCorr::hasPol ( Stokes::StokesTypes  pol  )  const [inline]

return True if the given single polarization type is one of the components of this correlation type

Definition at line 370 of file FillMetadata.h.

References getFirstPolType(), and getSecondPolType().

Bool MirPolCorr::operator== ( Int  poltype  )  const [inline]

Definition at line 335 of file FillMetadata.h.

References corr.

Bool MirPolCorr::operator== ( const MirPolCorr that  )  const [inline]

Definition at line 334 of file FillMetadata.h.

References corr.

void MirPolCorr::setID ( Int  val  )  const [inline]

set the independent ID.

A value less than zero should be interpreted as meaning unset.

Definition at line 339 of file FillMetadata.h.

static Stokes::StokesTypes MirPolCorr::toAips ( Int  pol  )  [static]

convert the Miriad polarization code to the AIPS

Referenced by getAipsType().

static Int MirPolCorr::toMiriad ( Stokes::StokesTypes  pol  )  [static]

convert the Aips Stokes polarization code to the Miriad convention

String MirPolCorr::toString (  )  const [inline]

return a string representation of this polarization

Definition at line 384 of file FillMetadata.h.

References getAipsType(), and casa::name().


Member Data Documentation

Int MirPolCorr::corr [private]
const Stokes::StokesTypes MirPolCorr::corratopol[] [static, private]

Definition at line 320 of file FillMetadata.h.

Referenced by getFirstPolType().

const Stokes::StokesTypes MirPolCorr::corrbtopol[] [static, private]

Definition at line 321 of file FillMetadata.h.

Referenced by getSecondPolType().

Int MirPolCorr::id [mutable, private]

Definition at line 318 of file FillMetadata.h.

Referenced by getID().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1