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
75{
76 public:
77 // Construct from a tape device name and MS output file name
78 MSFitsIDI(const Path& tapeDevice, const String& msOut,
79 const Bool& overWrite, const Int& obsType=0);
80
81 // Construct from an input file name and an MS output file name
82 MSFitsIDI(const String& inFile, const String& msOut,
83 const Bool& overWrite, const Int& obsType=0);
84
85 // Destructor
87
88 // Set which files are selected (1-rel; for tape-based data)
89 void selectFiles(const Vector<Int>& files);
90
91 // Convert the FITS-IDI data to MS format
93
94 protected:
95 // Initialization (called by all constructors)
96 void init(const String& dataSource, const FITS::FitsDevice& deviceType,
97 const String& msOut, const Bool& overWrite, const Int& obsType);
98
99 // Read and process a FITS-IDI file
100 void readFITSFile(Bool& atEnd);
101
102 private:
103 // Data source and device type
106
107 // MS, status and write options
110 Int itsObsType; // 0=standard, 1=fastmosaic, requiring small tiles in the measurement set
111
112 // Selected file numbers (1-relative)
115
116};
117
118
119} //# NAMESPACE CASACORE - END
120
121#endif
122
FitsDevice
Supported FITS Physical Devices.
Definition fits.h:256
String itsDataSource
Data source and device type.
Definition MSFitsIDI.h:104
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:105
String itsMSOut
MS, status and write options.
Definition MSFitsIDI.h:108
~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:113
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:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
int Int
Definition aipstype.h:48
bool Bool
Define the standard types used by Casacore.
Definition aipstype.h:40