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 | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
casa::PlotMSAveraging Class Reference

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...
 

Detailed Description

Specifies averaging parameters for an MS.

Definition at line 37 of file PlotMSAveraging.h.

Constructor & Destructor Documentation

casa::PlotMSAveraging::PlotMSAveraging ( )

Non-Static //.

Constructor, which uses default values.

casa::PlotMSAveraging::~PlotMSAveraging ( )

Destructor.

Member Function Documentation

bool casa::PlotMSAveraging::antenna ( void  ) const
inline

Definition at line 132 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 118 of file PlotMSAveraging.h.

References antenna(), baseline(), channel(), spw(), and time().

bool casa::PlotMSAveraging::baseline ( ) const
inline

Definition at line 131 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 123 of file PlotMSAveraging.h.

References getFlag().

Referenced by anyAveraging().

casacore::String casa::PlotMSAveraging::channelStr ( ) const
inline

Definition at line 125 of file PlotMSAveraging.h.

References getValueStr().

double casa::PlotMSAveraging::channelValue ( ) const
inline

Definition at line 124 of file PlotMSAveraging.h.

References getValue().

bool casa::PlotMSAveraging::field ( void  ) const
inline

Definition at line 130 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)
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 const std::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 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().

void casa::PlotMSAveraging::getFlag ( Field  f,
bool &  flag 
) const
inline

Definition at line 96 of file PlotMSAveraging.h.

References getFlag().

Referenced by getFlag().

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

Definition at line 103 of file PlotMSAveraging.h.

References getValue().

Referenced by getValue().

void casa::PlotMSAveraging::getValue ( Field  f,
casacore::String value 
) const
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().

bool casa::PlotMSAveraging::operator!= ( const PlotMSAveraging other) const
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.**

bool casa::PlotMSAveraging::scalarAve ( ) const
inline

Definition at line 134 of file PlotMSAveraging.h.

References getFlag().

bool casa::PlotMSAveraging::scan ( ) const
inline

Definition at line 129 of file PlotMSAveraging.h.

References getFlag().

void casa::PlotMSAveraging::setAntenna ( bool  flag)
inline

Definition at line 148 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setBaseline ( bool  flag)
inline

Definition at line 147 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setChannel ( const casacore::String value)
inline

Convenience methods for setting the standard field values.

Definition at line 139 of file PlotMSAveraging.h.

References setValue().

void casa::PlotMSAveraging::setChannel ( bool  flag)
inline

Definition at line 140 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setChannelValue ( double  value)
inline

Definition at line 141 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 146 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setFlag ( Field  f,
bool  on 
)
void casa::PlotMSAveraging::setScalarAve ( bool  flag)
inline

Definition at line 150 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setScan ( bool  flag)
inline

Definition at line 145 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setSpw ( bool  flag)
inline

Definition at line 149 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setTime ( const casacore::String value)
inline

Definition at line 142 of file PlotMSAveraging.h.

References setValue().

void casa::PlotMSAveraging::setTime ( bool  flag)
inline

Definition at line 143 of file PlotMSAveraging.h.

References setFlag().

void casa::PlotMSAveraging::setTimeValue ( double  value)
inline

Definition at line 144 of file PlotMSAveraging.h.

References setValue().

void casa::PlotMSAveraging::setValue ( Field  f,
double  value 
)
void casa::PlotMSAveraging::setValue ( Field  f,
const casacore::String value 
)
bool casa::PlotMSAveraging::spw ( void  ) const
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:

bool casa::PlotMSAveraging::time ( void  ) const
inline

Definition at line 126 of file PlotMSAveraging.h.

References getFlag().

Referenced by anyAveraging().

casacore::String casa::PlotMSAveraging::timeStr ( ) const
inline

Definition at line 128 of file PlotMSAveraging.h.

References getValueStr().

double casa::PlotMSAveraging::timeValue ( ) const
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.

Member Data Documentation

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.

std::map<Field, bool> casa::PlotMSAveraging::itsFlags_
private

Averaging field flags.

Definition at line 169 of file PlotMSAveraging.h.

std::map<Field, double> casa::PlotMSAveraging::itsValues_
private

Averaging field double values.

Definition at line 172 of file PlotMSAveraging.h.

const casacore::String casa::PlotMSAveraging::RKEY_VALUE
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.


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