casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Static Public Member Functions | List of all members
casacore::Stokes Class Reference

Stokes parameter definitions for interface to table data. More...

#include <Stokes.h>

Public Types

enum  StokesTypes {
  Undefined,
  I,
  Q,
  U,
  V,
  RR,
  RL,
  LR,
  LL,
  XX,
  XY,
  YX,
  YY,
  RX,
  RY,
  LX,
  LY,
  XR,
  XL,
  YR,
  YL,
  PP,
  PQ,
  QP,
  QQ,
  RCircular,
  LCircular,
  Linear,
  Ptotal,
  Plinear,
  PFtotal,
  PFlinear,
  Pangle
}
 The Stokes types are defined by this enum. More...
 
enum  { NumberOfTypes }
 The number of StokesTypes. More...
 

Static Public Member Functions

static StokesTypes type (Int stokesNumber)
 convert Int to StokesTypes, returns Stokes::Undefined if it is an invalid type More...
 
static StokesTypes type (const String &stokesName)
 convert String to StokesTypes, returns Stokes::Undefined if it is an unrecognized string. More...
 
static String name (StokesTypes stokesType)
 convert StokesTypes to String, Stokes::Undefined returns "??". More...
 
static Vector< StringallNames (Bool includeUndefined=False)
 get all recognized stokes names in no guaranteed order. More...
 
static Fallible< Intreceptor1 (StokesTypes stokesType)
 map StokesTypes to receptor number (0 or 1) for the interferometric correlation products. More...
 
static Fallible< Intreceptor2 (StokesTypes stokesType)
 
static Int FITSValue (StokesTypes which)
 These two functions map stokes type to FITS type and vice versa. More...
 
static StokesTypes fromFITSValue (Int)
 

Detailed Description

Stokes parameter definitions for interface to table data.

Review Status

Test programs:
tStokes

Synopsis

This enumerates the available Stokes types, but does not define the operations for conversion between Stokes types. This class is a wrapper for the ENUM and conversion functions.

Definition at line 51 of file Stokes.h.

Member Enumeration Documentation

anonymous enum

The number of StokesTypes.


Warning: Update NumberOfTypes when entries are added;

Enumerator
NumberOfTypes 

The number of StokesTypes.

Definition at line 123 of file Stokes.h.

The Stokes types are defined by this enum.


Warning: DO NOT CHANGE THE ORDER OF THESE TYPES, as the integers corresponding to the enum are required for storage in Tables; One can add to these types, but the order must be preserved; The correlation products are required to have the order indicated with values of 1,2,3,4 plus n*4;

Enumerator
Undefined 

undefined value = 0

I 
Q 
U 
V 

standard stokes parameters

RR 
RL 
LR 
LL 

circular correlation products

XX 
XY 
YX 
YY 

linear correlation products

RX 
RY 
LX 
LY 
XR 
XL 
YR 
YL 

mixed correlation products

PP 
PQ 
QP 
QQ 

general quasi-orthogonal correlation products

RCircular 
LCircular 
Linear 

single dish polarization types

Ptotal 

Polarized intensity ((Q^2+U^2+V^2)^(1/2))

Plinear 

Linearly Polarized intensity ((Q^2+U^2)^(1/2))

PFtotal 

Polarization Fraction (Ptotal/I)

PFlinear 

Linear Polarization Fraction (Plinear/I)

Pangle 

Linear Polarization Angle (0.5 arctan(U/Q)) (in radians)

Definition at line 66 of file Stokes.h.

Member Function Documentation

static Vector<String> casacore::Stokes::allNames ( Bool  includeUndefined = False)
static

get all recognized stokes names in no guaranteed order.

static Int casacore::Stokes::FITSValue ( StokesTypes  which)
static

These two functions map stokes type to FITS type and vice versa.

If you add a StokesType you should change these functions as well.

  • I,Q,U,V <-> 1,2,3,4
  • RR,LL,RL,LR <-> -1,-2,-3,-4 Note! Not the same as enum order!
  • XX,YY,XY,YX <-> -5,-6,-7,-8 Note! Not the same as enum order!
  • Otherwise, FITS type <-> 100 + Int(stokesType). This is not standard FITS.
static StokesTypes casacore::Stokes::fromFITSValue ( Int  )
static
static String casacore::Stokes::name ( StokesTypes  stokesType)
static
static Fallible<Int> casacore::Stokes::receptor1 ( StokesTypes  stokesType)
static

map StokesTypes to receptor number (0 or 1) for the interferometric correlation products.

e.g. XY will give receptor1==0 receptor2==1 etc. I,Q,U,V and the single dish types will produce invalid Fallible.

static Fallible<Int> casacore::Stokes::receptor2 ( StokesTypes  stokesType)
static
static StokesTypes casacore::Stokes::type ( Int  stokesNumber)
static

convert Int to StokesTypes, returns Stokes::Undefined if it is an invalid type

Referenced by casa::NRO2MSReader::NROArrayData::set().

static StokesTypes casacore::Stokes::type ( const String stokesName)
static

convert String to StokesTypes, returns Stokes::Undefined if it is an unrecognized string.

The valid strings are the same as the characters used in the enum above (i.e. "I" returns Stokes::I, "Linear" returns Stokes::Linear, etc).


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