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 | List of all members
MirPolRecps Class Reference

a container for a set of Miriad (single-) polarization receptor types More...

#include <FillMetadata.h>

Inheritance diagram for MirPolRecps:
MirInfo MirTypeAssert

Public Member Functions

 MirPolRecps ()
 
virtual ~MirPolRecps ()
 
casacore::uInt getPolCount () const
 return the number of distinct single polarization that make up this setup More...
 
void addPol (casacore::Stokes::StokesTypes pol)
 add a polarization type if it isn't already added. More...
 
void addPolsFor (const MirPolCorr &pol)
 add the polarization types involved in the cross-correlation represented by the given correlation type More...
 
void addPolsFor (ConstMirPolSetup &pol)
 add the polarization types involved in the cross-correlations represented by the correlation types in the given list More...
 
casacore::Stokes::StokesTypes getPol (casacore::Int i) const
 return the i-th polarization More...
 
casacore::Int find (casacore::Stokes::StokesTypes pol)
 find the position of the given polarization type. More...
 
casacore::Bool hasPol (casacore::Stokes::StokesTypes pol)
 return true if the given polarization is present in this list More...
 
const casacore::List
< casacore::Stokes::StokesTypes > & 
getPols () const
 return the unique list of single polarization types that comprise the correlation types. More...
 
casacore::String toString (casacore::Int i) const
 return a string representing the i-th polarization More...
 
- Public Member Functions inherited from MirInfo
 MirInfo ()
 
virtual ~MirInfo ()
 

Static Public Member Functions

static casacore::String polToString (casacore::Stokes::StokesTypes pol)
 return a string representing the given polarization More...
 

Private Attributes

casacore::List
< casacore::Stokes::StokesTypes
pols
 
casacore::ListIter
< casacore::Stokes::StokesTypes
iter
 

Detailed Description

a container for a set of Miriad (single-) polarization receptor types

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd

Etymology

the name is short for Miriad Polarization Receptors

Synopsis

This class contains a list of single-polarization types that correspond the types of polarizations a group of receptors are sensitive to.

Single Polarization types are identified using the AIPS' StokesTypes enumeration. For non-true casacore::Stokes types, the value for the polarization cross-correlated with itself is used.

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 554 of file FillMetadata.h.

Constructor & Destructor Documentation

MirPolRecps::MirPolRecps ( )
inline

Definition at line 560 of file FillMetadata.h.

virtual MirPolRecps::~MirPolRecps ( )
virtual

Member Function Documentation

void MirPolRecps::addPol ( casacore::Stokes::StokesTypes  pol)
inline

add a polarization type if it isn't already added.

Definition at line 568 of file FillMetadata.h.

References casacore::ListIter< t >::addRight(), hasPol(), iter, and casacore::ConstListIter< t >::toEnd().

Referenced by addPolsFor().

void MirPolRecps::addPolsFor ( const MirPolCorr pol)
inline

add the polarization types involved in the cross-correlation represented by the given correlation type

Definition at line 577 of file FillMetadata.h.

References addPol(), MirPolCorr::getFirstPolType(), and MirPolCorr::getSecondPolType().

Referenced by addPolsFor().

void MirPolRecps::addPolsFor ( ConstMirPolSetup pol)
inline

add the polarization types involved in the cross-correlations represented by the correlation types in the given list

Definition at line 584 of file FillMetadata.h.

References addPolsFor(), and ConstMirPolSetup::getCorrs().

casacore::Int MirPolRecps::find ( casacore::Stokes::StokesTypes  pol)
inline

find the position of the given polarization type.

-1 is returned if the polarization is not found

Definition at line 598 of file FillMetadata.h.

References casacore::ConstListIter< t >::atEnd(), casacore::ListIter< t >::getRight(), iter, casacore::ConstListIter< t >::pos(), and casacore::ConstListIter< t >::toStart().

Referenced by hasPol().

casacore::Stokes::StokesTypes MirPolRecps::getPol ( casacore::Int  i) const
inline

return the i-th polarization

Definition at line 591 of file FillMetadata.h.

References casacore::ListIter< t >::getRight(), iter, and casacore::ConstListIter< t >::pos().

Referenced by toString().

casacore::uInt MirPolRecps::getPolCount ( ) const
inline

return the number of distinct single polarization that make up this setup

Definition at line 565 of file FillMetadata.h.

References casacore::List< t >::len(), and pols.

const casacore::List<casacore::Stokes::StokesTypes>& MirPolRecps::getPols ( ) const
inline

return the unique list of single polarization types that comprise the correlation types.

Definition at line 610 of file FillMetadata.h.

References pols.

casacore::Bool MirPolRecps::hasPol ( casacore::Stokes::StokesTypes  pol)
inline

return true if the given polarization is present in this list

Definition at line 606 of file FillMetadata.h.

References find().

Referenced by addPol().

static casacore::String MirPolRecps::polToString ( casacore::Stokes::StokesTypes  pol)
inlinestatic

return a string representing the given polarization

Definition at line 616 of file FillMetadata.h.

References casacore::Stokes::name().

Referenced by toString().

casacore::String MirPolRecps::toString ( casacore::Int  i) const
inline

return a string representing the i-th polarization

Definition at line 613 of file FillMetadata.h.

References getPol(), and polToString().

Member Data Documentation

casacore::ListIter<casacore::Stokes::StokesTypes> MirPolRecps::iter
mutableprivate

Definition at line 557 of file FillMetadata.h.

Referenced by addPol(), find(), and getPol().

casacore::List<casacore::Stokes::StokesTypes> MirPolRecps::pols
private

Definition at line 556 of file FillMetadata.h.

Referenced by getPolCount(), and getPols().


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