casa
5.7.0-16
|
Class to handle lookup or indexing into a MS Data_Desc_ID and SpectralWindow subtables. More...
#include <MSSpwIndex.h>
Public Types | |
enum | MSSpwTypes { MSSPW_INDEXRANGE, MSSPW_INDEX, MSSPW_UNITHZ, MSSPW_UNITVELOCITY } |
Public Member Functions | |
MSSpwIndex (const MSSpectralWindow &msSpw) | |
Construct from an MS FIELD subtable. More... | |
virtual | ~MSSpwIndex () |
Null destructor. More... | |
Vector< Int > | matchName (const String &name) |
Look up FIELD_ID's for a given field name, or set of field names. More... | |
Vector< Int > | matchName (const Vector< String > &names) |
void | matchNameAsIntID (Vector< int > &list) |
Vector< Int > | matchFrequencyRange (const Float f0, const Float f1, Bool approx, const Float f3=0) |
Bool | matchFrequencyRange (const Double f0, const Double f1, Vector< Int > &spw, Vector< Int > &start, Vector< Int > &nchan) |
A version of match freq range that does not throw an exception but returns false if no match...else spw, start, nchan returns the matches f0 and f1 are in Hz and the match is done in the frame defined in the SpectralWindow table. More... | |
Vector< Int > | matchRegexOrPattern (const String &pattern, const Bool regex=False) |
Look up FIELD_ID's for a given pattern/regex for source name/code. More... | |
Vector< Int > | matchId (const Vector< Int > &spwIds) |
Look up FIELD_ID's for a given source id. More... | |
Vector< Int > | matchLT (const Int n) |
Vector< Int > | matchGT (const Int n) |
Vector< Int > | matchGTAndLT (const Int n0, const int n1) |
Vector< Int > | matchLT (const Float *) |
Vector< Int > | matchGT (const Float *) |
Vector< Int > | matchGTAndLT (const Float *phyValMin, const Float *phyValMax) |
Vector< Float > | convertToMKS (const Float f0, const Float f1, const String &unit) |
Vector< Int > | convertToChannelIndex (const Vector< Int > &spw, const Vector< Float > &freqList, Int &nFSpec) |
Vector< Int > | convertToSpwIndex (const Vector< Float > &freqList, Int &nFSpec) |
Private Types | |
enum | MODES { EXACT, APPROX, RANGE } |
ROMSDataDescColumns msDataDescSubTable_p;. More... | |
Private Member Functions | |
Int | findChanIndex_p (const Float &freq, const Vector< Double > &chanFreqList, const Bool &greaterThan, const Bool &ascendingOrder) |
MSSpwIndex () | |
Construct from an MS FIELD subtable. More... | |
Private Attributes | |
ROMSSpWindowColumns | msSpwSubTable_p |
FIELD subtable column accessor. More... | |
Vector< Int > | spwIDs |
Class to handle lookup or indexing into a MS Data_Desc_ID and SpectralWindow subtables.
Public interface
From "MeasurementSet", "SpectralWindwo subtable" and "index".
This class provides lookup and two level indexing into an MS DataDescription and SpectralWindow subtable. These services include returning list of integer data description IDs (DDID), given a list of Spectral window IDs or frequencies. The DDIDs are then used for selecting rows from the MS (since DDIDs are the primary keys in the maintable - not the spectral window IDs).
Collect together all subtable indexing and lookup for the data description and spectral window subtable, for encapsulation and efficiency.
Definition at line 87 of file MSSpwIndex.h.
|
private |
ROMSDataDescColumns msDataDescSubTable_p;.
Enumerator | |
---|---|
EXACT | |
APPROX | |
RANGE |
Definition at line 138 of file MSSpwIndex.h.
Enumerator | |
---|---|
MSSPW_INDEXRANGE | |
MSSPW_INDEX | |
MSSPW_UNITHZ | |
MSSPW_UNITVELOCITY |
Definition at line 90 of file MSSpwIndex.h.
casacore::MSSpwIndex::MSSpwIndex | ( | const MSSpectralWindow & | msSpw | ) |
Construct from an MS FIELD subtable.
|
inlinevirtual |
Null destructor.
Definition at line 96 of file MSSpwIndex.h.
|
private |
Construct from an MS FIELD subtable.
Vector<Int> casacore::MSSpwIndex::convertToChannelIndex | ( | const Vector< Int > & | spw, |
const Vector< Float > & | freqList, | ||
Int & | nFSpec | ||
) |
Vector<Float> casacore::MSSpwIndex::convertToMKS | ( | const Float | f0, |
const Float | f1, | ||
const String & | unit | ||
) |
Vector<Int> casacore::MSSpwIndex::convertToSpwIndex | ( | const Vector< Float > & | freqList, |
Int & | nFSpec | ||
) |
|
private |
Vector<Int> casacore::MSSpwIndex::matchFrequencyRange | ( | const Float | f0, |
const Float | f1, | ||
Bool | approx, | ||
const Float | f3 = 0 |
||
) |
Bool casacore::MSSpwIndex::matchFrequencyRange | ( | const Double | f0, |
const Double | f1, | ||
Vector< Int > & | spw, | ||
Vector< Int > & | start, | ||
Vector< Int > & | nchan | ||
) |
A version of match freq range that does not throw an exception but returns false if no match...else spw, start, nchan returns the matches f0 and f1 are in Hz and the match is done in the frame defined in the SpectralWindow table.
Look up FIELD_ID's for a given source id.
Look up FIELD_ID's for a given field name, or set of field names.
void casacore::MSSpwIndex::matchNameAsIntID | ( | Vector< int > & | list | ) |
Vector<Int> casacore::MSSpwIndex::matchRegexOrPattern | ( | const String & | pattern, |
const Bool | regex = False |
||
) |
Look up FIELD_ID's for a given pattern/regex for source name/code.
|
private |
FIELD subtable column accessor.
Definition at line 136 of file MSSpwIndex.h.
Definition at line 139 of file MSSpwIndex.h.