casacore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MSFitsIDI.h
Go to the documentation of this file.
1 //# MSFitsIDI.h: Convert FITS-IDI data to MS format
2 //# Copyright (C) 1996,1997,1998,1999,2001
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 //#
27 //# $Id$
28 
29 #ifndef MS_MSFITSIDI_H
30 #define MS_MSFITSIDI_H
31 
32 #include <casacore/casa/aips.h>
36 #include <casacore/casa/OS/Path.h>
38 
39 namespace casacore { //# NAMESPACE CASACORE - BEGIN
40 
41 // <summary>
42 // MSFitsIDI: Convert FITS-IDI data to MS format
43 // </summary>
44 
45 // <use visibility=export>
46 
47 // <reviewed reviewer="" date="" tests="" demos="">
48 
49 // <prerequisite>
50 // <li> <linkto class="MeasurementSet">MeasurementSet</linkto> module
51 // </prerequisite>
52 //
53 // <etymology>
54 // From "MS" and "FITS-IDI
55 // </etymology>
56 //
57 // <synopsis>
58 // The MSFitsIDI class converts FITS-IDI data, on tape or disk,
59 // to MeasurementSet (MS) format.
60 // </etymology>
61 //
62 // <example>
63 // <srcblock>
64 // </srcblock>
65 // </example>
66 //
67 // <motivation>
68 // Encapsulate all FITS-IDI to MS conversion capabilities.
69 // </motivation>
70 //
71 // <todo asof="01/03/15">
72 // (i) General input filtering.
73 // (ii) VLBA digital correlator corrections
74 // (iii) Convert all sub-tables
75 // </todo>
76 
77 class MSFitsIDI
78 {
79  public:
80  // Construct from a tape device name and MS output file name
81  MSFitsIDI(const Path& tapeDevice, const String& msOut,
82  const Bool& overWrite, const Int& obsType=0);
83 
84  // Construct from an input file name and an MS output file name
85  MSFitsIDI(const String& inFile, const String& msOut,
86  const Bool& overWrite, const Int& obsType=0);
87 
88  // Destructor
89  ~MSFitsIDI();
90 
91  // Set which files are selected (1-rel; for tape-based data)
92  void selectFiles(const Vector<Int>& files);
93 
94  // Convert the FITS-IDI data to MS format
95  Bool fillMS();
96 
97  protected:
98  // Initialization (called by all constructors)
99  void init(const String& dataSource, const FITS::FitsDevice& deviceType,
100  const String& msOut, const Bool& overWrite, const Int& obsType);
101 
102  // Read and process a FITS-IDI file
103  void readFITSFile(Bool& atEnd);
104 
105  private:
106  // Data source and device type
109 
110  // MS, status and write options
113  Int itsObsType; // 0=standard, 1=fastmosaic, requiring small tiles in the measurement set
114 
115  // Selected file numbers (1-relative)
118 
119 };
120 
121 
122 } //# NAMESPACE CASACORE - END
123 
124 #endif
125 
int Int
Definition: aipstype.h:50
void selectFiles(const Vector< Int > &files)
Set which files are selected (1-rel; for tape-based data)
MSFitsIDI(const Path &tapeDevice, const String &msOut, const Bool &overWrite, const Int &obsType=0)
Construct from a tape device name and MS output file name.
String itsDataSource
Data source and device type.
Definition: MSFitsIDI.h:107
~MSFitsIDI()
Destructor.
Vector< Int > itsSelectedFiles
Selected file numbers (1-relative)
Definition: MSFitsIDI.h:116
Path name of a file.
Definition: Path.h:126
String itsMSOut
MS, status and write options.
Definition: MSFitsIDI.h:111
FitsDevice
Supported FITS Physical Devices.
Definition: fits.h:258
MSFitsIDI: Convert FITS-IDI data to MS format.
Definition: MSFitsIDI.h:77
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
void readFITSFile(Bool &atEnd)
Read and process a FITS-IDI file.
Bool fillMS()
Convert the FITS-IDI data to MS format.
String: the storage and methods of handling collections of characters.
Definition: String.h:225
void init(const String &dataSource, const FITS::FitsDevice &deviceType, const String &msOut, const Bool &overWrite, const Int &obsType)
Initialization (called by all constructors)
FITS::FitsDevice itsDeviceType
Definition: MSFitsIDI.h:108