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

Specifies flagging parameters (including possibly flag extension) for an MS. More...

#include <PlotMSFlagging.h>

List of all members.

Public Member Functions

 PMS_ENUM1 (Field, fields, fieldStrings, field, EXTEND, CORR, CORR_ALL, CORR_POLN_DEP, CHANNEL, SPW, ANTENNA, ANTENNA_ANTENNA, ANTENNA_BASELINES, TIME, SCANS, FIELD, SEL_SELECTED, SEL_ALTERNATE) PMS_ENUM2(Field
 Static //.
 PlotMSFlagging ()
 Non-Static //.
 ~PlotMSFlagging ()
 Destructor.
void fromRecord (const RecordInterface &record)
 Converts this object to/from a record.
Record toRecord (bool useStrings=false) const
bool getFlag (Field f) const
 Gets/Sets the on/off flag for the given field.
void getFlag (Field f, bool &flag) const
void setFlag (Field f, bool on)
double getValue (Field f) const
 Gets/Sets the double value for the given field, if applicable.
void getValue (Field f, double &value) const
void setValue (Field f, double value)
String getValueStr (Field f) const
 Gets/Sets the value for the given field as a String.
void getValue (Field f, String &value) const
void setValue (Field f, const String &value)
PlotMSSelection getSelectionValue (Field f) const
 Gets/Sets the selection value for the given field, if applicable.
void getSelectionValue (Field f, PlotMSSelection &value) const
void setSelectionValue (Field f, const PlotMSSelection &value)
bool extend () const
 Convenience methods for returning the standard field values.
bool corr () const
bool corrAll () const
bool corrPolnDep () const
String corrStr () const
bool channel () const
bool spw () const
bool antenna () const
bool antennaAntennaBased () const
double antennaAntennaBasedValue () const
bool antennaBaselinesBased () const
String antennaStr () const
bool time () const
bool scans () const
bool field () const
bool selectionSelected () const
bool selectionAlternate () const
PlotMSSelection selectionAlternateSelection () const
void setExtend (bool flag)
 Convenience methods for setting the standard field values.
void setCorr (bool flag)
void setCorrAll (bool flag)
void setCorrPolnDep (bool flag)
void setCorr (const String &value)
void setChannel (bool flag)
void setSpw (bool flag)
void setAntenna (bool flag)
void setAntennaAntennaBased (bool flag)
void setAntennaAntennaBasedValue (double value)
void setAntennaBaselinesBased (bool flag)
void setAntenna (const String &value)
void setTime (bool flag)
void setScans (bool flag)
void setField (bool flag)
void setSelectionSelected (bool flag)
void setSelectionAlternate (bool flag)
void setSelectionAlternateSelection (const PlotMSSelection &value)
bool operator== (const PlotMSFlagging &other) const
 Equality operators.
bool operator!= (const PlotMSFlagging &other) const

Static Public Member Functions

static bool fieldHasSelectionValue (Field f)
 Returns whether the given field has a PlotMSSelection value associated with it or not.
static bool fieldDefault (Field f)
 Returns whether the given field is on or off by default.
static const vector< Field > & fieldMutuallyExclusiveGroup (Field f)
 Returns the list of fields, NOT including the given, with which the given field is mutually exclusive.
static bool fieldIsInMutuallyExclusiveGroup (Field f)
 Returns true if the given field is in a mutually exclusive group, false otherwise.

Public Attributes

 fields
 fieldStrings
 field
 extend
 correlation
correlation __pad0__:all"
correlation correlation:poln-dep"
correlation channel
correlation spw
correlation antenna
correlation time
correlation scans
correlation field
correlation selection:selected"

Private Member Functions

void setDefaults ()
 Sets the default values.

Private Attributes

map< Field, bool > itsFlags_
 
     

map< Field, double > itsValues_
 Flagging field double values.
map< Field, PlotMSSelectionitsSelectionValues_
 Flagging field selection values.

Static Private Attributes

static const String RKEY_VALUE
 String constant for what to append to the enum name in the record to get the key for the value.
static const String RKEY_SELVALUE

Detailed Description

Specifies flagging parameters (including possibly flag extension) for an MS.

Definition at line 38 of file PlotMSFlagging.h.


Constructor & Destructor Documentation

Non-Static //.

Default constructor.

Destructor.


Member Function Documentation

bool casa::PlotMSFlagging::antenna ( ) const [inline]

Definition at line 153 of file PlotMSFlagging.h.

References extend(), and getFlag().

Referenced by antennaAntennaBased(), and antennaBaselinesBased().

Definition at line 154 of file PlotMSFlagging.h.

References antenna(), and getFlag().

Definition at line 155 of file PlotMSFlagging.h.

References getValue().

Definition at line 156 of file PlotMSFlagging.h.

References antenna(), and getFlag().

Definition at line 157 of file PlotMSFlagging.h.

References getValueStr().

bool casa::PlotMSFlagging::channel ( ) const [inline]

Definition at line 151 of file PlotMSFlagging.h.

References extend(), and getFlag().

bool casa::PlotMSFlagging::corr ( ) const [inline]

Definition at line 147 of file PlotMSFlagging.h.

References extend(), and getFlag().

Referenced by corrAll(), and corrPolnDep().

bool casa::PlotMSFlagging::corrAll ( ) const [inline]

Definition at line 148 of file PlotMSFlagging.h.

References corr(), and getFlag().

bool casa::PlotMSFlagging::corrPolnDep ( ) const [inline]

Definition at line 149 of file PlotMSFlagging.h.

References corr(), and getFlag().

Definition at line 150 of file PlotMSFlagging.h.

References getValueStr().

bool casa::PlotMSFlagging::extend ( ) const [inline]

Convenience methods for returning the standard field values.

Definition at line 146 of file PlotMSFlagging.h.

References getFlag().

Referenced by antenna(), channel(), corr(), selectionAlternate(), selectionSelected(), spw(), and time().

bool casa::PlotMSFlagging::field ( ) const [inline]

Definition at line 160 of file PlotMSFlagging.h.

References getFlag(), and time().

static bool casa::PlotMSFlagging::fieldDefault ( Field  f) [static]

Returns whether the given field is on or off by default.

This is important for mutually exclusive groups, which need to know which field in that group is on to begin with.

static bool casa::PlotMSFlagging::fieldHasSelectionValue ( Field  f) [static]

Returns whether the given field has a PlotMSSelection value associated with it or not.

static bool casa::PlotMSFlagging::fieldIsInMutuallyExclusiveGroup ( Field  f) [inline, static]

Returns true if the given field is in a mutually exclusive group, false otherwise.

See fieldMutuallyExclusiveGroup().

Definition at line 87 of file PlotMSFlagging.h.

References fieldMutuallyExclusiveGroup().

static const vector<Field>& casa::PlotMSFlagging::fieldMutuallyExclusiveGroup ( Field  f) [static]

Returns the list of fields, NOT including the given, with which the given field is mutually exclusive.

In a mutually exclusive group, only and exactly one field can be turned on at a given time. NOTE: this is different from mutually exclusive groups in PlotMSAveraging, because here it is NOT allowed to have all fields in a group turned off.

Referenced by fieldIsInMutuallyExclusiveGroup().

Converts this object to/from a record.

Each field will have a key that is its enum name, with a bool value for its flag value. Fields that also have double values will have an additional key that is its enum name + "Value" for double values, or its enum name + "SelectionValue" for PlotMSSelection values. PlotMSSelection values are stored in Record form (see PlotMSSelection::fromRecord()). The MS objects (the MS, the selected MS, and the vis set) are NOT included in the record.

bool casa::PlotMSFlagging::getFlag ( Field  f) const
void casa::PlotMSFlagging::getFlag ( Field  f,
bool &  flag 
) const [inline]

Definition at line 114 of file PlotMSFlagging.h.

References getFlag().

Referenced by getFlag().

Gets/Sets the selection value for the given field, if applicable.

Referenced by getSelectionValue(), and selectionAlternateSelection().

void casa::PlotMSFlagging::getSelectionValue ( Field  f,
PlotMSSelection value 
) const [inline]

Definition at line 138 of file PlotMSFlagging.h.

References getSelectionValue().

double casa::PlotMSFlagging::getValue ( Field  f) const

Gets/Sets the double value for the given field, if applicable.

Referenced by antennaAntennaBasedValue().

void casa::PlotMSFlagging::getValue ( Field  f,
double &  value 
) const [inline]

Definition at line 121 of file PlotMSFlagging.h.

References getValue().

Referenced by getValue().

void casa::PlotMSFlagging::getValue ( Field  f,
String value 
) const [inline]

Definition at line 131 of file PlotMSFlagging.h.

References getValueStr().

Gets/Sets the value for the given field as a String.

Only applicable for special cases (correlation, antenna). Correlation: "", "all", or "poln-dep". Antenna: "", "all", or antenna-based value.

Referenced by antennaStr(), corrStr(), and getValue().

bool casa::PlotMSFlagging::operator!= ( const PlotMSFlagging other) const [inline]

Definition at line 195 of file PlotMSFlagging.h.

References operator==().

bool casa::PlotMSFlagging::operator== ( const PlotMSFlagging other) const

Equality operators.

Referenced by operator!=().

casa::PlotMSFlagging::PMS_ENUM1 ( Field  ,
fields  ,
fieldStrings  ,
field  ,
EXTEND  ,
CORR  ,
CORR_ALL  ,
CORR_POLN_DEP  ,
CHANNEL  ,
SPW  ,
ANTENNA  ,
ANTENNA_ANTENNA  ,
ANTENNA_BASELINES  ,
TIME  ,
SCANS  ,
FIELD  ,
SEL_SELECTED  ,
SEL_ALTERNATE   
)

Static //.

Enum and methods to define the different fields for an MS flagging. All fields have a bool flag for on/off, and some of them also have a double value (see fieldHasValue()) or a PlotMSSelection value (see fieldHasSelectionValue()). Most fields are off by default (see fieldDefault()), with a default double value of 0 or empty/default PlotMSSelection value if applicable. Some fields are in mutually exclusive groups (see fieldMutuallyExclusiveGroup()). If these are changed, also update: convenience methods below, xmlcasa/implement/plotms/plotms*, xmlcasa/tasks/plotms.xml, xmlcasa/scripts/task_plotms.py.

bool casa::PlotMSFlagging::scans ( ) const [inline]

Definition at line 159 of file PlotMSFlagging.h.

References getFlag(), and time().

Definition at line 162 of file PlotMSFlagging.h.

References extend(), and getFlag().

Definition at line 163 of file PlotMSFlagging.h.

References getSelectionValue().

bool casa::PlotMSFlagging::selectionSelected ( ) const [inline]

Definition at line 161 of file PlotMSFlagging.h.

References extend(), and getFlag().

void casa::PlotMSFlagging::setAntenna ( bool  flag) [inline]

Definition at line 176 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setAntenna ( const String value) [inline]

Definition at line 181 of file PlotMSFlagging.h.

References setValue().

void casa::PlotMSFlagging::setAntennaAntennaBased ( bool  flag) [inline]

Definition at line 177 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setAntennaAntennaBasedValue ( double  value) [inline]

Definition at line 178 of file PlotMSFlagging.h.

References setValue().

void casa::PlotMSFlagging::setAntennaBaselinesBased ( bool  flag) [inline]

Definition at line 180 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setChannel ( bool  flag) [inline]

Definition at line 174 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setCorr ( bool  flag) [inline]

Definition at line 170 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setCorr ( const String value) [inline]

Definition at line 173 of file PlotMSFlagging.h.

References setValue().

void casa::PlotMSFlagging::setCorrAll ( bool  flag) [inline]

Definition at line 171 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setCorrPolnDep ( bool  flag) [inline]

Definition at line 172 of file PlotMSFlagging.h.

References setFlag().

Sets the default values.

void casa::PlotMSFlagging::setExtend ( bool  flag) [inline]

Convenience methods for setting the standard field values.

Definition at line 169 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setField ( bool  flag) [inline]

Definition at line 184 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setFlag ( Field  f,
bool  on 
)
void casa::PlotMSFlagging::setScans ( bool  flag) [inline]

Definition at line 183 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setSelectionAlternate ( bool  flag) [inline]

Definition at line 186 of file PlotMSFlagging.h.

References setFlag().

Definition at line 187 of file PlotMSFlagging.h.

References setSelectionValue().

void casa::PlotMSFlagging::setSelectionSelected ( bool  flag) [inline]

Definition at line 185 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setSelectionValue ( Field  f,
const PlotMSSelection value 
)
void casa::PlotMSFlagging::setSpw ( bool  flag) [inline]

Definition at line 175 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setTime ( bool  flag) [inline]

Definition at line 182 of file PlotMSFlagging.h.

References setFlag().

void casa::PlotMSFlagging::setValue ( Field  f,
double  value 
)
void casa::PlotMSFlagging::setValue ( Field  f,
const String value 
)
bool casa::PlotMSFlagging::spw ( ) const [inline]

Definition at line 152 of file PlotMSFlagging.h.

References extend(), and getFlag().

bool casa::PlotMSFlagging::time ( ) const [inline]

Definition at line 158 of file PlotMSFlagging.h.

References extend(), and getFlag().

Referenced by field(), and scans().

Record casa::PlotMSFlagging::toRecord ( bool  useStrings = false) const

Member Data Documentation

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

map<Field, bool> casa::PlotMSFlagging::itsFlags_ [private]

     

Flagging field flags.

Definition at line 202 of file PlotMSFlagging.h.

Flagging field selection values.

Definition at line 208 of file PlotMSFlagging.h.

map<Field, double> casa::PlotMSFlagging::itsValues_ [private]

Flagging field double values.

Definition at line 205 of file PlotMSFlagging.h.

Definition at line 219 of file PlotMSFlagging.h.

const String casa::PlotMSFlagging::RKEY_VALUE [static, private]

String constant for what to append to the enum name in the record to get the key for the value.

Definition at line 218 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.

Definition at line 58 of file PlotMSFlagging.h.


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