casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CTSummary.h
Go to the documentation of this file.
1 //# CTSummary.h: Helper class for listing a NewCalHeader
2 //# Copyright (C) 2017
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_CTSUMMARY_H
29 #define CALIBRATION_CTSUMMARY_H
30 
31 #include <casacore/casa/aips.h>
33 #include <casacore/casa/Arrays.h>
35 
36 namespace casa { //# NAMESPACE CASA - BEGIN
37 
38 class NewCalTable;
39 
40 // <summary>Provides and lists information about the header of a
41 // calibration table. Based on MSSummary</summary>
42 // <use visibility=export>
43 //
44 // <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
45 // </reviewed>
46 //
47 // <prerequisite>
48 // <li> <linkto class=NewCalTable>NewCalTable</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 // NewCalTable in a Summary format.
56 // </etymology>
57 //
58 // <synopsis>
59 // NCTs 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 // NewCalTable inputCT(fileName);
68 // CTSummary header(inputCT);
69 // LogOrigin or("myClass", "myFunction(...)", WHERE);
70 // LogIO os(or);
71 // header.list(os);
72 // </srcBlock>
73 // A <src>NewCalTable</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 
84 class CTSummary
85 {
86 public:
87 // Constructor
88 // <group>
89  CTSummary (const NewCalTable& ct);
90  CTSummary (const NewCalTable* ct);
91 // </group>
92 
93 // Destructor
94  ~CTSummary();
95 
96 // Retrieve number of rows
97  casacore::Int nrow() const;
98 
99 // Retrieve caltable name
100  casacore::String name() const;
101 
102 // Set a new NCT.
103  casacore::Bool setNCT (const NewCalTable& 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 NewCalTable
137 
138 // Formatting strings
140 
141 // Needed for antenna offsets
143  casacore::String& name) const;
144 
145 // Clear formatting flags
146  void clearFormatFlags (casacore::LogIO& os) const;
147 
148 // For keeping track of the number of vis per field
150 
151  // Name of the CT used in the constructor
153 
154 };
155 
156 
157 } //# NAMESPACE CASA - END
158 
159 #endif
void clearFormatFlags(casacore::LogIO &os) const
Clear formatting flags.
A Measure: position on Earth.
Definition: MPosition.h:79
int Int
Definition: aipstype.h:50
casacore::String ctname_p
Name of the CT used in the constructor.
Definition: CTSummary.h:152
CTSummary(const NewCalTable &ct)
Constructor.
void listTitle(casacore::LogIO &os) const
List a title for the Summary.
~CTSummary()
Destructor.
void listAntenna(casacore::LogIO &os, casacore::Bool verbose=false) const
void listHistory(casacore::LogIO &os) const
const NewCalTable * pNCT
Pointer to NewCalTable.
Definition: CTSummary.h:136
ostream-like interface to creating log messages.
Definition: LogIO.h:167
void listField(casacore::LogIO &os, casacore::Bool verbose=false) const
void list(casacore::LogIO &os, casacore::Bool verbose=false) const
List all header information.
Provides and lists information about the header of a calibration table. Based on MSSummary.
Definition: CTSummary.h:84
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Vector< casacore::Int > nVisPerField_
For keeping track of the number of vis per field.
Definition: CTSummary.h:149
bool getObservatoryPosition(casacore::MPosition &obspos, casacore::String &name) const
Needed for antenna offsets.
void listMain(casacore::LogIO &os, casacore::Bool verbose=false) const
List main table.
casacore::Int nrow() const
Retrieve number of rows.
void listWhere(casacore::LogIO &os, casacore::Bool verbose=false) const
List convenient groupings of tables: List where CT obtained (Observation table)
void listObservation(casacore::LogIO &os, casacore::Bool verbose=false) const
List subtables.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::String name() const
Retrieve caltable name.
const casacore::String dashlin2
Definition: CTSummary.h:139
const casacore::String dashlin1
Formatting strings.
Definition: CTSummary.h:139
void listSpectralWindow(casacore::LogIO &os, casacore::Bool verbose=false) const
void listWhat(casacore::LogIO &os, casacore::Bool verbose=false) const
List what was observed (Field and Main tables)
void listHow(casacore::LogIO &os, casacore::Bool verbose=false) const
List how data were obtained (SpectralWindow and Antenna tables)
casacore::Bool setNCT(const NewCalTable &ct)
Set a new NCT.
void listTables(casacore::LogIO &os, casacore::Bool verbose=false) const
List table size summary.