casa
5.7.0-16
|
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 //. More... | |
PlotMSAveraging () | |
Non-Static //. More... | |
~PlotMSAveraging () | |
Destructor. More... | |
void | fromRecord (const casacore::RecordInterface &record) |
Converts this object to/from a record. More... | |
casacore::Record | toRecord (bool useStrings=false) const |
bool | getFlag (Field f) const |
Gets/Sets the on/off flag for the given field. More... | |
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. More... | |
void | getValue (Field f, double &value) const |
void | setValue (Field f, double value) |
casacore::String | getValueStr (Field f) const |
Gets/Sets the value for the given field as a String. More... | |
void | getValue (Field f, casacore::String &value) const |
void | setValue (Field f, const casacore::String &value) |
bool | anyAveraging () const |
If any explicit averaging is turned ON, return true. More... | |
bool | channel () const |
Convenience methods for returning the standard field values. More... | |
double | channelValue () const |
casacore::String | channelStr () const |
bool | time () const |
double | timeValue () const |
casacore::String | timeStr () const |
bool | scan () const |
bool | field () const |
bool | baseline () const |
bool | antenna () const |
bool | spw () const |
bool | scalarAve () const |
void | setChannel (const casacore::String &value) |
Convenience methods for setting the standard field values. More... | |
void | setChannel (bool flag) |
void | setChannelValue (double value) |
void | setTime (const casacore::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. More... | |
bool | operator!= (const PlotMSAveraging &other) const |
casacore::String | summary () const |
Print out a summary of the averaging state: More... | |
casacore::String | toStringShort () const |
Print out an abbreviated summary of the averaging state. More... | |
Static Public Member Functions | |
static scalar bool | fieldHasValue (Field f) |
Returns whether the given field has a double value associated with it or not. More... | |
static const std::vector< Field > & | fieldMutuallyExclusiveGroup (Field f) |
Returns the list of fields, NOT including the given, with which the given field is mutually exclusive. More... | |
static bool | fieldIsInMutuallyExclusiveGroup (Field f) |
Returns true if the given field is in a mutually exclusive group, false otherwise. More... | |
Public Attributes | |
fields | |
fieldStrings | |
field | |
channel | |
time | |
scan | |
baseline | |
antenna | |
spw | |
Private Member Functions | |
void | setDefaults () |
Sets the default values. More... | |
Private Attributes | |
std::map< Field, bool > | itsFlags_ |
Averaging field flags. More... | |
std::map< Field, double > | itsValues_ |
Averaging field double values. More... | |
Static Private Attributes | |
static const casacore::String | RKEY_VALUE |
casacore::String constant for what to append to the enum name in the record to get the key for the double value. More... | |
Specifies averaging parameters for an MS.
Definition at line 37 of file PlotMSAveraging.h.
casa::PlotMSAveraging::PlotMSAveraging | ( | ) |
Non-Static //.
Constructor, which uses default values.
casa::PlotMSAveraging::~PlotMSAveraging | ( | ) |
Destructor.
|
inline |
Definition at line 132 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
|
inline |
If any explicit averaging is turned ON, return true.
Definition at line 118 of file PlotMSAveraging.h.
References antenna(), baseline(), channel(), spw(), and time().
|
inline |
Definition at line 131 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
|
inline |
Convenience methods for returning the standard field values.
Definition at line 123 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
|
inline |
Definition at line 125 of file PlotMSAveraging.h.
References getValueStr().
|
inline |
Definition at line 124 of file PlotMSAveraging.h.
References getValue().
|
inline |
Definition at line 130 of file PlotMSAveraging.h.
References getFlag().
|
static |
Returns whether the given field has a double value associated with it or not.
|
inlinestatic |
Returns true if the given field is in a mutually exclusive group, false otherwise.
See fieldMutuallyExclusiveGroup().
Definition at line 71 of file PlotMSAveraging.h.
References fieldMutuallyExclusiveGroup().
|
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 casacore::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().
|
inline |
double casa::PlotMSAveraging::getValue | ( | Field | f | ) | const |
Gets/Sets the double value for the given field, if applicable.
Referenced by channelValue(), and timeValue().
|
inline |
|
inline |
Definition at line 112 of file PlotMSAveraging.h.
References getValueStr().
casacore::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 casacore::String form is used.
Referenced by channelStr(), getValue(), and timeStr().
|
inline |
Definition at line 157 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 casacore::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.**
|
inline |
Definition at line 134 of file PlotMSAveraging.h.
References getFlag().
|
inline |
Definition at line 129 of file PlotMSAveraging.h.
References getFlag().
|
inline |
Definition at line 148 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 147 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Convenience methods for setting the standard field values.
Definition at line 139 of file PlotMSAveraging.h.
References setValue().
|
inline |
Definition at line 140 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 141 of file PlotMSAveraging.h.
References setValue().
|
private |
Sets the default values.
|
inline |
Definition at line 146 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().
|
inline |
Definition at line 150 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 145 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 149 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 142 of file PlotMSAveraging.h.
References setValue().
|
inline |
Definition at line 143 of file PlotMSAveraging.h.
References setFlag().
|
inline |
Definition at line 144 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 casacore::String & | value | ||
) |
|
inline |
Definition at line 133 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
casacore::String casa::PlotMSAveraging::summary | ( | ) | const |
Print out a summary of the averaging state:
|
inline |
Definition at line 126 of file PlotMSAveraging.h.
References getFlag().
Referenced by anyAveraging().
|
inline |
Definition at line 128 of file PlotMSAveraging.h.
References getValueStr().
|
inline |
Definition at line 127 of file PlotMSAveraging.h.
References getValue().
casacore::Record casa::PlotMSAveraging::toRecord | ( | bool | useStrings = false | ) | const |
casacore::String casa::PlotMSAveraging::toStringShort | ( | ) | const |
Print out an abbreviated summary of the averaging state.
casa::PlotMSAveraging::antenna |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::baseline |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::channel |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::field |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::fields |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::fieldStrings |
Definition at line 53 of file PlotMSAveraging.h.
|
private |
Averaging field flags.
Definition at line 169 of file PlotMSAveraging.h.
|
private |
Averaging field double values.
Definition at line 172 of file PlotMSAveraging.h.
|
staticprivate |
casacore::String constant for what to append to the enum name in the record to get the key for the double value.
Definition at line 181 of file PlotMSAveraging.h.
casa::PlotMSAveraging::scan |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::spw |
Definition at line 53 of file PlotMSAveraging.h.
casa::PlotMSAveraging::time |
Definition at line 53 of file PlotMSAveraging.h.