29 #ifndef MS_MSSELECTION_H
30 #define MS_MSSELECTION_H
148 const String& timeExpr=
"",
149 const String& antennaExpr=
"",
150 const String& fieldExpr=
"",
152 const String& uvDistExpr=
"",
153 const String& taqlExpr=
"",
154 const String& polnExpr=
"",
155 const String& scanExpr=
"",
156 const String& arrayExpr=
"",
157 const String& stateExpr=
"",
158 const String& observationExpr=
"",
159 const String& feedExpr=
"");
306 const Int defaultStep=1,
432 const Int defaultChanStep=1);
479 const String& outMSName=
"");
503 const String& timeExpr =
"",
504 const String& antennaExpr =
"",
505 const String& fieldExpr =
"",
506 const String& spwExpr =
"",
507 const String& uvDistExpr =
"",
508 const String& taqlExpr =
"",
509 const String& polnExpr =
"",
510 const String& scanExpr =
"",
511 const String& arrayExpr =
"",
512 const String& stateExpr =
"",
513 const String& observationExpr =
"");
518 const String& timeExpr =
"",
519 const String& antennaExpr =
"",
520 const String& fieldExpr =
"",
521 const String& spwExpr =
"",
522 const String& uvDistExpr =
"",
523 const String& taqlExpr =
"",
524 const String& polnExpr =
"",
525 const String& scanExpr =
"",
526 const String& arrayExpr =
"",
527 const String& stateExpr =
"",
528 const String& observationExpr =
"",
529 const String& feedExpr =
"");
537 const String& timeExpr =
"",
538 const String& antennaExpr =
"",
539 const String& fieldExpr =
"",
540 const String& spwExpr =
"",
541 const String& uvDistExpr =
"",
542 const String& taqlExpr =
"",
543 const String& polnExpr =
"",
544 const String& scanExpr =
"",
545 const String& arrayExpr =
"",
546 const String& stateExpr =
"",
547 const String& observationExpr =
"");
552 const String& timeExpr =
"",
553 const String& antennaExpr =
"",
554 const String& fieldExpr =
"",
555 const String& spwExpr =
"",
556 const String& uvDistExpr =
"",
557 const String& taqlExpr =
"",
558 const String& polnExpr =
"",
559 const String& scanExpr =
"",
560 const String& arrayExpr =
"",
561 const String& stateExpr =
"",
562 const String& observationExpr =
"",
563 const String& feedExpr =
"");
Vector< Int > getObservationList(const MeasurementSet *ms=NULL)
Accessor for the list of the selected observation IDs.
Vector< Int > getScanList(const MeasurementSet *ms=NULL)
Accessor for the list of the selected scan IDs.
MSSelection()
Default null constructor, and destructor.
void deleteErrorHandlers()
Delete error handlers (mostly the internally allocated ones).
Matrix< Int > getBaselineList(const MeasurementSet *ms=NULL)
Accessor for the list of selected baselines.
Vector< Int > observationIDs_p
Vector< Int > getAntenna1List(const MeasurementSet *ms=NULL)
Accessor for the list of antenna-1 of the selected baselines.
Vector< Int > getFieldList(const MeasurementSet *ms=NULL)
Accessor for the list of selected field IDs.
size_t nelements() const
How many elements does this array have? Product of all axis lengths.
Bool setSpwExpr(const String &spwExpr)
void setMaxObs(const Int &n=1000)
Bool setAntennaExpr(const String &antennaExpr)
Expression setters.
void resetMS(const MeasurementSet &ms)
Vector< Int > getDDIDList(const MeasurementSet *ms=NULL)
Accessor for the list of the selected Data Description IDs (DDID) from the polarization expression pa...
Vector< Int > getFeed1List(const MeasurementSet *ms=NULL)
Accessor for the list of the selected feed1 IDs.
Handle class for a table column expression tree.
void fromSelectionItem(const Record &selectionItem)
Initialize from a Record representing a selection item from the user interface or CLI...
Matrix< Double > getUVList(const MeasurementSet *ms=NULL)
Accessor for the list of the specified uv-range(s) as the start and end values in units used in the M...
Bool setObservationExpr(const String &observationExpr)
void getCorrSlices(Vector< Vector< Slice > > &corrslices, const MeasurementSet *ms=NULL)
Bool setFieldExpr(const String &fieldExpr)
void runErrorHandler()
Execute the handleError() method of the error-handlers.
Vector< Bool > selectedUVUnits_p
const MeasurementSet * ms_p
TableExprNode getTEN(const MeasurementSet *ms=NULL)
Accessor for result of parsing all of the selection expressions.
Matrix< Int > getFeedPairList(const MeasurementSet *ms=NULL)
Similar to baselines for antennas.
Bool setTaQLExpr(const String &taqlExpr)
Bool getSelectedMS(MeasurementSet &selectedMS, const String &outMSName="")
Return the selected MS.
Vector< Int > getAntenna2List(const MeasurementSet *ms=NULL)
Accessor for the list of antenna-2 of the selected baselines.
Bool setPolnExpr(const String &polnExpr)
Vector< Int > getFeed2List(const MeasurementSet *ms=NULL)
Accessor for the list of the selected feed2 IDs.
Bool setArrayExpr(const String &ArrayExpr)
void setMaxScans(const Int &n=1000)
Set the maximum value acceptable for SCAN, OBSERVATION or SUB-ARRAY IDs.
std::map< Int, Vector< Vector< Int > > > selectedSetupMap_p
void reset2(const MeasurementSet &ms, const MSSMode &mode=PARSE_NOW, const String &timeExpr="", const String &antennaExpr="", const String &fieldExpr="", const String &spwExpr="", const String &uvDistExpr="", const String &taqlExpr="", const String &polnExpr="", const String &scanExpr="", const String &arrayExpr="", const String &stateExpr="", const String &observationExpr="", const String &feedExpr="")
Add feedExpr; keep old signature for backwards compatibility.
std::map< Int, Vector< Int > > selectedPolMap_p
std::map< Int, Vector< Vector< Int > > > getCorrMap(const MeasurementSet *ms=NULL)
The key in the ordered map returned by getCorrMap() is the pol.
Vector< Int > stateObsModeIDs_p
Vector< Int > getSpwList(const MeasurementSet *ms=NULL)
Accessor for the list of the selected Spectral Window IDs.
std::map< Int, Vector< Int > > getPolMap(const MeasurementSet *ms=NULL)
The key in the ordered map returned by getPolMap() is the Data Description ID (DDID).
MSSelection: Class to represent a selection on an MS.
Matrix< Int > getChanList(const MeasurementSet *ms=NULL, const Int defaultStep=1, const Bool sorted=False)
Accessor for the table (as a nx4 Matrix) of the selected Spectral Windows and associated ranges of se...
TableExprNode toTableExprNode(const MeasurementSet *ms)
Convert to TableExprNode format (C++ interface to TaQL).
Vector< Int > exprOrder_p
Priority.
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
Bool definedAndSet(const Record &inpRec, const String &fieldName)
Check if record field exists and is not unset.
Vector< Int > getSPWDDIDList(const MeasurementSet *ms=NULL)
Accessor for the list of the selected Data Description IDs from the SPW expression parsing...
Bool setFeedExpr(const String &feedExpr)
void getChanSlices(Vector< Vector< Slice > > &chanslices, const MeasurementSet *ms=NULL, const Int defaultChanStep=1)
Methods to convert the maps return by getChanList and getCorrMap to a list of Slice which can be dire...
Bool setTimeExpr(const String &timeExpr)
static String nameExprStr(Vector< String > name)
Helper method for converting name vectors to expression strings.
const MeasurementSet * getMS(MSSelectableTable *msLike)
Return the pointer to the MS used internally.
Bool setScanExpr(const String &scanExpr)
MSSelectableTable: An interface class used by MSSelection module to access the sub-tables and main-ta...
Matrix< Double > selectedUVRange_p
A Table intended to hold astronomical data (a set of Measurements).
Vector< Bool > getUVUnitsList(const MeasurementSet *ms=NULL)
Accessor for the list of user defined units for the uv-range(s).
void reset(const MeasurementSet &ms, const MSSMode &mode=PARSE_NOW, const String &timeExpr="", const String &antennaExpr="", const String &fieldExpr="", const String &spwExpr="", const String &uvDistExpr="", const String &taqlExpr="", const String &polnExpr="", const String &scanExpr="", const String &arrayExpr="", const String &stateExpr="", const String &observationExpr="")
The MSSelection object is designed to be re-usable object.
Matrix< Double > getChanFreqList(const MeasurementSet *ms=NULL, const Bool sorted=False)
Same as getChanList, except that the channels and steps are in Hz.
Vector< Int > getSubArrayList(const MeasurementSet *ms=NULL)
Accessor for the list of selected sub-array IDs.
Bool setUvDistExpr(const String &uvDistExpr)
Bool exprIsNull(const MSExprType type=NO_EXPR)
Vector< Int > antenna2IDs_p
Bool setOrder(MSSelection::MSExprType type)
Set into the order of the selection expression.
Bool setStateExpr(const String &stateExpr)
TableExprNode fullTEN_p
Convert an MS select string to TaQL const String msToTaQL(const String& msSelect) {};...
void initErrorHandler(const MSExprType tye=NO_EXPR)
Initialize the error handler.
void clear(const MSExprType type=NO_EXPR)
Clear sub-expression and reset priority.
String: the storage and methods of handling collections of characters.
Matrix< Double > selectedTimesList_p
Matrix< Int > baselineIDs_p
String antennaExpr_p
Selection expressions.
void setMaxArray(const Int &n=1000)
void clearErrorHandlers()
Set all error handlers to a known state (NULL).
Vector< Int > antenna1IDs_p
void deleteNodes()
Convey to the various parsers to delete the TENs they hold.
const String getExpr(const MSExprType type=NO_EXPR)
Accessor for the various selection expressions as strings.
Vector< Int > getStateObsModeList(const MeasurementSet *ms=NULL)
Accessor for the list of selected state Obs_Modes.
void setErrorHandler(const MSExprType type, MSSelectionErrorHandler *mssEH, const Bool overRide=True)
Set the error handler to be used for reporting errors while parsing the type of expression give by th...
Matrix< Int > feedPairIDs_p
static String indexExprStr(Vector< Int > index)
Helper method for converting index vectors to expression strings.
Matrix< Double > getTimeList(const MeasurementSet *ms=NULL)
Accessor for the list of the specified time range(s) as the start and end MJD values.
MSSelection & operator=(const MSSelection &other)
Assignment operator.