casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
casa::MSSpwIndex Class Reference

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

#include <MSSpwIndex.h>

List of all members.

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.
virtual ~MSSpwIndex ()
 Null destructor.
Vector< IntmatchName (const String &name)
 Look up FIELD_ID's for a given field name, or set of field names.
Vector< IntmatchName (const Vector< String > &names)
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.
Vector< IntmatchRegexOrPattern (const String &pattern, const Bool regex=False)
 Look up FIELD_ID's for a given pattern/regex for source name/code.
Vector< IntmatchId (const Vector< Int > &spwIds)
 Look up FIELD_ID's for a given source id.
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
}
 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.

Private Attributes

ROMSSpWindowColumns msSpwSubTable_p
 FIELD subtable column accessor.
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

enum casa::MSSpwIndex::MODES [private]

ROMSDataDescColumns msDataDescSubTable_p;.

Enumerator:
EXACT 
APPROX 
RANGE 

Definition at line 137 of file MSSpwIndex.h.

Enumerator:
MSSPW_INDEXRANGE 
MSSPW_INDEX 
MSSPW_UNITHZ 
MSSPW_UNITVELOCITY 

Definition at line 90 of file MSSpwIndex.h.


Constructor & Destructor Documentation

Construct from an MS FIELD subtable.

virtual casa::MSSpwIndex::~MSSpwIndex ( ) [inline, virtual]

Null destructor.

Definition at line 96 of file MSSpwIndex.h.

Construct from an MS FIELD subtable.


Member Function Documentation

Vector<Int> casa::MSSpwIndex::convertToChannelIndex ( const Vector< Int > &  spw,
const Vector< Float > &  freqList,
Int nFSpec 
)
Vector<Float> casa::MSSpwIndex::convertToMKS ( const Float  f0,
const Float  f1,
const String unit 
)
Vector<Int> casa::MSSpwIndex::convertToSpwIndex ( const Vector< Float > &  freqList,
Int nFSpec 
)
Int casa::MSSpwIndex::findChanIndex_p ( const Float freq,
const Vector< Double > &  chanFreqList,
const Bool greaterThan,
const Bool ascendingOrder 
) [private]
Vector<Int> casa::MSSpwIndex::matchFrequencyRange ( const Float  f0,
const Float  f1,
Bool  approx,
const Float  f3 = 0 
)
Bool casa::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.

Vector<Int> casa::MSSpwIndex::matchGTAndLT ( const Int  n0,
const int  n1 
)
Vector<Int> casa::MSSpwIndex::matchGTAndLT ( const Float phyValMin,
const Float phyValMax 
)
Vector<Int> casa::MSSpwIndex::matchId ( const Vector< Int > &  spwIds)

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.

Vector<Int> casa::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

FIELD subtable column accessor.

Definition at line 135 of file MSSpwIndex.h.

Definition at line 138 of file MSSpwIndex.h.


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