casacore
MSFitsInput.h
Go to the documentation of this file.
1 //# MSFitsInput: simple uvfits (random group) to MeasurementSet conversion
2 //# Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This program is free software; you can redistribute it and/or modify
6 //# it under the terms of the GNU General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or
8 //# (at your option) any later version.
9 //#
10 //# This program is distributed in the hope that it will be useful,
11 //# but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 //# GNU General Public License for more details.
14 //#
15 //# You should have received a copy of the GNU General Public License
16 //# along with this program; if not, write to the Free Software
17 //# Foundation, Inc., 675 Mass 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: MSFitsInput.h 21531 2014-12-24 11:46:02Z gervandiepen $
27 
28 #ifndef MS_MSFITSINPUT_H
29 #define MS_MSFITSINPUT_H
30 
31 #include <casacore/casa/aips.h>
32 #include <casacore/casa/Arrays/Matrix.h>
33 #include <casacore/casa/Arrays/Vector.h>
34 #include <casacore/casa/Containers/Block.h>
35 #include <casacore/casa/Containers/Record.h>
36 #include <casacore/fits/FITS/fits.h>
37 #include <casacore/fits/FITS/hdu.h>
38 #include <casacore/casa/Logging/LogIO.h>
39 #include <casacore/ms/MeasurementSets/MeasurementSet.h>
40 #include <casacore/measures/Measures/MDirection.h>
41 #include <casacore/measures/Measures/MFrequency.h>
42 #include <casacore/casa/BasicSL/String.h>
43 #include <casacore/ms/MeasurementSets/MSTileLayout.h>
44 #include <casacore/tables/Tables/BaseTable.h>
45 
46 namespace casacore { //# NAMESPACE CASACORE - BEGIN
47 
48 class FitsInput;
49 class BinaryTable;
50 class MSColumns;
51 
52 // <summary>
53 // A helper class for MSFitsInput
54 // </summary>
55 // <use visibility=local>
56 // <etymology>
57 // This class can hold a primary array of several datatypes
58 // </etymology>
59 // <synopsis>
60 // This is a helper class to avoid cumbersome switch statements on the
61 // template type of the primary array
62 // It forwards all the PrimaryArray member functions we need in the filler.
63 // </synopsis>
65 {
66  // This is a helper class to avoid cumbersome switch statements on the
67  // template type of the primary array
68  // It forwards all the PrimaryTable member function we need in the filler.
69 public:
70  // Construct an empty holder, used to attach to later
72 
73  // Construct from an input file containing a FITS primary group hdu.
74  // Throws an exception if the datatype is not Short, FitsLong or Float
76 
78 
79  // Attach to the input file, create the appropriate PrimaryArray.
80  // Throws an exception if the datatype is not Short, FitsLong or Float
81  void attach(FitsInput& infile);
82 
83  // Detach from the input file
84  void detach();
85 
86  //# forwarding functions
87 
88  // Number of dimensions
90  {return hdu_p->dims();}
91 
92  // Length of i'th axis
93  Int dim(Int i)
94  {return hdu_p->dim(i);}
95 
96  // Coordinate type
98  { return pf ? pf->ctype(i) : (pl ? pl->ctype(i) : ps->ctype(i));}
99 
100  // Coordinate reference value
102  { return pf ? pf->crval(i) : (pl ? pl->crval(i) : ps->crval(i));}
103 
104  // Coordinate reference pixel
106  { return pf ? pf->crpix(i) : (pl ? pl->crpix(i) : ps->crpix(i));}
107 
108  // Coordinate delta
110  { return pf ? pf->cdelt(i) : (pl ? pl->cdelt(i) : ps->cdelt(i));}
111 
112  // Keyword of given type
114  { return hdu_p->kw(n);}
115 
116  // All keywords
118  { return hdu_p->kwlist();}
119 
120  // Advance to next keyword
122  { return hdu_p->nextkw();}
123 
124  // Read the next group
125  Int read() {
126  if (pf) return pf->read();
127  else if (pl) return pl->read();
128  else if (ps) return ps->read();
129  else if (pb) return pb->read();
130  else cout << "can not read the table" << endl;
131  return 0;
132  }
133 
134 private:
140 };
141 
142 // <summary>
143 // A helper class for MSFitsInput
144 // </summary>
145 // <use visibility=local>
146 // <etymology>
147 // This class can hold a primary group of several datatypes
148 // </etymology>
149 // <synopsis>
150 // This is a helper class to avoid cumbersome switch statements on the
151 // template type of the primary group
152 // It forwards all the PrimaryGroup member functions we need in the filler.
153 // </synopsis>
155 {
156  // This is a helper class to avoid cumbersome switch statements on the
157  // template type of the primary group
158  // It forwards all the PrimaryGroup member function we need in the filler.
159 public:
160  // Construct an empty holder, used to attach to later
162 
163  // Construct from an input file containing a FITS primary group hdu.
164  // Throws an exception if the datatype is not Short, FitsLong or Float
166 
168 
169  // Attach to the input file, create the appropriate PrimaryGroup.
170  // Throws an exception if the datatype is not Short, FitsLong or Float
171  void attach(FitsInput& infile);
172 
173  // Detach from the input file
174  void detach();
175 
176  //# forwarding functions
177 
178  // Number of dimensions
180  {return hdu_p->dims();}
181 
182  // Length of i'th axis
184  {return hdu_p->dim(i);}
185 
186  // Coordinate type
188  { return pf ? pf->ctype(i) : (pl ? pl->ctype(i) : ps->ctype(i));}
189 
190  // Coordinate reference value
192  { return pf ? pf->crval(i) : (pl ? pl->crval(i) : ps->crval(i));}
193 
194  // Coordinate reference pixel
196  { return pf ? pf->crpix(i) : (pl ? pl->crpix(i) : ps->crpix(i));}
197 
198  // Coordinate delta
200  { return pf ? pf->cdelt(i) : (pl ? pl->cdelt(i) : ps->cdelt(i));}
201 
202  // Keyword of given type
204  { return hdu_p->kw(n);}
205 
206  // All keywords
208  { return hdu_p->kwlist();}
209 
210  // Advance to next keyword
212  { return hdu_p->nextkw();}
213 
214  // Number of groups
215  Int gcount() const
216  { return pf ? pf->gcount() : ( pl ? pl->gcount() : ps->gcount());}
217 
218  // Number of parameters
219  Int pcount() const
220  { return pf ? pf->pcount() : ( pl ? pl->pcount() : ps->pcount());}
221 
222  // Parameter type
223  Char* ptype(Int i) const
224  { return pf ? pf->ptype(i) : ( pl ? pl->ptype(i) : ps->ptype(i));}
225 
226  // Read the next group
228  { return pf ? pf->read() : ( pl ? pl->read() : ps->read());}
229 
230  // Get i'th parameter
232  { return pf ? pf->parm(i) : ( pl ? pl->parm(i) : ps->parm(i));}
233 
234  // Get group data with index i, scaled and converted to Double
236  { return pf ? (*pf)(i) : ( pl ? (*pl)(i) : (*ps)(i));}
237 
238 private:
243 };
244 
245 // <summary>
246 // UV FITS to MeasurementSet filler
247 // </summary>
248 
249 // <use visibility=export>
250 
251 // <prerequisite>
252 // <li> MeasurementSet
253 // <li> FITS classes
254 // </prerequisite>
255 //
256 // <etymology>
257 // MSFitsInput handles the conversion of FITS files to MeasurementSets
258 // </etymology>
259 //
260 // <synopsis>
261 // UV FITS to MeasurementSet filler. This can handle single source fits and
262 // multi source fits as written by classic AIPS. Also copes with multiple
263 // arrays (i.e. multiple AN tables) but doesn't correct for 5 day offsets
264 // introduced by DBCON.
265 // </synopsis>
266 
268 {
269  // This is an implementation helper class used to store 'local' data
270  // during the filling process.
271 public:
272  // Create from output and input file names. This function opens the input
273  // file, and checks the output file is writable.
274  MSFitsInput(const String& msFile, const String& fitsFile, const Bool NewNameStyle=False);
275 
276  // The destructor is fairly trivial.
278 
279  // Read all the data from the FITS file and create the MeasurementSet. Throws
280  // an exception when it has severe trouble interpreting the FITS file.
281  //
283 
284 protected:
285 
286  // Check that the input is a UV fits file with required contents.
287  // Returns False if not ok.
289 
290  // Read the axis info of the primary group, throws an exception if required
291  // axes are missing.
293 
294  // Set up the MeasurementSet, including StorageManagers and fixed columns.
295  // If useTSM is True, the Tiled Storage Manager will be used to store
296  // DATA, FLAG and WEIGHT_SPECTRUM. Use obsType to choose the tiling
297  // scheme.
298  void setupMeasurementSet(const String& MSFileName, Bool useTSM=True,
299  Int obsType = MSTileLayout::Standard);
300 
302  // Read a binary table extension of type AIPS AN and create an antenna table
304 
305  // Read a binary table extension and update history table
307 
308  // Read a binary table extension and update history table
310 
311  //extract axis information
313 
314  //extract axis information
316 
318 
319  //verify that the fits contains visibility data
321 
323 
324  // fill Field table
326  void fillFieldTable(double, double, String);
327 
329 
331 
333 
334  // fill the Feed table with minimal info needed for synthesis processing
336 
338  // Fill the Observation and ObsLog tables
340 
341  // Fill the main table from the Primary group data
342  // if we have enough memory try to do it in mem
343  void fillMSMainTableColWise(Int& nField, Int& nSpW);
344  //else do it row by row
345  void fillMSMainTable(Int& nField, Int& nSpW);
346 
347  // fill spectralwindow table from FITS FQ table + header info
349 
350  // fill spectralwindow table from header
352 
353  // fill Field table from FITS SU table
354  void fillFieldTable(BinaryTable& bt, Int nField);
355 
356  // fill Field table from header (single source fits)
357  void fillFieldTable(Int nField);
358 
359  // fill the Pointing table (from Field table, all antennas are assumed
360  // to point in the field direction) and possibly the Source table.
362 
363  // fix up the EPOCH MEASURE_REFERENCE keywords using the value found
364  // in the (last) AN table
366 
367  // Returns the Direction Measure reference for UVW and other appropriate columns
368  // in msc_p (which must exist but have empty columns before you can set it!).
370 
371  // Check the frame if there is an SU table
373  // update a the Spectral window post filling if necessary
375 
376  void readRandomGroupUVFits(Int obsType);
378 
379 private:
380  //# The default constructor is private and undefined
382  //# The copy constructor is private and undefined
383  MSFitsInput(const MSFitsInput& other);
384  //# The assignment operator is private and undefined
386 
401  MDirection::Types _epochRef; // This is a direction measure reference code
402  // determined by epoch_p, hence the name and type.
403  // unique antennas found in the visibility data
404  // NOTE These are 1-based
405  std::set<Int> _uniqueAnts;
406  // number of rows in the created MS ANTENNA table
411  Double _restfreq; // used for images
420 
421  Matrix<Double> _restFreq; // used for UVFITS
424 
425  std::pair<Int, Int> _extractAntennas(Float baseline);
426 
427 };
428 
429 
430 } //# NAMESPACE CASACORE - END
431 
432 #endif
casacore::MSFitsInput::_priGroup
MSPrimaryGroupHolder _priGroup
Definition: MSFitsInput.h:389
casacore::MSFitsInput::_epoch
Double _epoch
Definition: MSFitsInput.h:400
casacore::HeaderDataUnit::kw
const FitsKeyword * kw(int n)
Definition: hdu.h:129
casacore::Matrix< Int >
casacore::FITS::ReservedName
ReservedName
FITS Reserved Names.
Definition: fits.h:242
casacore::MSPrimaryGroupHolder::cdelt
Double cdelt(Int i)
Coordinate delta.
Definition: MSFitsInput.h:199
casacore::MSFitsInput::fillMSMainTable
void fillMSMainTable(Int &nField, Int &nSpW)
else do it row by row
casacore::MSPrimaryTableHolder::ctype
Char * ctype(Int i)
Coordinate type.
Definition: MSFitsInput.h:97
casacore::PrimaryGroup< Short >
casacore::MSFitsInput::MSFitsInput
MSFitsInput(const String &msFile, const String &fitsFile, const Bool NewNameStyle=False)
This is an implementation helper class used to store 'local' data during the filling process.
casacore::PrimaryGroup::read
int read()
read, or write the next group
casacore::MSFitsInput::_timsys
String _timsys
Definition: MSFitsInput.h:399
casacore::MSPrimaryGroupHolder::pl
PrimaryGroup< FitsLong > * pl
Definition: MSFitsInput.h:241
casacore::MSPrimaryGroupHolder::ps
PrimaryGroup< Short > * ps
Definition: MSFitsInput.h:240
casacore::MSPrimaryTableHolder::MSPrimaryTableHolder
MSPrimaryTableHolder()
This is a helper class to avoid cumbersome switch statements on the template type of the primary arra...
casacore::PrimaryArray::ctype
char * ctype(int n) const
Definition: hdu.h:362
casacore::MSPrimaryGroupHolder::parm
Double parm(Int i)
Get i'th parameter.
Definition: MSFitsInput.h:231
casacore::MSFitsInput::_uniqueAnts
std::set< Int > _uniqueAnts
determined by epoch_p, hence the name and type.
Definition: MSFitsInput.h:405
casacore::MSFitsInput::MSFitsInput
MSFitsInput(const MSFitsInput &other)
casacore::MSFitsInput::readPrimaryTableUVFits
void readPrimaryTableUVFits(Int obsType)
casacore::MSPrimaryGroupHolder::dims
Int dims()
Number of dimensions.
Definition: MSFitsInput.h:179
casacore::MSFitsInput::setFreqFrameVar
void setFreqFrameVar(BinaryTable &binTab)
Check the frame if there is an SU table.
casacore::MSPrimaryGroupHolder::MSPrimaryGroupHolder
MSPrimaryGroupHolder()
This is a helper class to avoid cumbersome switch statements on the template type of the primary grou...
casacore::MSFitsInput::checkRequiredAxis
void checkRequiredAxis()
verify that the fits contains visibility data
casacore::MSFitsInput::_addSourceTable
Bool _addSourceTable
Definition: MSFitsInput.h:412
casacore::PrimaryTable< Short >
casacore::MSFitsInput::_delta
Vector< Double > _delta
Definition: MSFitsInput.h:398
casacore::MSFitsInput::_msFile
String _msFile
Definition: MSFitsInput.h:388
casacore::MSFitsInput::_msc
MSColumns * _msc
Definition: MSFitsInput.h:392
casacore::MSPrimaryTableHolder::dim
Int dim(Int i)
Length of i'th axis.
Definition: MSFitsInput.h:93
casacore::MSFitsInput::_array
String _array
Definition: MSFitsInput.h:399
casacore::PrimaryArray::crpix
double crpix(int n) const
Definition: hdu.h:363
casacore::PrimaryGroup::ptype
char * ptype(int n) const
Definition: hdu.h:609
casacore::MSPrimaryTableHolder::kw
const FitsKeyword * kw(const FITS::ReservedName &n)
Keyword of given type.
Definition: MSFitsInput.h:113
casacore::MSPrimaryGroupHolder::MSPrimaryGroupHolder
MSPrimaryGroupHolder(FitsInput &infile)
Construct from an input file containing a FITS primary group hdu.
casacore::MSPrimaryTableHolder::ps
PrimaryTable< Short > * ps
Definition: MSFitsInput.h:136
casacore::MSFitsInput::_corrType
Vector< Int > _corrType
Definition: MSFitsInput.h:394
casacore::MSPrimaryTableHolder::MSPrimaryTableHolder
MSPrimaryTableHolder(FitsInput &infile)
Construct from an input file containing a FITS primary group hdu.
casacore::MSFitsInput::_log
LogIO _log
Definition: MSFitsInput.h:413
casacore::HeaderDataUnit::nextkw
const FitsKeyword * nextkw()
Definition: hdu.h:126
casacore::MSPrimaryTableHolder::hdu_p
HeaderDataUnit * hdu_p
Definition: MSFitsInput.h:135
casacore::MSFitsInput::_chanFreq
Vector< Double > _chanFreq
Definition: MSFitsInput.h:417
casacore::MSPrimaryTableHolder::dims
Int dims()
Number of dimensions.
Definition: MSFitsInput.h:89
casacore::PrimaryGroup::parm
double parm(int)
casacore::FitsKeyword
FITS keyword.
Definition: fits.h:519
casacore::MSPrimaryTableHolder::~MSPrimaryTableHolder
~MSPrimaryTableHolder()
casacore::MSFitsInput::_receptorAngle
Vector< Double > _receptorAngle
Definition: MSFitsInput.h:409
casacore::MSFitsInput::fillFieldTable
void fillFieldTable(BinaryTable &bt, Int nField)
fill Field table from FITS SU table
casacore::MSFitsInput::operator=
MSFitsInput & operator=(const MSFitsInput &other)
casacore::MSFitsInput::fillFeedTable
void fillFeedTable()
fill the Feed table with minimal info needed for synthesis processing
casacore::MSFitsInput::_corrIndex
Block< Int > _corrIndex
Definition: MSFitsInput.h:395
casacore::BinaryTable
BinaryTable is used to translate a FITS binary table to a Casacore Table.
Definition: BinTable.h:111
casacore::MSFitsInput::_header
Record _header
Definition: MSFitsInput.h:414
casacore::MSPrimaryGroupHolder::gcount
Int gcount() const
Number of groups.
Definition: MSFitsInput.h:215
casacore::PrimaryArray::crval
double crval(int n) const
Definition: hdu.h:365
casacore::MSFitsInput::_infile
FitsInput * _infile
Definition: MSFitsInput.h:387
casacore::MSFitsInput::_coordType
Vector< String > _coordType
Definition: MSFitsInput.h:397
casacore::MSPrimaryTableHolder::pf
PrimaryTable< Float > * pf
Definition: MSFitsInput.h:138
casacore::MSFitsInput::checkInput
Bool checkInput(FitsInput &infile)
Check that the input is a UV fits file with required contents.
casacore::MSFitsInput::_nPixel
Vector< Int > _nPixel
Definition: MSFitsInput.h:394
casacore::MSFitsInput::_obsTime
Vector< Double > _obsTime
Definition: MSFitsInput.h:419
casacore::MSFitsInput::MSFitsInput
MSFitsInput()
casacore::MSPrimaryGroupHolder
A helper class for MSFitsInput.
Definition: MSFitsInput.h:155
casacore::HeaderDataUnit::kwlist
ConstFitsKeywordList & kwlist()
Operations on the HDU's keyword list.
Definition: hdu.h:120
casacore::MSFitsInput::fillObsTables
Fill the Observation and ObsLog tables *void fillObsTables()
casacore::LogIO
ostream-like interface to creating log messages.
Definition: LogIO.h:168
casacore::MSPrimaryGroupHolder::nextkw
const FitsKeyword * nextkw()
Advance to next keyword.
Definition: MSFitsInput.h:211
casacore::Float
float Float
Definition: aipstype.h:54
casacore::MSFitsInput::getDirectionFrame
MDirection::Types getDirectionFrame(Double epoch)
Returns the Direction Measure reference for UVW and other appropriate columns in msc_p (which must ex...
casacore::MSPrimaryGroupHolder::read
Int read()
Read the next group.
Definition: MSFitsInput.h:227
casacore::MSFitsInput::_nArray
Int _nArray
Definition: MSFitsInput.h:408
casacore::Double
double Double
Definition: aipstype.h:55
casacore::PrimaryArray::cdelt
double cdelt(int n) const
Definition: hdu.h:366
casacore::MSPrimaryTableHolder::kwlist
ConstFitsKeywordList & kwlist()
All keywords.
Definition: MSFitsInput.h:117
casacore::MSFitsInput::fillPointingTable
void fillPointingTable()
casacore::HeaderDataUnit::dims
Int dims() const
Definition: hdu.h:76
casacore::False
const Bool False
Definition: aipstype.h:44
casacore::MSFitsInput::_priTable
MSPrimaryTableHolder _priTable
Definition: MSFitsInput.h:390
casacore::MSFitsInput::~MSFitsInput
~MSFitsInput()
The destructor is fairly trivial.
casacore::MSFitsInput::fillPolarizationTable
void fillPolarizationTable()
casacore::MSFitsInput::_refFreq
Double _refFreq
Definition: MSFitsInput.h:415
casacore::MSFitsInput::fixEpochReferences
void fixEpochReferences()
fix up the EPOCH MEASURE_REFERENCE keywords using the value found in the (last) AN table
casacore::MSPrimaryGroupHolder::pf
PrimaryGroup< Float > * pf
Definition: MSFitsInput.h:242
casacore::MSPrimaryTableHolder::crval
Double crval(Int i)
Coordinate reference value.
Definition: MSFitsInput.h:101
casacore::MSFitsInput::fillSpectralWindowTable
void fillSpectralWindowTable(BinaryTable &bt, Int nSpW)
fill spectralwindow table from FITS FQ table + header info
casacore::MSPrimaryGroupHolder::pcount
Int pcount() const
Number of parameters.
Definition: MSFitsInput.h:219
casacore::MSFitsInput::_extractAntennas
std::pair< Int, Int > _extractAntennas(Float baseline)
casacore::MSFitsInput::fillMSMainTableColWise
void fillMSMainTableColWise(Int &nField, Int &nSpW)
Fill the main table from the Primary group data if we have enough memory try to do it in mem.
casacore::MSFitsInput::_msCreated
Bool _msCreated
Definition: MSFitsInput.h:423
casacore::PrimaryGroup::pcount
Int pcount() const
Definition: hdu.h:608
casacore::MSFitsInput::sortPolarizations
void sortPolarizations()
extract axis information
casacore::MSFitsInput::getPrimaryGroupAxisInfo
void getPrimaryGroupAxisInfo()
Read the axis info of the primary group, throws an exception if required axes are missing.
casacore::MSFitsInput::fillFieldTable
void fillFieldTable(double, double, String)
casacore::Int
int Int
Definition: aipstype.h:50
casacore
this file contains all the compiler specific defines
Definition: mainpage.dox:28
casacore::MSFitsInput::_newNameStyle
Bool _newNameStyle
Definition: MSFitsInput.h:418
casacore::MSPrimaryGroupHolder::hdu_p
HeaderDataUnit * hdu_p
Definition: MSFitsInput.h:239
casacore::MFrequency::Types
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
Definition: MFrequency.h:176
casacore::PrimaryTable::read
int read()
The ‘read()’ and ‘write()’ functions control reading and writing data from the external FITS I/O medi...
casacore::MSFitsInput::_refPix
Vector< Double > _refPix
Definition: MSFitsInput.h:398
casacore::MSPrimaryGroupHolder::kwlist
ConstFitsKeywordList & kwlist()
All keywords.
Definition: MSFitsInput.h:207
casacore::True
const Bool True
Definition: aipstype.h:43
casacore::MSPrimaryTableHolder
A helper class for MSFitsInput.
Definition: MSFitsInput.h:65
casacore::MSFitsInput::fillSpectralWindowTable
void fillSpectralWindowTable(BinaryTable &bt)
casacore::MSFitsInput::fillMSMainTable
void fillMSMainTable(BinaryTable &bt)
casacore::MSFitsInput::_useAltrval
Bool _useAltrval
Definition: MSFitsInput.h:416
casacore::MSTileLayout::Standard
@ Standard
Standard, optimizes i/o by using large tiles (128 kB)
Definition: MSTileLayout.h:87
casacore::MSFitsInput::_epochRef
MDirection::Types _epochRef
Definition: MSFitsInput.h:401
casacore::MSPrimaryGroupHolder::crpix
Double crpix(Int i)
Coordinate reference pixel.
Definition: MSFitsInput.h:195
casacore::MSPrimaryTableHolder::detach
void detach()
Detach from the input file.
casacore::MSFitsInput::fillExtraTables
void fillExtraTables()
fill the Pointing table (from Field table, all antennas are assumed to point in the field direction) ...
casacore::HeaderDataUnit
base class that defines a HDU
Definition: hdu.h:71
casacore::FitsInput
fixed-length sequential blocked FITS input
Definition: fitsio.h:156
casacore::MSPrimaryGroupHolder::kw
const FitsKeyword * kw(const FITS::ReservedName &n)
Keyword of given type.
Definition: MSFitsInput.h:203
casacore::MSFitsInput
UV FITS to MeasurementSet filler.
Definition: MSFitsInput.h:268
casacore::MSFitsInput::_refVal
Vector< Double > _refVal
Definition: MSFitsInput.h:398
casacore::MSFitsInput::_restfreq
Double _restfreq
Definition: MSFitsInput.h:411
casacore::MSPrimaryGroupHolder::ctype
Char * ctype(Int i)
Coordinate type.
Definition: MSFitsInput.h:187
casacore::MSPrimaryGroupHolder::ptype
Char * ptype(Int i) const
Parameter type.
Definition: MSFitsInput.h:223
casacore::MSFitsInput::fillHistoryTable
void fillHistoryTable(ConstFitsKeywordList &kwl)
Read a binary table extension and update history table.
casacore::MSPrimaryGroupHolder::attach
void attach(FitsInput &infile)
Attach to the input file, create the appropriate PrimaryGroup.
casacore::MSFitsInput::setupMeasurementSet
void setupMeasurementSet(const String &MSFileName, Bool useTSM=True, Int obsType=MSTileLayout::Standard)
Set up the MeasurementSet, including StorageManagers and fixed columns.
casacore::MSPrimaryTableHolder::read
Int read()
Read the next group.
Definition: MSFitsInput.h:125
casacore::MeasurementSet
A Table intended to hold astronomical data (a set of Measurements).
Definition: MeasurementSet.h:243
casacore::MSFitsInput::_ms
MeasurementSet _ms
Definition: MSFitsInput.h:391
casacore::MSPrimaryGroupHolder::crval
Double crval(Int i)
Coordinate reference value.
Definition: MSFitsInput.h:191
casacore::MSPrimaryGroupHolder::dim
Int dim(Int i)
Length of i'th axis.
Definition: MSFitsInput.h:183
casacore::String
String: the storage and methods of handling collections of characters.
Definition: String.h:223
casacore::MSFitsInput::readRandomGroupUVFits
void readRandomGroupUVFits(Int obsType)
casacore::MSPrimaryGroupHolder::detach
void detach()
Detach from the input file.
casacore::Bool
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
casacore::Block< Int >
casacore::MSPrimaryTableHolder::pb
PrimaryTable< uChar > * pb
Definition: MSFitsInput.h:139
casacore::MDirection::Types
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Definition: MDirection.h:188
casacore::MSFitsInput::fillSpectralWindowTable
void fillSpectralWindowTable()
fill spectralwindow table from header
casacore::MSFitsInput::_freqsys
MFrequency::Types _freqsys
Definition: MSFitsInput.h:410
casacore::Record
A hierarchical collection of named fields of various types.
Definition: Record.h:181
casacore::MSFitsInput::_nIF
Int _nIF
Definition: MSFitsInput.h:393
casacore::MSFitsInput::_object
String _object
Definition: MSFitsInput.h:399
casacore::ConstFitsKeywordList
list of read-only FITS keywords
Definition: fits.h:955
casacore::MSPrimaryTableHolder::cdelt
Double cdelt(Int i)
Coordinate delta.
Definition: MSFitsInput.h:109
casacore::MSPrimaryGroupHolder::operator()
Double operator()(Int i) const
Get group data with index i, scaled and converted to Double.
Definition: MSFitsInput.h:235
casacore::MSPrimaryTableHolder::attach
void attach(FitsInput &infile)
Attach to the input file, create the appropriate PrimaryArray.
casacore::MSColumns
A class to provide easy access to MeasurementSet columns.
Definition: MSColumns.h:117
casacore::Vector< Int >
casacore::MSFitsInput::fillSourceTable
void fillSourceTable()
casacore::MSFitsInput::readFitsFile
void readFitsFile(Int obsType=MSTileLayout::Standard)
Read all the data from the FITS file and create the MeasurementSet.
casacore::MSFitsInput::fillFieldTable
void fillFieldTable(Int nField)
fill Field table from header (single source fits)
casacore::MSPrimaryTableHolder::crpix
Double crpix(Int i)
Coordinate reference pixel.
Definition: MSFitsInput.h:105
casacore::MSPrimaryGroupHolder::~MSPrimaryGroupHolder
~MSPrimaryGroupHolder()
casacore::MSFitsInput::_sysVel
Matrix< Double > _sysVel
Definition: MSFitsInput.h:422
casacore::MSFitsInput::_nAntRow
Int _nAntRow
number of rows in the created MS ANTENNA table
Definition: MSFitsInput.h:407
casacore::MSFitsInput::fillAntennaTable
Read a binary table extension of type AIPS AN and create an antenna table *void fillAntennaTable(BinaryTable &bt)
casacore::MSFitsInput::fillFieldTable
void fillFieldTable(BinaryTable &bt)
fill Field table
casacore::HeaderDataUnit::dim
Int dim(int n) const
Definition: hdu.h:77
casacore::MSFitsInput::_corrProduct
Matrix< Int > _corrProduct
Definition: MSFitsInput.h:396
casacore::Char
char Char
Definition: aipstype.h:46
casacore::MSPrimaryTableHolder::nextkw
const FitsKeyword * nextkw()
Advance to next keyword.
Definition: MSFitsInput.h:121
casacore::MSPrimaryTableHolder::pl
PrimaryTable< FitsLong > * pl
Definition: MSFitsInput.h:137
casacore::PrimaryGroup::gcount
Int gcount() const
Return basic parameters of a random group.
Definition: hdu.h:607
casacore::MSFitsInput::_restFreq
Matrix< Double > _restFreq
Definition: MSFitsInput.h:421
casacore::MSFitsInput::updateSpectralWindowTable
void updateSpectralWindowTable()
update a the Spectral window post filling if necessary
casacore::MSFitsInput::fillObservationTable
void fillObservationTable(ConstFitsKeywordList &kwl)
Read a binary table extension and update history table.
casacore::MSFitsInput::getAxisInfo
void getAxisInfo(ConstFitsKeywordList &)
extract axis information