casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSMetaInfoForCal.h
Go to the documentation of this file.
1 //# MSMetaInfoForCal.h: MS Meta info services in Calibraiton context
2 //# Copyright (C) 2016
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 adressed 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 
28 #ifndef SYNTHESIS_MSMETAINFOFORCAL_H
29 #define SYNTHESIS_MSMETAINFOFORCAL_H
30 
31 #include <casa/aips.h>
32 #include <casa/iostream.h>
33 #include <casa/BasicSL/String.h>
36 
37 namespace casacore {
38 
39 class MSMetaData;
40 
41 }
42 
43 namespace casa { //# NAMESPACE CASA - BEGIN
44 
46 
47 public:
48 
49  // Construct from the filename of an MS
50  // (If the MS doesn't exist, services will be trivialized)
52 
53  // Construct from a supplied MS object
55 
56  // Construct from nAnt,nSpw
58 
59  // Construct from SimpleSimVi2Paremeters
60  // (useful for testing w/ actual (spoofed) data iteration
62 
63  // Dtor
65 
66  // The MS name
67  casacore::String msname() const { return msname_; };
68 
69  // Signal if a real MS was specified in ctor
70  casacore::Bool msOk() const { return msOk_; };
71 
72  // Return access to MSMetaData object (if avail)
73  // Would like this to be const, but many methods in MSMetaData aren't....
74  casacore::MSMetaData& msmd() const;
75 
76  // Return accss to SimpleSimVi2Parameters object (if avail)
77  const vi::SimpleSimVi2Parameters& ssp() const;
78 
79  // The number of antennas
80  casacore::uInt nAnt() const { return nAnt_;};
81 
82  // Antenna name, by index
84 
85  // All antenna names, as vector
87 
88  // The number of spws
89  casacore::uInt nSpw() const { return nSpw_;};
90 
91  // Spw name, by index
93 
94  // The number of fields
95  casacore::uInt nFld() const { return nFld_;};
96 
97  // Field name, by index
99 
100  // All field names, as vector
101  void fieldNames(casacore::Vector<casacore::String>& fldnames) const;
102 
103  // Field id at time
105 
106  // Scan number at time
108 
109  // Center freq for specified spw
111 
112 
113 private:
114 
115  // The supplied MS name
117 
118  // Is the MS available (else spoof)
119  bool msOk_;
120 
121  // Remember basic shapes
123 
124  // Spw absolute center frequencies
125  // (this gets filled OTF, if necessary)
127 
128  // MS pointer
130 
131  // MSMetaData pointer
133 
134  // SimpleSimVi2Parameters pointer
136 
137 
138 };
139 
140 
141 } //# NAMESPACE CASA - END
142 
143 #endif
144 
145 
casacore::String spwName(casacore::uInt ispw) const
Spw name, by index.
int Int
Definition: aipstype.h:50
casacore::String antennaName(casacore::uInt iant) const
Antenna name, by index.
casacore::String msname_
The supplied MS name.
casacore::Int scanNumberAtTime(casacore::Double time) const
Scan number at time.
casacore::Int fieldIdAtTime(casacore::Double time) const
Field id at time.
void fieldNames(casacore::Vector< casacore::String > &fldnames) const
All field names, as vector.
casacore::uInt nSpw() const
The number of spws.
ABSTRACT TOOL CLASSES A PlotTool is a higher level event handler for a PlotCanvas The idea is to take common tasks which may require multiple events and put them in one place PlotTools also provide additional functionality in that they can be active and blocking non blocking The PlotCanvas will only send events to active and will not send events to later tools or event handlers if the latest tool was blocking In this way a single tool can be used to handle ALL user interaction via the GUI at one time
Definition: PlotTool.h:43
Class to interrogate an MS for metadata. Interrogation happens on demand and resulting metadata are s...
Definition: MSMetaData.h:61
casacore::uInt nAnt_
Remember basic shapes.
casacore::Double centerFreq(casacore::uInt ispw) const
Center freq for specified spw.
void antennaNames(casacore::Vector< casacore::String > &antnames) const
All antenna names, as vector.
const vi::SimpleSimVi2Parameters & ssp() const
Return accss to SimpleSimVi2Parameters object (if avail)
double Double
Definition: aipstype.h:55
casacore::MeasurementSet * ms_
MS pointer.
casacore::Bool msOk() const
Signal if a real MS was specified in ctor.
MSMetaInfoForCal(casacore::String msname)
Construct from the filename of an MS (If the MS doesn&#39;t exist, services will be trivialized) ...
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::String msname() const
The MS name.
casacore::MSMetaData * msmd_
MSMetaData pointer.
casacore::MSMetaData & msmd() const
Return access to MSMetaData object (if avail) Would like this to be const, but many methods in MSMeta...
A Table intended to hold astronomical data (a set of Measurements).
casacore::uInt nAnt() const
The number of antennas.
casacore::Vector< casacore::Double > centerFreqs_
Spw absolute center frequencies (this gets filled OTF, if necessary)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::uInt nFld() const
The number of fields.
vi::SimpleSimVi2Parameters * ssp_
SimpleSimVi2Parameters pointer.
casacore::String fieldName(casacore::uInt ifld) const
Field name, by index.
unsigned int uInt
Definition: aipstype.h:51
bool msOk_
Is the MS available (else spoof)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42