casacore
Loading...
Searching...
No Matches
MS1ToMS2Converter.h
Go to the documentation of this file.
1// # MS1ToMS2Converter.h: Definition for ms1 to ms2 converter
2// # Copyright (C) 1994,1995,1996,1997,1998,1999,2000
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: casa-feedback@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#ifndef MS_MS1TOMS2CONVERTER_H
27#define MS_MS1TOMS2CONVERTER_H
28
29// # Includes
30#include <casacore/casa/aips.h>
31#include <casacore/tables/Tables/Table.h>
32#include <casacore/casa/Logging/LogIO.h>
33
34namespace casacore { // # NAMESPACE CASACORE - BEGIN
35
36// # Forward declarations
37class String;
38
39// <summary>
40// Class to convert a MeasurementSet v1 to v2.
41// </summary>
42
43// <use visibility=export>
44
45// <reviewed reviewer="" date="yyyy/mm/dd" tests="" demos="">
46// </reviewed>
47
48// <synopsis>
49// This class converts a version 1 MeasurementSet to version 2.
50// The keyword MS_VERSION tells the version. If not present it is 1.
51// If it is found that the MS is already a version 2 one, nothing is done.
52// <p>
53// It is possible to do the conversion in place. If not, first a copy
54// is made which is thereafter changed in place.
55// <br>
56// The conversion process does the following steps:
57// <ul>
58// <li> Create the newly required columns and keywords
59// and fill them with new or existing data.
60// <li> Convert the old way of defining measure info to the new
61// TableMeasures way.
62// <li> Rename obsolete columns by prefixing their names with _OBSOLETE_.
63// </ul>
64//
65// The constructor only keeps the names of the input and output MS.
66// The actual conversion is done by the <src>convert</src> function.
67// </synopsis>
68
70 public:
71 // Create the converter for the given output (ms2) and input (ms1) name.
72 // The input name has to be an MS version 1. If not, nothing will be done.
73 // <br>If <src>inPlace==True</src>, the ms2 name is ignored. In that
74 // case the ms is changed in place.
75 MS1ToMS2Converter(const String& ms2, const String& ms1, Bool inPlace);
76
78
79 // Forbid copy constructor and assignment.
80 // <group>
83 // </group>
84
85 // Do the actual conversion.
87
88 private:
89 // If possible remove a column from the table.
90 // Otherwise rename it by prefixing it with _OBSOLETE_.
91 void removeColumn(Table& t, const String& col);
92
96
97 // Logger
99};
100
101} // namespace casacore
102
103#endif
MS1ToMS2Converter & operator=(const MS1ToMS2Converter &)=delete
Bool convert()
Do the actual conversion.
MS1ToMS2Converter(const String &ms2, const String &ms1, Bool inPlace)
Create the converter for the given output (ms2) and input (ms1) name.
MS1ToMS2Converter(const MS1ToMS2Converter &)=delete
Forbid copy constructor and assignment.
void removeColumn(Table &t, const String &col)
If possible remove a column from the table.
String: the storage and methods of handling collections of characters.
Definition String.h:355
For temporary backward namespace compatibility, use casa as alias for casacore.
Definition mainpage.dox:28
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40