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