casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
MirPolCorr Class Reference

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

#include <FillMetadata.h>

Inheritance diagram for MirPolCorr:
MirInfo MirTypeAssert

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

casacore::Int corr
 
casacore::Int id
 

Static Private Attributes

static const
casacore::Stokes::StokesTypes 
corratopol []
 
static const
casacore::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 316 of file FillMetadata.h.

Constructor & Destructor Documentation

MirPolCorr::MirPolCorr ( casacore::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 330 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 347 of file FillMetadata.h.

Referenced by ConstMirPolSetup::clearIDs().

casacore::Stokes::StokesTypes MirPolCorr::getAipsType ( ) const
inline

return the AIPS++ casacore::Stokes type for the current polarization

Definition at line 382 of file FillMetadata.h.

References corr, and toAips().

Referenced by ConstMirPolSetup::getCurrentAipsType(), and toString().

casacore::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 casacore::Stokes types will be that for a single type cross-correlated with itself.

Definition at line 357 of file FillMetadata.h.

References corr, and corratopol.

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

casacore::Int MirPolCorr::getID ( ) const
inline

return the independent ID.

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

Definition at line 344 of file FillMetadata.h.

References id.

casacore::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 casacore::Stokes types will be that for a single type cross-correlated with itself.

Definition at line 365 of file FillMetadata.h.

References corr, and corrbtopol.

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

casacore::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 351 of file FillMetadata.h.

References corr.

casacore::Bool MirPolCorr::hasPol ( casacore::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 371 of file FillMetadata.h.

References getFirstPolType(), and getSecondPolType().

casacore::Bool MirPolCorr::operator== ( const MirPolCorr that) const
inline

Definition at line 335 of file FillMetadata.h.

References corr.

casacore::Bool MirPolCorr::operator== ( casacore::Int  poltype) const
inline

Definition at line 336 of file FillMetadata.h.

References corr.

void MirPolCorr::setID ( casacore::Int  val) const
inline

set the independent ID.

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

Definition at line 340 of file FillMetadata.h.

static casacore::Stokes::StokesTypes MirPolCorr::toAips ( casacore::Int  pol)
static

convert the Miriad polarization code to the AIPS

Referenced by getAipsType().

static casacore::Int MirPolCorr::toMiriad ( casacore::Stokes::StokesTypes  pol)
static

convert the Aips casacore::Stokes polarization code to the Miriad convention

casacore::String MirPolCorr::toString ( ) const
inline

return a string representation of this polarization

Definition at line 385 of file FillMetadata.h.

References getAipsType(), and casacore::Stokes::name().

Member Data Documentation

casacore::Int MirPolCorr::corr
private
const casacore::Stokes::StokesTypes MirPolCorr::corratopol[]
staticprivate

Definition at line 321 of file FillMetadata.h.

Referenced by getFirstPolType().

const casacore::Stokes::StokesTypes MirPolCorr::corrbtopol[]
staticprivate

Definition at line 322 of file FillMetadata.h.

Referenced by getSecondPolType().

casacore::Int MirPolCorr::id
mutableprivate

Definition at line 319 of file FillMetadata.h.

Referenced by getID().


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