casacore
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 
34 namespace casacore { //# NAMESPACE CASACORE - BEGIN
35 
36 template <class K, class V> class SimpleOrderedMap;
37 template <class T> class Block;
38 // forward declare the class so we can typedef it
39 class MSSelectionKeywords;
40 class String;
41 
42 // Define a shorthand notation for this class, so enums can be specified
43 // easily.
44 typedef MSSelectionKeywords MSS;
45 
46 // <summary>
47 // MSSelectionKeywords specifies selection keywords for the MeasurementSet
48 // </summary>
49 
50 // <use visibility=export>
51 
52 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
53 // </reviewed>
54 
55 // <prerequisite>
56 // <li> MeasurementSet
57 // <li> MSSelector
58 // </prerequisite>
59 //
60 // <etymology>
61 // MSSelectionKeywords is a class that defines selection keywords
62 // </etymology>
63 //
64 // <synopsis>
65 // This class is used to specify selections on a MeasurementSet.
66 // It is a purely static class that just defines a mapping from
67 // Strings to Enums, and provides these for use by classes like
68 // MSSelector and MSRange
69 //
70 // <example> <srcblock>
71 // </srcblock></example>
72 // </synopsis>
73 //
74 // <motivation>
75 // Selection keywords are needed for several classes, this class provides
76 // them to all, avoiding duplication in each class.
77 // </motivation>
78 //
79 // <thrown>
80 // <li>
81 // <li>
82 // </thrown>
83 //
84 // <todo asof="yyyy/mm/dd">
85 // <li> add this feature
86 // </todo>
87 
89 {
90 public:
91  // The fields in the MS for which selection and range operations are
92  // defined. Some of these directly correspond to columns in the table,
93  // others are derived quantities or columns in subtables.
94  enum Field {
95  // undefined field
97  // the range of visibility amplitude
99  // the range of corrected vis amplitude
101  // the range of model vis amplitude
103  // the amplitude of the ratio corrected data/model data
105  // the residual vis amplitude (corrected-model)
107  // the observed residual vis amplitude (observed-model)
109  // the list of antenna1 id values
111  // the list of antenna2 id values
113  // the list of antenna names
115  // the list of array id values
117  // description of the data axes
119  // the channel frequencies, a vector for each selected spectral window
121  // the list of polarizations present, this gives the String values
123  // the list of polarizations present, this gives the Stokes enum values
125  // the complex data
127  // the complex corrected data
129  //the complex model data
131  // the ratio corrected data/model data
133  // the residual data (corrected - model)
135  // the observed residual data (observed - model)
137  // the list of dataDescription id values
139  // the list of feed1 id values
141  // the list of feed2 id values
143  // the list of field_id values
145  // the list of field names
147  // the flags
149  // the row flags
151  // a summary of flags (flag count summed over rows)
153  // the float data (optional single dish column)
155  // Hour angle
156  HA,
157  // the list of interferometers (= 1000*ant1+ant2) present
159  // the (range of the) imaginary part of the visibilities
161  // the (range of the) imaginary part of the corrected visibilities
163  // the (range of the) imaginary part of the model visibilities
165  // the imaginary part of the ratio corrected data/model data
167  // the (range of the) imaginary part of the residual visibilities
169  // the (range of the) imaginary part of the observed residual visibilities
171  // Local Apparent Sidereal Time
173  // the number of correlation products (polarizations) for selected spectral window
175  // the number of spectral channels for selected spectral window
177  // the (range of the) phase of the visibilities
179  // the (range of the) phase of the corrected visibilities
181  // the (range of the) phase of the model visibilities
183  // the phase of the ratio corrected data/model data
185  // the (range of the) phase of the residual visibilities
187  // the (range of the) phase of the observed residual visibilities
189  // the phase center direction for each field (matrix + epoch)
191  // the (range of the) real part of the visibilities
193  // the (range of the) real part of the corrected visibilities
195  // the (range of the) real part of the model visibilities
197  // the real part of the ratio corrected data/model data
199  // the real part of the residual visibilities (corrected-model)
201  // the real part of the observed residuals (observed-model)
203  // the reference frequency for selected spectral window (or vector with all)
205  // the list of row numbers in the original MS
207  // the list of scan_number values
209  //# the list of spectral window id values
210  //# SPECTRAL_WINDOW_ID,
211  // the per spectrum sigmas
213  // the range of times
215  // the list of time values
217  // UT time (seconds of current day)
218  UT,
219  // the uvw coordinates
221  // the (range of the) U coordinate (m)
222 //# Note:order of U, V and W is important, no intervening items allowed
223 //# without changing select() code.
224  U,
225  // the (range of the) V coordinate (m)
226  V,
227  // the (range of the) W coordinate (m)
228  W,
229  // the (range of the) UV-distance (m)
231  // the weights
233  // Number of keywords
235 };
236 
237 
238  // convert a keyword string to the corresponding enum
239  static Field field(const String& keyword);
240 
241  // convert an enum value to the corresponding keyword string
242  static const String& keyword(Field field);
243 
244 protected:
245  // This class is purely static, no instances are allowed.
249 
250  // initialization function for the string to enum mapping
251  static void initMap(SimpleOrderedMap<String,Int>*& fieldMap,
252  Block<Int>*& reverseMap);
253 };
254 
255 
256 } //# NAMESPACE CASACORE - END
257 
258 #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
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
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 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
Simple map with keys ordered.
Definition: SimOrdMap.h:69
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)
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 void initMap(SimpleOrderedMap< String, Int > *&fieldMap, Block< Int > *&reverseMap)
initialization function for the string to enum mapping
String: the storage and methods of handling collections of characters.
Definition: String.h:223
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)
this file contains all the compiler specific defines
Definition: mainpage.dox:28
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