casacore
Loading...
Searching...
No Matches
MSSelectionKeywords.h
Go to the documentation of this file.
1//# MSSelectionKeywords.h: selection keywords for the MS
2//# Copyright (C) 1997,1998,1999,2000,2001
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef MS_MSSELECTIONKEYWORDS_H
27#define MS_MSSELECTIONKEYWORDS_H
28
29#include <casacore/casa/aips.h>
30#include <map>
31
32namespace casacore { //# NAMESPACE CASACORE - BEGIN
33
34template <class T> class Block;
35
36// forward declare the class so we can typedef it
37class MSSelectionKeywords;
38class String;
39
40// Define a shorthand notation for this class, so enums can be specified
41// easily.
43
44// <summary>
45// MSSelectionKeywords specifies selection keywords for the MeasurementSet
46// </summary>
47
48// <use visibility=export>
49
50// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
51// </reviewed>
52
53// <prerequisite>
54// <li> MeasurementSet
55// <li> MSSelector
56// </prerequisite>
57//
58// <etymology>
59// MSSelectionKeywords is a class that defines selection keywords
60// </etymology>
61//
62// <synopsis>
63// This class is used to specify selections on a MeasurementSet.
64// It is a purely static class that just defines a mapping from
65// Strings to Enums, and provides these for use by classes like
66// MSSelector and MSRange
67//
68// <example> <srcblock>
69// </srcblock></example>
70// </synopsis>
71//
72// <motivation>
73// Selection keywords are needed for several classes, this class provides
74// them to all, avoiding duplication in each class.
75// </motivation>
76//
77// <thrown>
78// <li>
79// <li>
80// </thrown>
81//
82// <todo asof="yyyy/mm/dd">
83// <li> add this feature
84// </todo>
85
87{
88public:
89 // The fields in the MS for which selection and range operations are
90 // defined. Some of these directly correspond to columns in the table,
91 // others are derived quantities or columns in subtables.
92 enum Field {
93 // undefined field
95 // the range of visibility amplitude
97 // the range of corrected vis amplitude
99 // the range of model vis amplitude
101 // the amplitude of the ratio corrected data/model data
103 // the residual vis amplitude (corrected-model)
105 // the observed residual vis amplitude (observed-model)
107 // the list of antenna1 id values
109 // the list of antenna2 id values
111 // the list of antenna names
113 // the list of array id values
115 // description of the data axes
117 // the channel frequencies, a vector for each selected spectral window
119 // the list of polarizations present, this gives the String values
121 // the list of polarizations present, this gives the Stokes enum values
123 // the complex data
125 // the complex corrected data
127 //the complex model data
129 // the ratio corrected data/model data
131 // the residual data (corrected - model)
133 // the observed residual data (observed - model)
135 // the list of dataDescription id values
137 // the list of feed1 id values
139 // the list of feed2 id values
141 // the list of field_id values
143 // the list of field names
145 // the flags
147 // the row flags
149 // a summary of flags (flag count summed over rows)
151 // the float data (optional single dish column)
153 // Hour angle
155 // the list of interferometers (= 1000*ant1+ant2) present
157 // the (range of the) imaginary part of the visibilities
159 // the (range of the) imaginary part of the corrected visibilities
161 // the (range of the) imaginary part of the model visibilities
163 // the imaginary part of the ratio corrected data/model data
165 // the (range of the) imaginary part of the residual visibilities
167 // the (range of the) imaginary part of the observed residual visibilities
169 // Local Apparent Sidereal Time
171 // the number of correlation products (polarizations) for selected spectral window
173 // the number of spectral channels for selected spectral window
175 // the (range of the) phase of the visibilities
177 // the (range of the) phase of the corrected visibilities
179 // the (range of the) phase of the model visibilities
181 // the phase of the ratio corrected data/model data
183 // the (range of the) phase of the residual visibilities
185 // the (range of the) phase of the observed residual visibilities
187 // the phase center direction for each field (matrix + epoch)
189 // the (range of the) real part of the visibilities
191 // the (range of the) real part of the corrected visibilities
193 // the (range of the) real part of the model visibilities
195 // the real part of the ratio corrected data/model data
197 // the real part of the residual visibilities (corrected-model)
199 // the real part of the observed residuals (observed-model)
201 // the reference frequency for selected spectral window (or vector with all)
203 // the list of row numbers in the original MS
205 // the list of scan_number values
207 //# the list of spectral window id values
208 //# SPECTRAL_WINDOW_ID,
209 // the per spectrum sigmas
211 // the range of times
213 // the list of time values
215 // UT time (seconds of current day)
217 // the uvw coordinates
219 // the (range of the) U coordinate (m)
220//# Note:order of U, V and W is important, no intervening items allowed
221//# without changing select() code.
223 // the (range of the) V coordinate (m)
225 // the (range of the) W coordinate (m)
227 // the (range of the) UV-distance (m)
229 // the weights
231 // Number of keywords
234
235
236 // convert a keyword string to the corresponding enum
237 static Field field(const String& keyword);
238
239 // convert an enum value to the corresponding keyword string
240 static const String& keyword(Field field);
241
242private:
243 // This class is purely static, no instances are allowed.
247
248 // Get the static map.
249 static std::map<String,Int>& getMap();
250
251 // Get the static reverse map.
253
254 // Create an initialized map.
255 static std::map<String,Int> initMap();
256
257 // Create an initialized reverse map.
259};
260
261
262} //# NAMESPACE CASACORE - END
263
264#endif
simple 1-D array
Definition Block.h:198
MSSelectionKeywords(const MSSelectionKeywords &other)
MSSelectionKeywords()
This class is purely static, no instances are allowed.
static Block< String > initReverseMap()
Create an initialized reverse map.
Field
The fields in the MS for which selection and range operations are defined.
@ RESIDUAL_REAL
the real part of the residual visibilities (corrected-model)
@ AXIS_INFO
description of the data axes
@ CORRECTED_AMPLITUDE
the range of corrected vis amplitude
@ OBS_RESIDUAL_AMPLITUDE
the observed residual vis amplitude (observed-model)
@ MODEL_DATA
the complex model data
@ MODEL_IMAGINARY
the (range of the) imaginary part of the model visibilities
@ FLAG_SUM
a summary of flags (flag count summed over rows)
@ ANTENNA1
the list of antenna1 id values
@ W
the (range of the) W coordinate (m)
@ RATIO_AMPLITUDE
the amplitude of the ratio corrected data/model data
@ AMPLITUDE
the range of visibility amplitude
@ CORRECTED_REAL
the (range of the) real part of the corrected visibilities
@ CORRECTED_IMAGINARY
the (range of the) imaginary part of the corrected visibilities
@ CHAN_FREQ
the channel frequencies, a vector for each selected spectral window
@ RESIDUAL_AMPLITUDE
the residual vis amplitude (corrected-model)
@ FIELD_ID
the list of field_id values
@ UT
UT time (seconds of current day)
@ OBS_RESIDUAL_DATA
the observed residual data (observed - model)
@ OBS_RESIDUAL_REAL
the real part of the observed residuals (observed-model)
@ NUM_CHAN
the number of spectral channels for selected spectral window
@ RATIO_PHASE
the phase of the ratio corrected data/model data
@ MODEL_AMPLITUDE
the range of model vis amplitude
@ RATIO_REAL
the real part of the ratio corrected data/model data
@ MODEL_PHASE
the (range of the) phase of the model visibilities
@ CORRECTED_PHASE
the (range of the) phase of the corrected visibilities
@ ROWS
the list of row numbers in the original MS
@ SIGMA
the per spectrum sigmas
@ IMAGINARY
the (range of the) imaginary part of the visibilities
@ V
the (range of the) V coordinate (m)
@ RESIDUAL_DATA
the residual data (corrected - model)
@ MODEL_REAL
the (range of the) real part of the model visibilities
@ OBS_RESIDUAL_IMAGINARY
the (range of the) imaginary part of the observed residual visibilities
@ NUM_CORR
the number of correlation products (polarizations) for selected spectral window
@ PHASE_DIR
the phase center direction for each field (matrix + epoch)
@ FLOAT_DATA
the float data (optional single dish column)
@ CORRECTED_DATA
the complex corrected data
@ RATIO_DATA
the ratio corrected data/model data
@ IFR_NUMBER
the list of interferometers (= 1000*ant1+ant2) present
@ DATA_DESC_ID
the list of dataDescription id values
@ LAST
Local Apparent Sidereal Time.
@ REAL
the (range of the) real part of the visibilities
@ CORR_TYPES
the list of polarizations present, this gives the Stokes enum values
@ RESIDUAL_IMAGINARY
the (range of the) imaginary part of the residual visibilities
@ FEED1
the list of feed1 id values
@ RATIO_IMAGINARY
the imaginary part of the ratio corrected data/model data
@ FIELDS
the list of field names
@ UVDIST
the (range of the) UV-distance (m)
@ PHASE
the (range of the) phase of the visibilities
@ REF_FREQUENCY
the reference frequency for selected spectral window (or vector with all)
@ OBS_RESIDUAL_PHASE
the (range of the) phase of the observed residual visibilities
@ ANTENNA2
the list of antenna2 id values
@ RESIDUAL_PHASE
the (range of the) phase of the residual visibilities
@ ANTENNAS
the list of antenna names
@ ARRAY_ID
the list of array id values
@ SCAN_NUMBER
the list of scan_number values
@ CORR_NAMES
the list of polarizations present, this gives the String values
@ U
the (range of the) U coordinate (m)
@ TIMES
the list of time values
@ FEED2
the list of feed2 id values
static const String & keyword(Field field)
convert an enum value to the corresponding keyword string
MSSelectionKeywords & operator=(const MSSelectionKeywords &other)
static std::map< String, Int > initMap()
Create an initialized map.
static Block< String > & getReverseMap()
Get the static reverse map.
static std::map< String, Int > & getMap()
Get the static map.
static Field field(const String &keyword)
convert a keyword string to the corresponding enum
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
MSSelectionKeywords MSS
Define a shorthand notation for this class, so enums can be specified easily.