casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
MSMainEnums.h
Go to the documentation of this file.
00001 //# MSMainEnums.h: Class with definitions for the main MeasurementSet table
00002 //# Copyright (C) 1996,1999,2000
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //#
00027 //# $Id: MSMainEnums.h 20505 2009-01-19 14:37:24Z gervandiepen $
00028 
00029 #ifndef MS_MSMAINENUMS_H
00030 #define MS_MSMAINENUMS_H
00031 
00032 #include <casa/aips.h>
00033 
00034 namespace casa { //# NAMESPACE CASA - BEGIN
00035 
00036 // <use visibility=export>
00037 
00038 // <summary> Enums for the MeasurementSet main table </summary>
00039 // <reviewed reviewer="UNKNOWN" date="before2004/08/25" tests="" demos="">
00040 // </reviewed>
00041 // <etymology>
00042 // This class contains the enum defininitions for the main MeasurementSet
00043 // table.
00044 // </etymology>
00045 
00046 // <synopsis>
00047 // This class does nothing.  It is merely a container for the enumerations
00048 // used by the MeasurementSet class.  These enumerations define the
00049 // standard columns, keywords.
00050 // </synopsis>
00051 
00052 // <example>
00053 // See the documentation for MeasurementSet for examples on the use of these
00054 // enumerations.
00055 // </example>
00056 // <todo asof="1999/02/04">
00057 // All the todo items which may be related to this class are
00058 // grouped with the todo items for MeasurementSet
00059 // </todo>
00060 //
00061 
00062 class MSMainEnums {
00063 public:
00064     // The Main table colums with predefined meaning.
00065     enum PredefinedColumns {
00066     // "True" columns are defined. <BR>
00067     // TYPE - UNIT - MEASURE
00068     UNDEFINED_COLUMN=0,
00069     //
00070     // ID of first antenna in antenna-pair. This is a key into the
00071     // ANTENNA table. Ranges from 0 to NUM_ANT-1.<BR>
00072     // Int
00073     ANTENNA1,    
00074     //
00075     // ID of second antenna in antenna-pair. For SD ANTENNA1==ANTENNA2<BR>
00076     // Int
00077     ANTENNA2,  
00078     //
00079     // ARRAY id.<BR>
00080     // Int.
00081     ARRAY_ID,
00082     //
00083     // Data description id <BR>
00084     // Int.
00085     DATA_DESC_ID,
00086     //
00087     // Effective integration time (i.e.<=INTERVAL)<BR>
00088     // Double - s.
00089     EXPOSURE,    
00090     //
00091     // Feed id on ANTENNA1.<BR>
00092     // Int.
00093     FEED1,
00094     //
00095     // Feed id on ANTENNA2.<BR>
00096     // Int.
00097     FEED2,
00098     //
00099     // Unique id for this pointing (or drift scan)<BR>
00100     // Int
00101     FIELD_ID,    
00102     //
00103     // The data flags, array of bools with same shape as data.
00104     // Data is flagged bad if FLAG is True.<BR>
00105     // Bool(Nc, Nf)
00106     FLAG,
00107     //
00108     // Flag category, allows for multiple categories of flagging, which can
00109     // selectively be reset. The cumulative effect is reflected in FLAG. 
00110     // This column should have an attached keyword CATEGORY which is a 
00111     // String (Ncat) of categories (e.g, ONLINE, FLAG_CMD, INTERACTIVE) <BR>
00112     // Bool (Nc, Nf, Ncat)
00113     FLAG_CATEGORY,
00114     //
00115     // Flag all data in this row if True.<BR>
00116     // Bool
00117     FLAG_ROW,
00118     //
00119     // The extent of this sample, sampling interval.<BR>
00120     // Double - s.
00121     INTERVAL, 
00122     //
00123     // Index into OBSERVATION table. <BR>
00124     // Int.
00125     OBSERVATION_ID,
00126     //
00127     // Processor Id, points to PROCESSOR table with information on the 
00128     // correlator or backend setup. <BR>
00129     // Int
00130     PROCESSOR_ID,
00131     //
00132     // Scan number.
00133     // Int.
00134     SCAN_NUMBER,
00135     //
00136     // Estimated rms noise for channel with unity bandpass response.<BR>
00137     // Float(Nc) - Same units as the DATA column.
00138     SIGMA,
00139     //
00140     // State Id, points to STATE table with info on current observing mode,
00141     // calibration and reference signals etc. (Mainly single dish) <BR>
00142     // Int
00143     STATE_ID,
00144     //
00145     // Modified Julian Day number (JD-2400000.5) for midpoint of integration.
00146     // For high precision timing, add the value from TIME_EXTRA_PREC.<BR>
00147     // Double - s - EPOCH.
00148     TIME,
00149     //
00150     // Modified Julian Day number (JD-2400000.5) for centroid of integration.
00151     // Double - s - EPOCH.
00152     TIME_CENTROID,
00153     //
00154     // UVW coordinates.<BR>
00155     // Double(3) - m - UVW.
00156     UVW,         
00157     //
00158     // Weight of spectrum. This is the weight assigned by the correlator and
00159     // does NOT get overwritten by e.g. imaging tasks that do weighting.<BR>
00160     // Float(Nc).
00161     WEIGHT,
00162     //
00163     // Not a column, but just an enum specifying the number of required columns.
00164     //# Note: first enum after this one should be assigned value of this enum.
00165     NUMBER_REQUIRED_COLUMNS=WEIGHT,
00166     //
00167     // Antenna3 - for triple correlations products. <BR>
00168     // Int
00169     ANTENNA3,
00170     //
00171     // Reference antenna for this baseline, True for ANTENNA1 <BR>
00172     // Bool
00173     BASELINE_REF,
00174     //
00175     // The Corrected complex visibility data (optional). <BR>
00176     // Complex(Nc, Nf)
00177     CORRECTED_DATA,
00178     //
00179     // Complex visibility matrix. The UNITS are unspecified to allow
00180     // for the calibrated data to show up as a DATA column as well but in
00181     // a calibrated MS.<BR>
00182     // Complex(Nc, Nf)
00183     DATA,
00184     //
00185     // Feed id on ANTENNA3 <BR>
00186     // Int
00187     FEED3,
00188     //
00189     // Floating point data column. For simple single dish work this can be used
00190     // instead of the complex DATA column. <BR>
00191     // Float(Nc, Nf)
00192     FLOAT_DATA,
00193     //
00194     // Complex correlation function or lag spectrum for each correlation 
00195     // product <BR>
00196     // Complex(Nc, Nl)
00197     LAG_DATA,
00198     //
00199     // The model visibility data (optional). <BR>
00200     // Complex(Nc,Nf)
00201     MODEL_DATA,
00202     //
00203     // Switching phase Id <BR>
00204     // Int
00205     PHASE_ID,
00206     //
00207     // For a pulsar the correlations are assumed to be measured for a
00208     // limited number of pulse phase bins. This is the particular bin for
00209     // which this data was measured. (optional) <BR>
00210     // Int.
00211     PULSAR_BIN,
00212     //
00213     // Unique id for this pulsar gate. Index into PULSAR_GATE table.
00214     // (optional) <BR>
00215     // Int.
00216     PULSAR_GATE_ID,
00217     //
00218     // Estimated rms noise for each data point. To be used instead of
00219     // SIGMA if present. <BR>
00220     // Float(Nc,Nf) - Same units as the DATA column.
00221     SIGMA_SPECTRUM,
00222     //
00223     // Additional precision for TIME if required. Add this to TIME to obtain
00224     // the exact EPOCH.<BR>
00225     // Double - s.
00226     TIME_EXTRA_PREC, 
00227     //
00228     // UVW for second pair of triple correlation product. <BR>
00229     // Double(3) - m
00230     UVW2,
00231     //
00232     // Zero frequency point - needed for transform back to lag domain <BR>
00233     // Complex(Nc)
00234     VIDEO_POINT,
00235     //
00236     // Weight for each channel. To be used instead of WEIGHT if present.<BR>
00237     // Float(Nf).
00238     WEIGHT_SPECTRUM,
00239     //
00240     // Not a column, but just a final enum specifying the number of enums.
00241     NUMBER_PREDEFINED_COLUMNS=WEIGHT_SPECTRUM
00242     };
00243   
00244     // Keywords with a predefined meaning
00245     enum PredefinedKeywords {
00246     //
00247     // "True" keywords are defined. 
00248     UNDEFINED_KEYWORD=0,
00249     //
00250     // Antenna subtable. Antenna positions, mount-types etc.
00251     ANTENNA,
00252     // Data Description subtable. Gives spectral window and polarization id.
00253     DATA_DESCRIPTION,
00254     // Feed subtable. Responses, offsets, beams etc.
00255     FEED,
00256     // Field subtable. Position etc. for each pointing.
00257     FIELD,
00258     // Flag command subtable. List of flag commands.
00259     FLAG_CMD,
00260     // History information subtable.
00261     HISTORY,
00262     // MS Version number. <BR>
00263     // Float.
00264     MS_VERSION,
00265     // Observation subtable. Project, observer, schedule.
00266     OBSERVATION,
00267     // Pointing information subtable.
00268     POINTING,
00269     // Polarization setup information subtable.
00270     POLARIZATION,
00271     // Back-end processor information subtable. Description of correlator etc.
00272     PROCESSOR,
00273     // Spectral window subtable. Frequencies, bandwidths, polarizations.
00274     SPECTRAL_WINDOW,
00275     // State subtable. Observing modes and states (cal, ref etc.)
00276     STATE,
00277     // Not a keyword, but an enum specifying the number of required keywords
00278     // The last required keyword should be set to this enum
00279     NUMBER_REQUIRED_KEYWORDS=STATE,
00280     // Calibration tables associated with this MS. <BR>
00281     // Table(NUM_CAL_TABLES)
00282     CAL_TABLES,
00283     // Doppler tracking information subtable.
00284     DOPPLER,
00285     // Frequency offset information subtable.
00286     FREQ_OFFSET,
00287     // Listing of sort columns for each sorted table. <BR>
00288     // String(NUM_SORTED_TABLES)
00289     SORT_COLUMNS,
00290     // Listing of sort orders for each sorted table. <BR>
00291     // String(NUM_SORTED_TABLES)
00292     SORT_ORDER,
00293     // Sorted reference tables of the main table. First one is main table.<BR>
00294     // Table(NUM_SORTED_TABLES)
00295     SORTED_TABLES,
00296     // Source subtable. Positions etc. for each source.
00297     SOURCE,
00298     // SysCal subtable. System calibration data (Tsys etc.)
00299     SYSCAL,
00300     // Weather subtable. Weather info for each antenna.
00301     WEATHER,
00302     // Not a keyword, but just a final enum specifying the number of enums.
00303     NUMBER_PREDEFINED_KEYWORDS=WEATHER
00304     };
00305 };
00306 
00307 } //# NAMESPACE CASA - END
00308 
00309 #endif
00310