Loading...
Searching...
No Matches
casacore::MSSpwIndex Class Reference
ms package (libcasa_ms) » MSSel_module

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

## Private Attributes

MSSpWindowColumns | msSpwSubTable_p
| FIELD subtable column accessor.
Vector< Int > | spwIDs

## 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

- MeasurementSet

### 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 84 of file MSSpwIndex.h.

## Member Enumeration Documentation

## MODES

enum casacore::MSSpwIndex::MODES

private

MSDataDescColumns msDataDescSubTable_p;.

Enumerator
EXACT |
APPROX |
RANGE |

Definition at line 135 of file MSSpwIndex.h.

## MSSpwTypes

enum casacore::MSSpwIndex::MSSpwTypes

Enumerator
MSSPW_INDEXRANGE |
MSSPW_INDEX |
MSSPW_UNITHZ |
MSSPW_UNITVELOCITY |

Definition at line 87 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 | ( |  | ) |

inline virtual

Null destructor.

Definition at line 93 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.

References casacore::name().

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

References casacore::False, casacore::pattern(), and casacore::regex().

## Member Data Documentation

## msSpwSubTable_p

MSSpWindowColumns casacore::MSSpwIndex::msSpwSubTable_p

private

FIELD subtable column accessor.

Definition at line 133 of file MSSpwIndex.h.

## spwIDs

Vector<Int> casacore::MSSpwIndex::spwIDs

private

Definition at line 136 of file MSSpwIndex.h.

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

- ms/MSSel/MSSpwIndex.h