casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalSummary.h
Go to the documentation of this file.
1 //# CalSummary.h: Helper class for listing a CalTable
2 //# Copyright (C) 2018
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 //# $Id$
27 //#
28 #ifndef CALIBRATION_CALSUMMARY_H
29 #define CALIBRATION_CALSUMMARY_H
30 
31 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays.h>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 class CalTable;
39 
40 // <summary>Provides and lists information about the header of a
41 // calibration table. Based on MSSummary and CTSummary</summary>
42 // <use visibility=export>
43 //
44 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
45 // </reviewed>
46 //
47 // <prerequisite>
48 // <li> <linkto class=CalTable>CalTable</linkto>
49 // <li> <linkto class=MSSummary>MSSummary</linkto>
50 // <li> <linkto module=Coordinates>Coordinates</linkto>
51 // </prerequisite>
52 //
53 // <etymology>
54 // This class lists the ancilliary or header information from a
55 // CalTable in a Summary format.
56 // </etymology>
57 //
58 // <synopsis>
59 // CalTables consist of pixels and descriptive information stored in what
60 // is loosely termed the header. This is information describing the
61 // coordinate system, the image units etc. This class enables you to
62 // retrieve the descriptive header information and/or list it.
63 // </synopsis>
64 //
65 // <example>
66 // <srcBlock>
67 // CalTable inputCT(fileName);
68 // CalSummary header(inputCT);
69 // LogOrigin or("myClass", "myFunction(...)", WHERE);
70 // LogIO os(or);
71 // header.list(os);
72 // </srcBlock>
73 // A <src>CalTable</src> object is constructed and then logged
74 // to the supplied <src>LogIO</src> object.
75 // </example>
76 //
77 // <motivation>
78 // The viewing of the cal table header is a basic capability that is
79 // commonly required.
80 // </motivation>
81 //
82 
83 
85 {
86 public:
87 // Constructor
88 // <group>
89  CalSummary (CalTable& ct);
90  CalSummary (CalTable* ct);
91 // </group>
92 
93 // Destructor
94  ~CalSummary();
95 
96 // Retrieve number of rows
97  casacore::Int nrow() const;
98 
99 // Retrieve caltable name
100  const casacore::String name() const;
101 
102 // Set a new CT.
104 
105 // List all header information.
106  void list (casacore::LogIO& os, casacore::Bool verbose=false) const;
107 
108 // List a title for the Summary.
109  void listTitle (casacore::LogIO& os) const;
110 
111 // List convenient groupings of tables:
112 // List where CT obtained (Observation table)
113  void listWhere (casacore::LogIO& os, casacore::Bool verbose=false) const;
114 // List what was observed (Field and Main tables)
115  void listWhat (casacore::LogIO& os, casacore::Bool verbose=false) const;
116 // List how data were obtained (SpectralWindow and Antenna tables)
117  void listHow (casacore::LogIO& os, casacore::Bool verbose=false) const;
118 
119 // List main table
120  void listMain (casacore::LogIO& os, casacore::Bool verbose=false) const;
121 
122 // List subtables
123 // <group>
124  void listObservation (casacore::LogIO& os, casacore::Bool verbose=false) const;
125  void listField (casacore::LogIO& os, casacore::Bool verbose=false) const;
126  void listAntenna (casacore::LogIO& os, casacore::Bool verbose=false) const;
127  void listSpectralWindow (casacore::LogIO& os, casacore::Bool verbose=false) const;
128  void listHistory (casacore::LogIO& os) const;
129 // </group>
130 
131 // List table size summary
132  void listTables (casacore::LogIO& os, casacore::Bool verbose=false) const;
133 
134 private:
135 // Pointer to CalTable
137 
138 // for fieldnames and antenna names
140  bool haveMS_p;
141 
142 // Formatting strings
144 
145 // Set msname_p if MS exists.
146  void setMSname();
147 
148 // Needed for antenna offsets
150  casacore::String& name) const;
151 
152 // Clear formatting flags
153  void clearFormatFlags (casacore::LogIO& os) const;
154 
155 // For keeping track of the number of vis per field
157 
158 };
159 
160 
161 } //# NAMESPACE CASA - END
162 
163 #endif
void listTables(casacore::LogIO &os, casacore::Bool verbose=false) const
List table size summary.
void listSpectralWindow(casacore::LogIO &os, casacore::Bool verbose=false) const
void listHow(casacore::LogIO &os, casacore::Bool verbose=false) const
List how data were obtained (SpectralWindow and Antenna tables)
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
void listMain(casacore::LogIO &os, casacore::Bool verbose=false) const
List main table.
void listHistory(casacore::LogIO &os) const
CalTable * pCT
Pointer to CalTable.
Definition: CalSummary.h:136
void listWhere(casacore::LogIO &os, casacore::Bool verbose=false) const
List convenient groupings of tables: List where CT obtained (Observation table)
~CalSummary()
Destructor.
void listWhat(casacore::LogIO &os, casacore::Bool verbose=false) const
List what was observed (Field and Main tables)
void setMSname()
Set msname_p if MS exists.
ostream-like interface to creating log messages.
Definition: LogIO.h:167
bool getObservatoryPosition(casacore::MPosition &obspos, casacore::String &name) const
Needed for antenna offsets.
casacore::Int nrow() const
Retrieve number of rows.
CalTable: Calibration table access and creation.
Definition: CalTable.h:82
casacore::Vector< casacore::Int > nVisPerField_
For keeping track of the number of vis per field.
Definition: CalSummary.h:156
void list(casacore::LogIO &os, casacore::Bool verbose=false) const
List all header information.
const casacore::String dashlin1
Formatting strings.
Definition: CalSummary.h:143
casacore::String msname_p
for fieldnames and antenna names
Definition: CalSummary.h:139
const casacore::String name() const
Retrieve caltable name.
CalSummary(CalTable &ct)
Constructor.
void clearFormatFlags(casacore::LogIO &os) const
Clear formatting flags.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void listTitle(casacore::LogIO &os) const
List a title for the Summary.
void listAntenna(casacore::LogIO &os, casacore::Bool verbose=false) const
casacore::Bool setCT(CalTable &ct)
Set a new CT.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
const casacore::String dashlin2
Definition: CalSummary.h:143
void listField(casacore::LogIO &os, casacore::Bool verbose=false) const
void listObservation(casacore::LogIO &os, casacore::Bool verbose=false) const
List subtables.
Provides and lists information about the header of a calibration table. Based on MSSummary and CTSumm...
Definition: CalSummary.h:84