casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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: aips2-request@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 //#
27 //# $Id$
28 
29 #ifndef MS_MSSELECTIONKEYWORDS_H
30 #define MS_MSSELECTIONKEYWORDS_H
31 
32 #include <casacore/casa/aips.h>
33 #include <map>
34 
35 namespace casacore { //# NAMESPACE CASACORE - BEGIN
36 
37 template <class T> class Block;
38 
39 // forward declare the class so we can typedef it
40 class MSSelectionKeywords;
41 class String;
42 
43 // Define a shorthand notation for this class, so enums can be specified
44 // easily.
45 typedef MSSelectionKeywords MSS;
46 
47 // <summary>
48 // MSSelectionKeywords specifies selection keywords for the MeasurementSet
49 // </summary>
50 
51 // <use visibility=export>
52 
53 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
54 // </reviewed>
55 
56 // <prerequisite>
57 // <li> MeasurementSet
58 // <li> MSSelector
59 // </prerequisite>
60 //
61 // <etymology>
62 // MSSelectionKeywords is a class that defines selection keywords
63 // </etymology>
64 //
65 // <synopsis>
66 // This class is used to specify selections on a MeasurementSet.
67 // It is a purely static class that just defines a mapping from
68 // Strings to Enums, and provides these for use by classes like
69 // MSSelector and MSRange
70 //
71 // <example> <srcblock>
72 // </srcblock></example>
73 // </synopsis>
74 //
75 // <motivation>
76 // Selection keywords are needed for several classes, this class provides
77 // them to all, avoiding duplication in each class.
78 // </motivation>
79 //
80 // <thrown>
81 // <li>
82 // <li>
83 // </thrown>
84 //
85 // <todo asof="yyyy/mm/dd">
86 // <li> add this feature
87 // </todo>
88 
90 {
91 public:
92  // The fields in the MS for which selection and range operations are
93  // defined. Some of these directly correspond to columns in the table,
94  // others are derived quantities or columns in subtables.
95  enum Field {
96  // undefined field
98  // the range of visibility amplitude
100  // the range of corrected vis amplitude
102  // the range of model vis amplitude
104  // the amplitude of the ratio corrected data/model data
106  // the residual vis amplitude (corrected-model)
108  // the observed residual vis amplitude (observed-model)
110  // the list of antenna1 id values
112  // the list of antenna2 id values
114  // the list of antenna names
116  // the list of array id values
118  // description of the data axes
120  // the channel frequencies, a vector for each selected spectral window
122  // the list of polarizations present, this gives the String values
124  // the list of polarizations present, this gives the Stokes enum values
126  // the complex data
128  // the complex corrected data
130  //the complex model data
132  // the ratio corrected data/model data
134  // the residual data (corrected - model)
136  // the observed residual data (observed - model)
138  // the list of dataDescription id values
140  // the list of feed1 id values
142  // the list of feed2 id values
144  // the list of field_id values
146  // the list of field names
148  // the flags
150  // the row flags
152  // a summary of flags (flag count summed over rows)
154  // the float data (optional single dish column)
156  // Hour angle
157  HA,
158  // the list of interferometers (= 1000*ant1+ant2) present
160  // the (range of the) imaginary part of the visibilities
162  // the (range of the) imaginary part of the corrected visibilities
164  // the (range of the) imaginary part of the model visibilities
166  // the imaginary part of the ratio corrected data/model data
168  // the (range of the) imaginary part of the residual visibilities
170  // the (range of the) imaginary part of the observed residual visibilities
172  // Local Apparent Sidereal Time
174  // the number of correlation products (polarizations) for selected spectral window
176  // the number of spectral channels for selected spectral window
178  // the (range of the) phase of the visibilities
180  // the (range of the) phase of the corrected visibilities
182  // the (range of the) phase of the model visibilities
184  // the phase of the ratio corrected data/model data
186  // the (range of the) phase of the residual visibilities
188  // the (range of the) phase of the observed residual visibilities
190  // the phase center direction for each field (matrix + epoch)
192  // the (range of the) real part of the visibilities
194  // the (range of the) real part of the corrected visibilities
196  // the (range of the) real part of the model visibilities
198  // the real part of the ratio corrected data/model data
200  // the real part of the residual visibilities (corrected-model)
202  // the real part of the observed residuals (observed-model)
204  // the reference frequency for selected spectral window (or vector with all)
206  // the list of row numbers in the original MS
208  // the list of scan_number values
210  //# the list of spectral window id values
211  //# SPECTRAL_WINDOW_ID,
212  // the per spectrum sigmas
214  // the range of times
216  // the list of time values
218  // UT time (seconds of current day)
219  UT,
220  // the uvw coordinates
222  // the (range of the) U coordinate (m)
223 //# Note:order of U, V and W is important, no intervening items allowed
224 //# without changing select() code.
225  U,
226  // the (range of the) V coordinate (m)
227  V,
228  // the (range of the) W coordinate (m)
229  W,
230  // the (range of the) UV-distance (m)
232  // the weights
234  // Number of keywords
236 };
237 
238 
239  // convert a keyword string to the corresponding enum
240  static Field field(const String& keyword);
241 
242  // convert an enum value to the corresponding keyword string
243  static const String& keyword(Field field);
244 
245 private:
246  // This class is purely static, no instances are allowed.
250 
251  // Get the static map.
252  static std::map<String,Int>& getMap();
253 
254  // Get the static reverse map.
255  static Block<String>& getReverseMap();
256 
257  // Create an initialized map.
258  static std::map<String,Int> initMap();
259 
260  // Create an initialized reverse map.
261  static Block<String> initReverseMap();
262 };
263 
264 
265 } //# NAMESPACE CASACORE - END
266 
267 #endif
the real part of the observed residuals (observed-model)
the range of visibility amplitude
the (range of the) imaginary part of the corrected visibilities
static Block< String > & getReverseMap()
Get the static reverse map.
UT time (seconds of current day)
the phase center direction for each field (matrix + epoch)
the observed residual data (observed - model)
the imaginary part of the ratio corrected data/model data
the float data (optional single dish column)
MSSelectionKeywords specifies selection keywords for the MeasurementSet.
the list of polarizations present, this gives the String values
static std::map< String, Int > initMap()
Create an initialized map.
the residual data (corrected - model)
the number of correlation products (polarizations) for selected spectral window
the (range of the) phase of the model visibilities
the amplitude of the ratio corrected data/model data
the (range of the) W coordinate (m)
the (range of the) real part of the visibilities
the (range of the) phase of the residual visibilities
the list of row numbers in the original MS
the (range of the) UV-distance (m)
the (range of the) real part of the model visibilities
static std::map< String, Int > & getMap()
Get the static map.
static const String & keyword(Field field)
convert an enum value to the corresponding keyword string
the number of spectral channels for selected spectral window
the residual vis amplitude (corrected-model)
the list of antenna2 id values
static Field field(const String &keyword)
convert a keyword string to the corresponding enum
the (range of the) imaginary part of the model visibilities
the (range of the) imaginary part of the residual visibilities
the observed residual vis amplitude (observed-model)
MSSelectionKeywords MSS
Define a shorthand notation for this class, so enums can be specified easily.
the (range of the) V coordinate (m)
the list of antenna1 id values
the phase of the ratio corrected data/model data
the real part of the residual visibilities (corrected-model)
simple 1-D array
Definition: Allocator.h:210
the (range of the) phase of the corrected visibilities
Field
The fields in the MS for which selection and range operations are defined.
the ratio corrected data/model data
the real part of the ratio corrected data/model data
the (range of the) real part of the corrected visibilities
static Block< String > initReverseMap()
Create an initialized reverse map.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
the channel frequencies, a vector for each selected spectral window
the list of polarizations present, this gives the Stokes enum values
Local Apparent Sidereal Time.
the list of dataDescription id values
the (range of the) phase of the visibilities
MSSelectionKeywords()
This class is purely static, no instances are allowed.
the reference frequency for selected spectral window (or vector with all)
MSSelectionKeywords & operator=(const MSSelectionKeywords &other)
the (range of the) U coordinate (m)
the (range of the) imaginary part of the observed residual visibilities
a summary of flags (flag count summed over rows)
the (range of the) phase of the observed residual visibilities
the list of interferometers (= 1000*ant1+ant2) present
the (range of the) imaginary part of the visibilities