casa
$Rev:20696$
|
Class to hold values from field grammar parser. More...
#include <MSPolnParse.h>
Public Member Functions | |
MSPolnParse () | |
Default constructor. | |
MSPolnParse (const MeasurementSet *ms) | |
~MSPolnParse() {cleanup();}; | |
const TableExprNode | selectFromIDList (const Vector< Int > &ddIDs) |
const TableExprNode | node () |
Get table expression node object. | |
void | reset () |
static MSPolnParse* thisMSSParser; | |
void | cleanup () |
Int | theParser (const String &command) |
OrderedMap< Int, Vector< Int > > | selectedPolnMap () |
Vector<Int>& selectedDDIDs, Matrix<Int>& selectedSpwPolnMap);. | |
OrderedMap< Int, Vector < Vector< Int > > > | selectedSetupMap () |
Vector< Int > | selectedDDIDs () |
Private Member Functions | |
Vector< Int > | getMapToDDIDs (MSDataDescIndex &msDDNdx, MSPolarizationIndex &msPolNdx, const Vector< Int > &spwIDs, Vector< Int > &polnIDs, Vector< Int > &polIndices) |
Vector< Int > | matchPolIDsToPolTableRow (const Vector< Int > &polIds, OrderedMap< Int, Vector< Int > > &polIndexMap, Vector< Int > &polIndices, Bool addToMap=False) |
Vector< Int > | getPolnIDs (const String &polSpec, Vector< Int > &polIndices) |
Vector< Int > | getPolnIndices (const Int &polnID, const Vector< Int > &polnIDList) |
Vector< Int > | getPolnIDsV2 (const String &polSpec, Vector< Int > &polTypes) |
These are the versions used in the code. | |
Vector< Int > | getMapToDDIDsV2 (const String &polExpr, const Vector< Int > &spwIDs, Vector< Int > &polnIDs, Vector< Int > &polnIndices) |
void | setIDLists (const Int key, const Int ndx, Vector< Int > &val) |
Private Attributes | |
TableExprNode | node_p |
Vector< Int > | ddIDList_p |
OrderedMap< Int, Vector< Int > > | polMap_p |
OrderedMap< Int, Vector < Vector< Int > > > | setupMap_p |
Class to hold values from field grammar parser.
Internal
MSPolnParse is the class used to parse a polarization selection command.
MSPolnParse is used by the parser of polarization sub-expression statements of the type [SPW:]POLN. Since this is a relatively simple expression to tokenize and parse, this parser is written without Bison or Flex. The methods of this class take an expression, and internally generate a list of the Data Description IDs that should be used to select the rows in the MS main table. The map of Polarization IDs (row numbers in the POLARIZATION sub-table) and the list of indices to be used to pick the user selected polarzation data (in the DATA columns of the MS main table) is also generated. This map is intended to be used along with the map of SPW and selected channels to apply the in-row selection (Slice on the data columns).
It is necessary to be able to give a data selection command in ASCII. This can be used in a CLI or in the table browser to get a subset of a table or to sort a table.
Definition at line 90 of file MSPolnParse.h.
Default constructor.
casa::MSPolnParse::MSPolnParse | ( | const MeasurementSet * | ms | ) |
~MSPolnParse() {cleanup();};
Associate the ms and the shorthand.
void casa::MSPolnParse::cleanup | ( | ) | [inline] |
Definition at line 106 of file MSPolnParse.h.
Vector<Int> casa::MSPolnParse::getMapToDDIDs | ( | MSDataDescIndex & | msDDNdx, |
MSPolarizationIndex & | msPolNdx, | ||
const Vector< Int > & | spwIDs, | ||
Vector< Int > & | polnIDs, | ||
Vector< Int > & | polIndices | ||
) | [private] |
Vector<Int> casa::MSPolnParse::getMapToDDIDsV2 | ( | const String & | polExpr, |
const Vector< Int > & | spwIDs, | ||
Vector< Int > & | polnIDs, | ||
Vector< Int > & | polnIndices | ||
) | [private] |
Vector<Int> casa::MSPolnParse::getPolnIDs | ( | const String & | polSpec, |
Vector< Int > & | polIndices | ||
) | [private] |
Vector<Int> casa::MSPolnParse::getPolnIDsV2 | ( | const String & | polSpec, |
Vector< Int > & | polTypes | ||
) | [private] |
These are the versions used in the code.
Vector<Int> casa::MSPolnParse::getPolnIndices | ( | const Int & | polnID, |
const Vector< Int > & | polnIDList | ||
) | [private] |
Vector<Int> casa::MSPolnParse::matchPolIDsToPolTableRow | ( | const Vector< Int > & | polIds, |
OrderedMap< Int, Vector< Int > > & | polIndexMap, | ||
Vector< Int > & | polIndices, | ||
Bool | addToMap = False |
||
) | [private] |
const TableExprNode casa::MSPolnParse::node | ( | ) |
Get table expression node object.
void casa::MSPolnParse::reset | ( | ) | [inline] |
static MSPolnParse* thisMSSParser;
Definition at line 105 of file MSPolnParse.h.
References casa::Map< key, value >::clear(), ddIDList_p, polMap_p, and casa::Vector< T >::resize().
Vector<Int> casa::MSPolnParse::selectedDDIDs | ( | ) | [inline] |
Definition at line 112 of file MSPolnParse.h.
References ddIDList_p.
OrderedMap<Int, Vector<Int> > casa::MSPolnParse::selectedPolnMap | ( | ) | [inline] |
Vector<Int>& selectedDDIDs, Matrix<Int>& selectedSpwPolnMap);.
Definition at line 110 of file MSPolnParse.h.
References polMap_p.
OrderedMap<Int, Vector<Vector<Int> > > casa::MSPolnParse::selectedSetupMap | ( | ) | [inline] |
Definition at line 111 of file MSPolnParse.h.
References setupMap_p.
const TableExprNode casa::MSPolnParse::selectFromIDList | ( | const Vector< Int > & | ddIDs | ) |
void casa::MSPolnParse::setIDLists | ( | const Int | key, |
const Int | ndx, | ||
Vector< Int > & | val | ||
) | [private] |
Int casa::MSPolnParse::theParser | ( | const String & | command | ) |
Vector<Int> casa::MSPolnParse::ddIDList_p [private] |
Definition at line 131 of file MSPolnParse.h.
Referenced by reset(), and selectedDDIDs().
TableExprNode casa::MSPolnParse::node_p [private] |
Definition at line 130 of file MSPolnParse.h.
OrderedMap<Int, Vector<Int> > casa::MSPolnParse::polMap_p [private] |
Definition at line 132 of file MSPolnParse.h.
Referenced by reset(), and selectedPolnMap().
OrderedMap<Int, Vector<Vector<Int> > > casa::MSPolnParse::setupMap_p [private] |
Definition at line 133 of file MSPolnParse.h.
Referenced by selectedSetupMap().