casa
$Rev:20696$
|
Specifies averaging parameters for an MS. More...
#include <PlotMSAveraging.h>
Public Member Functions | |
PMS_ENUM1 (Field, fields, fieldStrings, field, CHANNEL, TIME, SCAN, FIELD, BASELINE, ANTENNA, SPW, SCALARAVE) PMS_ENUM2(Field | |
Static //. | |
PlotMSAveraging () | |
Non-Static //. | |
~PlotMSAveraging () | |
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) |
bool | anyAveraging () const |
If any explicit averaging is turned ON, return True. | |
bool | channel () const |
Convenience methods for returning the standard field values. | |
double | channelValue () const |
String | channelStr () const |
bool | time () const |
double | timeValue () const |
String | timeStr () const |
bool | scan () const |
bool | field () const |
bool | baseline () const |
bool | antenna () const |
bool | spw () const |
bool | scalarAve () const |
void | setChannel (const String &value) |
Convenience methods for setting the standard field values. | |
void | setChannel (bool flag) |
void | setChannelValue (double value) |
void | setTime (const String &value) |
void | setTime (bool flag) |
void | setTimeValue (double value) |
void | setScan (bool flag) |
void | setField (bool flag) |
void | setBaseline (bool flag) |
void | setAntenna (bool flag) |
void | setSpw (bool flag) |
void | setScalarAve (bool flag) |
bool | operator== (const PlotMSAveraging &other) const |
Equality operators. | |
bool | operator!= (const PlotMSAveraging &other) const |
String | summary () const |
Print out a summary of the averaging state: | |
Static Public Member Functions | |
static scalar bool | fieldHasValue (Field f) |
Returns whether the given field has a double value associated with it or not. | |
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 | |
channel | |
time | |
scan | |
baseline | |
antenna | |
spw | |
Private Member Functions | |
void | setDefaults () |
Sets the default values. | |
Private Attributes | |
map< Field, bool > | itsFlags_ |
Averaging field flags. | |
map< Field, double > | itsValues_ |
Averaging field double 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 double value. |
Specifies averaging parameters for an MS.
Definition at line 39 of file PlotMSAveraging.h.
Non-Static //.
Constructor, which uses default values.
Destructor.
bool casa::PlotMSAveraging::antenna | ( | ) | const [inline] |
Definition at line 134 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
bool casa::PlotMSAveraging::anyAveraging | ( | ) | const [inline] |
If any explicit averaging is turned ON, return True.
Definition at line 120 of file PlotMSAveraging.h.
References antenna(), baseline(), channel(), spw(), and time().
bool casa::PlotMSAveraging::baseline | ( | ) | const [inline] |
Definition at line 133 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
bool casa::PlotMSAveraging::channel | ( | ) | const [inline] |
Convenience methods for returning the standard field values.
Definition at line 125 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
String casa::PlotMSAveraging::channelStr | ( | ) | const [inline] |
Definition at line 127 of file PlotMSAveraging.h.
References getValueStr().
double casa::PlotMSAveraging::channelValue | ( | ) | const [inline] |
Definition at line 126 of file PlotMSAveraging.h.
References getValue().
bool casa::PlotMSAveraging::field | ( | ) | const [inline] |
Definition at line 132 of file PlotMSAveraging.h.
References getFlag().
static scalar bool casa::PlotMSAveraging::fieldHasValue | ( | Field | f | ) | [static] |
Returns whether the given field has a double value associated with it or not.
static bool casa::PlotMSAveraging::fieldIsInMutuallyExclusiveGroup | ( | Field | f | ) | [inline, static] |
Returns true if the given field is in a mutually exclusive group, false otherwise.
See fieldMutuallyExclusiveGroup().
Definition at line 73 of file PlotMSAveraging.h.
References fieldMutuallyExclusiveGroup().
static const vector<Field>& casa::PlotMSAveraging::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 one field can be turned on at a given time (although they can all be off at the same time).
Referenced by fieldIsInMutuallyExclusiveGroup().
void casa::PlotMSAveraging::fromRecord | ( | const RecordInterface & | record | ) |
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" (i.e. "channelValue" for CHANNEL) with a double value.
bool casa::PlotMSAveraging::getFlag | ( | Field | f | ) | const |
Gets/Sets the on/off flag for the given field.
Referenced by antenna(), baseline(), channel(), field(), scalarAve(), scan(), spw(), and time().
void casa::PlotMSAveraging::getFlag | ( | Field | f, |
bool & | flag | ||
) | const [inline] |
double casa::PlotMSAveraging::getValue | ( | Field | f | ) | const |
Gets/Sets the double value for the given field, if applicable.
Referenced by channelValue(), and timeValue().
void casa::PlotMSAveraging::getValue | ( | Field | f, |
double & | value | ||
) | const [inline] |
void casa::PlotMSAveraging::getValue | ( | Field | f, |
String & | value | ||
) | const [inline] |
Definition at line 114 of file PlotMSAveraging.h.
References getValueStr().
String casa::PlotMSAveraging::getValueStr | ( | Field | f | ) | const |
Gets/Sets the value for the given field as a String.
Blank means a false value (or a field that does not have a double value); otherwise the double value in String form is used.
Referenced by channelStr(), getValue(), and timeStr().
bool casa::PlotMSAveraging::operator!= | ( | const PlotMSAveraging & | other | ) | const [inline] |
Definition at line 159 of file PlotMSAveraging.h.
References operator==().
bool casa::PlotMSAveraging::operator== | ( | const PlotMSAveraging & | other | ) | const |
Equality operators.
Referenced by operator!=().
casa::PlotMSAveraging::PMS_ENUM1 | ( | Field | , |
fields | , | ||
fieldStrings | , | ||
field | , | ||
CHANNEL | , | ||
TIME | , | ||
SCAN | , | ||
FIELD | , | ||
BASELINE | , | ||
ANTENNA | , | ||
SPW | , | ||
SCALARAVE | |||
) |
Static //.
Enum and methods to define the different fields for an MS averaging. All fields have a bool flag for on/off, and some of them also have a double value (see fieldHasValue()). Fields are off by default, with a default double value of 0 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::PlotMSAveraging::scalarAve | ( | ) | const [inline] |
Definition at line 136 of file PlotMSAveraging.h.
References getFlag().
bool casa::PlotMSAveraging::scan | ( | ) | const [inline] |
Definition at line 131 of file PlotMSAveraging.h.
References getFlag().
void casa::PlotMSAveraging::setAntenna | ( | bool | flag | ) | [inline] |
Definition at line 150 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setBaseline | ( | bool | flag | ) | [inline] |
Definition at line 149 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setChannel | ( | const String & | value | ) | [inline] |
Convenience methods for setting the standard field values.
Definition at line 141 of file PlotMSAveraging.h.
References setValue().
void casa::PlotMSAveraging::setChannel | ( | bool | flag | ) | [inline] |
Definition at line 142 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setChannelValue | ( | double | value | ) | [inline] |
Definition at line 143 of file PlotMSAveraging.h.
References setValue().
void casa::PlotMSAveraging::setDefaults | ( | ) | [private] |
Sets the default values.
void casa::PlotMSAveraging::setField | ( | bool | flag | ) | [inline] |
Definition at line 148 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setFlag | ( | Field | f, |
bool | on | ||
) |
Referenced by setAntenna(), setBaseline(), setChannel(), setField(), setScalarAve(), setScan(), setSpw(), and setTime().
void casa::PlotMSAveraging::setScalarAve | ( | bool | flag | ) | [inline] |
Definition at line 152 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setScan | ( | bool | flag | ) | [inline] |
Definition at line 147 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setSpw | ( | bool | flag | ) | [inline] |
Definition at line 151 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setTime | ( | const String & | value | ) | [inline] |
Definition at line 144 of file PlotMSAveraging.h.
References setValue().
void casa::PlotMSAveraging::setTime | ( | bool | flag | ) | [inline] |
Definition at line 145 of file PlotMSAveraging.h.
References setFlag().
void casa::PlotMSAveraging::setTimeValue | ( | double | value | ) | [inline] |
Definition at line 146 of file PlotMSAveraging.h.
References setValue().
void casa::PlotMSAveraging::setValue | ( | Field | f, |
double | value | ||
) |
Referenced by setChannel(), setChannelValue(), setTime(), and setTimeValue().
void casa::PlotMSAveraging::setValue | ( | Field | f, |
const String & | value | ||
) |
bool casa::PlotMSAveraging::spw | ( | ) | const [inline] |
Definition at line 135 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
String casa::PlotMSAveraging::summary | ( | ) | const |
Print out a summary of the averaging state:
bool casa::PlotMSAveraging::time | ( | ) | const [inline] |
Definition at line 128 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
String casa::PlotMSAveraging::timeStr | ( | ) | const [inline] |
Definition at line 130 of file PlotMSAveraging.h.
References getValueStr().
double casa::PlotMSAveraging::timeValue | ( | ) | const [inline] |
Definition at line 129 of file PlotMSAveraging.h.
References getValue().
Record casa::PlotMSAveraging::toRecord | ( | bool | useStrings = false | ) | const |
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
map<Field, bool> casa::PlotMSAveraging::itsFlags_ [private] |
Averaging field flags.
Definition at line 168 of file PlotMSAveraging.h.
map<Field, double> casa::PlotMSAveraging::itsValues_ [private] |
Averaging field double values.
Definition at line 171 of file PlotMSAveraging.h.
const String casa::PlotMSAveraging::RKEY_VALUE [static, private] |
String constant for what to append to the enum name in the record to get the key for the double value.
Definition at line 180 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.
Definition at line 55 of file PlotMSAveraging.h.