casacore
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
casacore::MSSpwIndex Class Reference

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< IntmatchName (const String &name)
 Look up FIELD_ID's for a given field name, or set of field names. More...
 
Vector< IntmatchName (const Vector< String > &names)
 
void matchNameAsIntID (Vector< int > &list)
 
Vector< IntmatchFrequencyRange (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< IntmatchRegexOrPattern (const String &pattern, const Bool regex=False)
 Look up FIELD_ID's for a given pattern/regex for source name/code. More...
 
Vector< IntmatchId (const Vector< Int > &spwIds)
 Look up FIELD_ID's for a given source id. More...
 
Vector< IntmatchLT (const Int n)
 
Vector< IntmatchGT (const Int n)
 
Vector< IntmatchGTAndLT (const Int n0, const int n1)
 
Vector< IntmatchLT (const Float *)
 
Vector< IntmatchGT (const Float *)
 
Vector< IntmatchGTAndLT (const Float *phyValMin, const Float *phyValMax)
 
Vector< FloatconvertToMKS (const Float f0, const Float f1, const String &unit)
 
Vector< IntconvertToChannelIndex (const Vector< Int > &spw, const Vector< Float > &freqList, Int &nFSpec)
 
Vector< IntconvertToSpwIndex (const Vector< Float > &freqList, Int &nFSpec)
 

Private Types

enum  MODES {
  EXACT ,
  APPROX ,
  RANGE
}
 MSDataDescColumns 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

MSSpWindowColumns msSpwSubTable_p
 FIELD subtable column accessor. More...
 
Vector< IntspwIDs
 

Detailed Description


Class to handle lookup or indexing into a MS Data_Desc_ID and SpectralWindow subtables

Intended use:

Public interface

Review Status

Date Reviewed:
yyyy/mm/dd

Prerequisite

Etymology

From "MeasurementSet", "SpectralWindwo subtable" and "index".

Synopsis

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

Example

Motivation

Collect together all subtable indexing and lookup for the data description and spectral window subtable, for encapsulation and efficiency.

Thrown Exceptions

Definition at line 87 of file MSSpwIndex.h.

Member Enumeration Documentation

◆ MODES

MSDataDescColumns msDataDescSubTable_p;.

Enumerator
EXACT 
APPROX 
RANGE 

Definition at line 138 of file MSSpwIndex.h.

◆ MSSpwTypes

Enumerator
MSSPW_INDEXRANGE 
MSSPW_INDEX 
MSSPW_UNITHZ 
MSSPW_UNITVELOCITY 

Definition at line 90 of file MSSpwIndex.h.

Constructor & Destructor Documentation

◆ MSSpwIndex() [1/2]

casacore::MSSpwIndex::MSSpwIndex ( const MSSpectralWindow msSpw)

Construct from an MS FIELD subtable.

◆ ~MSSpwIndex()

virtual casacore::MSSpwIndex::~MSSpwIndex ( )
inlinevirtual

Null destructor.

Definition at line 96 of file MSSpwIndex.h.

◆ MSSpwIndex() [2/2]

casacore::MSSpwIndex::MSSpwIndex ( )
private

Construct from an MS FIELD subtable.

Member Function Documentation

◆ convertToChannelIndex()

Vector<Int> casacore::MSSpwIndex::convertToChannelIndex ( const Vector< Int > &  spw,
const Vector< Float > &  freqList,
Int nFSpec 
)

◆ convertToMKS()

Vector<Float> casacore::MSSpwIndex::convertToMKS ( const Float  f0,
const Float  f1,
const String unit 
)

◆ convertToSpwIndex()

Vector<Int> casacore::MSSpwIndex::convertToSpwIndex ( const Vector< Float > &  freqList,
Int nFSpec 
)

◆ findChanIndex_p()

Int casacore::MSSpwIndex::findChanIndex_p ( const Float freq,
const Vector< Double > &  chanFreqList,
const Bool greaterThan,
const Bool ascendingOrder 
)
private

◆ matchFrequencyRange() [1/2]

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.

◆ matchFrequencyRange() [2/2]

Vector<Int> casacore::MSSpwIndex::matchFrequencyRange ( const Float  f0,
const Float  f1,
Bool  approx,
const Float  f3 = 0 
)

◆ matchGT() [1/2]

Vector<Int> casacore::MSSpwIndex::matchGT ( const Float )

◆ matchGT() [2/2]

Vector<Int> casacore::MSSpwIndex::matchGT ( const Int  n)

◆ matchGTAndLT() [1/2]

Vector<Int> casacore::MSSpwIndex::matchGTAndLT ( const Float phyValMin,
const Float phyValMax 
)

◆ matchGTAndLT() [2/2]

Vector<Int> casacore::MSSpwIndex::matchGTAndLT ( const Int  n0,
const int  n1 
)

◆ matchId()

Vector<Int> casacore::MSSpwIndex::matchId ( const Vector< Int > &  spwIds)

Look up FIELD_ID's for a given source id.

◆ matchLT() [1/2]

Vector<Int> casacore::MSSpwIndex::matchLT ( const Float )

◆ matchLT() [2/2]

Vector<Int> casacore::MSSpwIndex::matchLT ( const Int  n)

◆ matchName() [1/2]

Vector<Int> casacore::MSSpwIndex::matchName ( const String name)

Look up FIELD_ID's for a given field name, or set of field names.

◆ matchName() [2/2]

Vector<Int> casacore::MSSpwIndex::matchName ( const Vector< String > &  names)

◆ matchNameAsIntID()

void casacore::MSSpwIndex::matchNameAsIntID ( Vector< int > &  list)

◆ matchRegexOrPattern()

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.

Member Data Documentation

◆ msSpwSubTable_p

MSSpWindowColumns casacore::MSSpwIndex::msSpwSubTable_p
private

FIELD subtable column accessor.

Definition at line 136 of file MSSpwIndex.h.

◆ spwIDs

Vector<Int> casacore::MSSpwIndex::spwIDs
private

Definition at line 139 of file MSSpwIndex.h.


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