Loading...
Searching...
No Matches
MSSelectionKeywords.h
Go to the documentation of this file.
//# MSSelectionKeywords.h: selection keywords for the MS
//# Copyright (C) 1997,1998,1999,2000,2001
//# Associated Universities, Inc. Washington DC, USA.
//#
//# This library is free software; you can redistribute it and/or modify it
//# under the terms of the GNU Library General Public License as published by
//# the Free Software Foundation; either version 2 of the License, or (at your
//# option) any later version.
//#
//# This library is distributed in the hope that it will be useful, but WITHOUT
//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
//# License for more details.
//#
//# You should have received a copy of the GNU Library General Public License
//# along with this library; if not, write to the Free Software Foundation,
//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
//#
//# Correspondence concerning AIPS++ should be addressed as follows:
//# Internet email: casa-feedback@nrao.edu.
//# Postal address: AIPS++ Project Office
//# National Radio Astronomy Observatory
//# 520 Edgemont Road
//# Charlottesville, VA 22903-2475 USA
#ifndef MS_MSSELECTIONKEYWORDS_H
#define MS_MSSELECTIONKEYWORDS_H
#include <casacore/casa/aips.h>
#include <map>
namespace casacore { //# NAMESPACE CASACORE - BEGIN
template <class T> class Block;
// forward declare the class so we can typedef it
class MSSelectionKeywords;
class String;
// Define a shorthand notation for this class, so enums can be specified
// easily.
typedef MSSelectionKeywords MSS;
// <summary>
// MSSelectionKeywords specifies selection keywords for the MeasurementSet
// </summary>
// <use visibility=export>
// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
// </reviewed>
// <prerequisite>
// <li> MeasurementSet
// <li> MSSelector
// </prerequisite>
//
// <etymology>
// MSSelectionKeywords is a class that defines selection keywords
// </etymology>
//
// <synopsis>
// This class is used to specify selections on a MeasurementSet.
// It is a purely static class that just defines a mapping from
// Strings to Enums, and provides these for use by classes like
// MSSelector and MSRange
//
// <example> <srcblock>
// </srcblock></example>
// </synopsis>
//
// <motivation>
// Selection keywords are needed for several classes, this class provides
// them to all, avoiding duplication in each class.
// </motivation>
//
// <thrown>
// <li>
// <li>
// </thrown>
//
// <todo asof="yyyy/mm/dd">
// <li> add this feature
// </todo>
class MSSelectionKeywords
{
public:
// The fields in the MS for which selection and range operations are
// defined. Some of these directly correspond to columns in the table,
// others are derived quantities or columns in subtables.
enum Field {
// undefined field
UNDEFINED=0,
// the range of visibility amplitude
AMPLITUDE,
// the range of corrected vis amplitude
CORRECTED_AMPLITUDE,
// the range of model vis amplitude
MODEL_AMPLITUDE,
// the amplitude of the ratio corrected data/model data
RATIO_AMPLITUDE,
// the residual vis amplitude (corrected-model)
RESIDUAL_AMPLITUDE,
// the observed residual vis amplitude (observed-model)
OBS_RESIDUAL_AMPLITUDE,
// the list of antenna1 id values
ANTENNA1,
// the list of antenna2 id values
ANTENNA2,
// the list of antenna names
ANTENNAS,
// the list of array id values
ARRAY_ID,
// description of the data axes
AXIS_INFO,
// the channel frequencies, a vector for each selected spectral window
CHAN_FREQ,
// the list of polarizations present, this gives the String values
CORR_NAMES,
// the list of polarizations present, this gives the Stokes enum values
CORR_TYPES,
// the complex data
DATA,
// the complex corrected data
CORRECTED_DATA,
//the complex model data
MODEL_DATA,
// the ratio corrected data/model data
RATIO_DATA,
// the residual data (corrected - model)
RESIDUAL_DATA,
// the observed residual data (observed - model)
OBS_RESIDUAL_DATA,
// the list of dataDescription id values
DATA_DESC_ID,
// the list of feed1 id values
FEED1,
// the list of feed2 id values
FEED2,
// the list of field_id values
FIELD_ID,
// the list of field names
FIELDS,
// the flags
FLAG,
// the row flags
FLAG_ROW,
// a summary of flags (flag count summed over rows)
FLAG_SUM,
// the float data (optional single dish column)
FLOAT_DATA,
// Hour angle
HA,
// the list of interferometers (= 1000*ant1+ant2) present
IFR_NUMBER,
// the (range of the) imaginary part of the visibilities
IMAGINARY,
// the (range of the) imaginary part of the corrected visibilities
CORRECTED_IMAGINARY,
// the (range of the) imaginary part of the model visibilities
MODEL_IMAGINARY,
// the imaginary part of the ratio corrected data/model data
RATIO_IMAGINARY,
// the (range of the) imaginary part of the residual visibilities
RESIDUAL_IMAGINARY,
// the (range of the) imaginary part of the observed residual visibilities
OBS_RESIDUAL_IMAGINARY,
// Local Apparent Sidereal Time
LAST,
// the number of correlation products (polarizations) for selected spectral window
NUM_CORR,
// the number of spectral channels for selected spectral window
NUM_CHAN,
// the (range of the) phase of the visibilities
PHASE,
// the (range of the) phase of the corrected visibilities
CORRECTED_PHASE,
// the (range of the) phase of the model visibilities
MODEL_PHASE,
// the phase of the ratio corrected data/model data
RATIO_PHASE,
// the (range of the) phase of the residual visibilities
RESIDUAL_PHASE,
// the (range of the) phase of the observed residual visibilities
OBS_RESIDUAL_PHASE,
// the phase center direction for each field (matrix + epoch)
PHASE_DIR,
// the (range of the) real part of the visibilities
REAL,
// the (range of the) real part of the corrected visibilities
CORRECTED_REAL,
// the (range of the) real part of the model visibilities
MODEL_REAL,
// the real part of the ratio corrected data/model data
RATIO_REAL,
// the real part of the residual visibilities (corrected-model)
RESIDUAL_REAL,
// the real part of the observed residuals (observed-model)
OBS_RESIDUAL_REAL,
// the reference frequency for selected spectral window (or vector with all)
REF_FREQUENCY,
// the list of row numbers in the original MS
ROWS,
// the list of scan_number values
SCAN_NUMBER,
//# the list of spectral window id values
//# SPECTRAL_WINDOW_ID,
// the per spectrum sigmas
SIGMA,
// the range of times
TIME,
// the list of time values
TIMES,
// UT time (seconds of current day)
UT,
// the uvw coordinates
UVW,
// the (range of the) U coordinate (m)
//# Note:order of U, V and W is important, no intervening items allowed
//# without changing select() code.
U,
// the (range of the) V coordinate (m)
V,
// the (range of the) W coordinate (m)
W,
// the (range of the) UV-distance (m)
UVDIST,
// the weights
WEIGHT,
// Number of keywords
NUMBER_KEYWORDS
};
// convert a keyword string to the corresponding enum
static Field field(const String& keyword);
// convert an enum value to the corresponding keyword string
static const String& keyword(Field field);
private:
// This class is purely static, no instances are allowed.
MSSelectionKeywords();
MSSelectionKeywords(const MSSelectionKeywords& other);
MSSelectionKeywords& operator=(const MSSelectionKeywords& other);
// Get the static map.
static std::map<String,Int>& getMap();
// Get the static reverse map.
static Block<String>& getReverseMap();
// Create an initialized map.
static std::map<String,Int> initMap();
// Create an initialized reverse map.
static Block<String> initReverseMap();
};
} //# NAMESPACE CASACORE - END
#endif
casacore::Block
Definition Block.h:140
casacore::MSSelectionKeywords
Definition MSSelectionKeywords.h:87
casacore::MSSelectionKeywords::MSSelectionKeywords
MSSelectionKeywords(const MSSelectionKeywords &other)
casacore::MSSelectionKeywords::MSSelectionKeywords
MSSelectionKeywords()
This class is purely static, no instances are allowed.
casacore::MSSelectionKeywords::initReverseMap
static Block< String > initReverseMap()
Create an initialized reverse map.
casacore::MSSelectionKeywords::Field
Field
The fields in the MS for which selection and range operations are defined.
Definition MSSelectionKeywords.h:92
casacore::MSSelectionKeywords::RESIDUAL_REAL
@ RESIDUAL_REAL
the real part of the residual visibilities (corrected-model)
Definition MSSelectionKeywords.h:198
casacore::MSSelectionKeywords::AXIS_INFO
@ AXIS_INFO
description of the data axes
Definition MSSelectionKeywords.h:116
casacore::MSSelectionKeywords::CORRECTED_AMPLITUDE
@ CORRECTED_AMPLITUDE
the range of corrected vis amplitude
Definition MSSelectionKeywords.h:98
casacore::MSSelectionKeywords::OBS_RESIDUAL_AMPLITUDE
@ OBS_RESIDUAL_AMPLITUDE
the observed residual vis amplitude (observed-model)
Definition MSSelectionKeywords.h:106
casacore::MSSelectionKeywords::UVW
@ UVW
the uvw coordinates
Definition MSSelectionKeywords.h:218
casacore::MSSelectionKeywords::MODEL_DATA
@ MODEL_DATA
the complex model data
Definition MSSelectionKeywords.h:128
casacore::MSSelectionKeywords::MODEL_IMAGINARY
@ MODEL_IMAGINARY
the (range of the) imaginary part of the model visibilities
Definition MSSelectionKeywords.h:162
casacore::MSSelectionKeywords::FLAG_SUM
@ FLAG_SUM
a summary of flags (flag count summed over rows)
Definition MSSelectionKeywords.h:150
casacore::MSSelectionKeywords::DATA
@ DATA
the complex data
Definition MSSelectionKeywords.h:124
casacore::MSSelectionKeywords::ANTENNA1
@ ANTENNA1
the list of antenna1 id values
Definition MSSelectionKeywords.h:108
casacore::MSSelectionKeywords::W
@ W
the (range of the) W coordinate (m)
Definition MSSelectionKeywords.h:226
casacore::MSSelectionKeywords::RATIO_AMPLITUDE
@ RATIO_AMPLITUDE
the amplitude of the ratio corrected data/model data
Definition MSSelectionKeywords.h:102
casacore::MSSelectionKeywords::AMPLITUDE
@ AMPLITUDE
the range of visibility amplitude
Definition MSSelectionKeywords.h:96
casacore::MSSelectionKeywords::CORRECTED_REAL
@ CORRECTED_REAL
the (range of the) real part of the corrected visibilities
Definition MSSelectionKeywords.h:192
casacore::MSSelectionKeywords::FLAG
@ FLAG
the flags
Definition MSSelectionKeywords.h:146
casacore::MSSelectionKeywords::CORRECTED_IMAGINARY
@ CORRECTED_IMAGINARY
the (range of the) imaginary part of the corrected visibilities
Definition MSSelectionKeywords.h:160
casacore::MSSelectionKeywords::HA
@ HA
Hour angle.
Definition MSSelectionKeywords.h:154
casacore::MSSelectionKeywords::CHAN_FREQ
@ CHAN_FREQ
the channel frequencies, a vector for each selected spectral window
Definition MSSelectionKeywords.h:118
casacore::MSSelectionKeywords::RESIDUAL_AMPLITUDE
@ RESIDUAL_AMPLITUDE
the residual vis amplitude (corrected-model)
Definition MSSelectionKeywords.h:104
casacore::MSSelectionKeywords::FIELD_ID
@ FIELD_ID
the list of field_id values
Definition MSSelectionKeywords.h:142
casacore::MSSelectionKeywords::UT
@ UT
UT time (seconds of current day).
Definition MSSelectionKeywords.h:216
casacore::MSSelectionKeywords::OBS_RESIDUAL_DATA
@ OBS_RESIDUAL_DATA
the observed residual data (observed - model)
Definition MSSelectionKeywords.h:134
casacore::MSSelectionKeywords::OBS_RESIDUAL_REAL
@ OBS_RESIDUAL_REAL
the real part of the observed residuals (observed-model)
Definition MSSelectionKeywords.h:200
casacore::MSSelectionKeywords::NUM_CHAN
@ NUM_CHAN
the number of spectral channels for selected spectral window
Definition MSSelectionKeywords.h:174
casacore::MSSelectionKeywords::RATIO_PHASE
@ RATIO_PHASE
the phase of the ratio corrected data/model data
Definition MSSelectionKeywords.h:182
casacore::MSSelectionKeywords::MODEL_AMPLITUDE
@ MODEL_AMPLITUDE
the range of model vis amplitude
Definition MSSelectionKeywords.h:100
casacore::MSSelectionKeywords::RATIO_REAL
@ RATIO_REAL
the real part of the ratio corrected data/model data
Definition MSSelectionKeywords.h:196
casacore::MSSelectionKeywords::MODEL_PHASE
@ MODEL_PHASE
the (range of the) phase of the model visibilities
Definition MSSelectionKeywords.h:180
casacore::MSSelectionKeywords::CORRECTED_PHASE
@ CORRECTED_PHASE
the (range of the) phase of the corrected visibilities
Definition MSSelectionKeywords.h:178
casacore::MSSelectionKeywords::ROWS
@ ROWS
the list of row numbers in the original MS
Definition MSSelectionKeywords.h:204
casacore::MSSelectionKeywords::WEIGHT
@ WEIGHT
the weights
Definition MSSelectionKeywords.h:230
casacore::MSSelectionKeywords::SIGMA
@ SIGMA
the per spectrum sigmas
Definition MSSelectionKeywords.h:210
casacore::MSSelectionKeywords::IMAGINARY
@ IMAGINARY
the (range of the) imaginary part of the visibilities
Definition MSSelectionKeywords.h:158
casacore::MSSelectionKeywords::V
@ V
the (range of the) V coordinate (m)
Definition MSSelectionKeywords.h:224
casacore::MSSelectionKeywords::RESIDUAL_DATA
@ RESIDUAL_DATA
the residual data (corrected - model)
Definition MSSelectionKeywords.h:132
casacore::MSSelectionKeywords::MODEL_REAL
@ MODEL_REAL
the (range of the) real part of the model visibilities
Definition MSSelectionKeywords.h:194
casacore::MSSelectionKeywords::FLAG_ROW
@ FLAG_ROW
the row flags
Definition MSSelectionKeywords.h:148
casacore::MSSelectionKeywords::OBS_RESIDUAL_IMAGINARY
@ OBS_RESIDUAL_IMAGINARY
the (range of the) imaginary part of the observed residual visibilities
Definition MSSelectionKeywords.h:168
casacore::MSSelectionKeywords::NUM_CORR
@ NUM_CORR
the number of correlation products (polarizations) for selected spectral window
Definition MSSelectionKeywords.h:172
casacore::MSSelectionKeywords::PHASE_DIR
@ PHASE_DIR
the phase center direction for each field (matrix + epoch)
Definition MSSelectionKeywords.h:188
casacore::MSSelectionKeywords::FLOAT_DATA
@ FLOAT_DATA
the float data (optional single dish column)
Definition MSSelectionKeywords.h:152
casacore::MSSelectionKeywords::CORRECTED_DATA
@ CORRECTED_DATA
the complex corrected data
Definition MSSelectionKeywords.h:126
casacore::MSSelectionKeywords::RATIO_DATA
@ RATIO_DATA
the ratio corrected data/model data
Definition MSSelectionKeywords.h:130
casacore::MSSelectionKeywords::IFR_NUMBER
@ IFR_NUMBER
the list of interferometers (= 1000*ant1+ant2) present
Definition MSSelectionKeywords.h:156
casacore::MSSelectionKeywords::DATA_DESC_ID
@ DATA_DESC_ID
the list of dataDescription id values
Definition MSSelectionKeywords.h:136
casacore::MSSelectionKeywords::TIME
@ TIME
the range of times
Definition MSSelectionKeywords.h:212
casacore::MSSelectionKeywords::LAST
@ LAST
Local Apparent Sidereal Time.
Definition MSSelectionKeywords.h:170
casacore::MSSelectionKeywords::REAL
@ REAL
the (range of the) real part of the visibilities
Definition MSSelectionKeywords.h:190
casacore::MSSelectionKeywords::CORR_TYPES
@ CORR_TYPES
the list of polarizations present, this gives the Stokes enum values
Definition MSSelectionKeywords.h:122
casacore::MSSelectionKeywords::RESIDUAL_IMAGINARY
@ RESIDUAL_IMAGINARY
the (range of the) imaginary part of the residual visibilities
Definition MSSelectionKeywords.h:166
casacore::MSSelectionKeywords::FEED1
@ FEED1
the list of feed1 id values
Definition MSSelectionKeywords.h:138
casacore::MSSelectionKeywords::RATIO_IMAGINARY
@ RATIO_IMAGINARY
the imaginary part of the ratio corrected data/model data
Definition MSSelectionKeywords.h:164
casacore::MSSelectionKeywords::FIELDS
@ FIELDS
the list of field names
Definition MSSelectionKeywords.h:144
casacore::MSSelectionKeywords::UVDIST
@ UVDIST
the (range of the) UV-distance (m)
Definition MSSelectionKeywords.h:228
casacore::MSSelectionKeywords::PHASE
@ PHASE
the (range of the) phase of the visibilities
Definition MSSelectionKeywords.h:176
casacore::MSSelectionKeywords::UNDEFINED
@ UNDEFINED
undefined field
Definition MSSelectionKeywords.h:94
casacore::MSSelectionKeywords::REF_FREQUENCY
@ REF_FREQUENCY
the reference frequency for selected spectral window (or vector with all)
Definition MSSelectionKeywords.h:202
casacore::MSSelectionKeywords::OBS_RESIDUAL_PHASE
@ OBS_RESIDUAL_PHASE
the (range of the) phase of the observed residual visibilities
Definition MSSelectionKeywords.h:186
casacore::MSSelectionKeywords::ANTENNA2
@ ANTENNA2
the list of antenna2 id values
Definition MSSelectionKeywords.h:110
casacore::MSSelectionKeywords::RESIDUAL_PHASE
@ RESIDUAL_PHASE
the (range of the) phase of the residual visibilities
Definition MSSelectionKeywords.h:184
casacore::MSSelectionKeywords::ANTENNAS
@ ANTENNAS
the list of antenna names
Definition MSSelectionKeywords.h:112
casacore::MSSelectionKeywords::ARRAY_ID
@ ARRAY_ID
the list of array id values
Definition MSSelectionKeywords.h:114
casacore::MSSelectionKeywords::SCAN_NUMBER
@ SCAN_NUMBER
the list of scan_number values
Definition MSSelectionKeywords.h:206
casacore::MSSelectionKeywords::CORR_NAMES
@ CORR_NAMES
the list of polarizations present, this gives the String values
Definition MSSelectionKeywords.h:120
casacore::MSSelectionKeywords::U
@ U
the (range of the) U coordinate (m)
Definition MSSelectionKeywords.h:222
casacore::MSSelectionKeywords::TIMES
@ TIMES
the list of time values
Definition MSSelectionKeywords.h:214
casacore::MSSelectionKeywords::NUMBER_KEYWORDS
@ NUMBER_KEYWORDS
Number of keywords.
Definition MSSelectionKeywords.h:232
casacore::MSSelectionKeywords::FEED2
@ FEED2
the list of feed2 id values
Definition MSSelectionKeywords.h:140
casacore::MSSelectionKeywords::keyword
static const String & keyword(Field field)
convert an enum value to the corresponding keyword string
casacore::MSSelectionKeywords::operator=
MSSelectionKeywords & operator=(const MSSelectionKeywords &other)
casacore::MSSelectionKeywords::initMap
static std::map< String, Int > initMap()
Create an initialized map.
casacore::MSSelectionKeywords::getReverseMap
static Block< String > & getReverseMap()
Get the static reverse map.
casacore::MSSelectionKeywords::getMap
static std::map< String, Int > & getMap()
Get the static map.
casacore::MSSelectionKeywords::field
static Field field(const String &keyword)
convert a keyword string to the corresponding enum
casacore::String
String: the storage and methods of handling collections of characters.
Definition String.h:223
casacore
this file contains all the compiler specific defines
Definition mainpage.dox:28
casacore::MSS
MSSelectionKeywords MSS
Define a shorthand notation for this class, so enums can be specified easily.
Definition MSSelectionKeywords.h:42