source: trunk/external/atnf/PKSIO/PKSMS2reader.h@ 1550

Last change on this file since 1550 was 1452, checked in by Malte Marquarding, 16 years ago

update from livedata CVS

File size: 5.4 KB
RevLine 
[1325]1//#---------------------------------------------------------------------------
2//# PKSMS2reader.h: Class to read Parkes Multibeam data from a v2 MS.
3//#---------------------------------------------------------------------------
[1427]4//# Copyright (C) 2000-2008
[1325]5//# Associated Universities, Inc. Washington DC, USA.
6//#
7//# This library is free software; you can redistribute it and/or modify it
8//# under the terms of the GNU Library General Public License as published by
9//# the Free Software Foundation; either version 2 of the License, or (at your
10//# option) any later version.
11//#
12//# This library is distributed in the hope that it will be useful, but WITHOUT
13//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
15//# License for more details.
16//#
17//# You should have received a copy of the GNU Library General Public License
18//# along with this library; if not, write to the Free Software Foundation,
19//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
20//#
21//# Correspondence concerning AIPS++ should be addressed as follows:
22//# Internet email: aips2-request@nrao.edu.
23//# Postal address: AIPS++ Project Office
24//# National Radio Astronomy Observatory
25//# 520 Edgemont Road
26//# Charlottesville, VA 22903-2475 USA
27//#
[1452]28//# $Id: PKSMS2reader.h,v 19.17 2008-11-17 06:38:53 cal103 Exp $
[1325]29//#---------------------------------------------------------------------------
30//# Original: 2000/08/03, Mark Calabretta, ATNF
31//#---------------------------------------------------------------------------
32
33#ifndef ATNF_PKSMS2READER_H
34#define ATNF_PKSMS2READER_H
35
36#include <atnf/PKSIO/PKSreader.h>
[1452]37#include <atnf/PKSIO/PKSrecord.h>
[1325]38
39#include <casa/aips.h>
40#include <casa/Arrays/Matrix.h>
41#include <casa/Arrays/Slicer.h>
42#include <casa/Arrays/Vector.h>
43#include <casa/BasicSL/Complex.h>
44#include <casa/BasicSL/String.h>
45#include <ms/MeasurementSets/MeasurementSet.h>
46#include <tables/Tables/ArrayColumn.h>
47#include <tables/Tables/ScalarColumn.h>
48
[1452]49#include <casa/namespace.h>
50
[1325]51// <summary>
52// Class to read Parkes Multibeam data from a v2 MS.
53// </summary>
54
55class PKSMS2reader : public PKSreader
56{
57 public:
58 // Default constructor.
59 PKSMS2reader();
60
61 // Destructor.
62 virtual ~PKSMS2reader();
63
64 // Open the MS for reading.
65 virtual Int open(
66 const String msName,
67 Vector<Bool> &beams,
68 Vector<Bool> &IFs,
69 Vector<uInt> &nChan,
70 Vector<uInt> &nPol,
71 Vector<Bool> &haveXPol,
72 Bool &haveBase,
73 Bool &haveSpectra);
74
75 // Get parameters describing the data.
76 virtual Int getHeader(
77 String &observer,
78 String &project,
79 String &antName,
80 Vector<Double> &antPosition,
81 String &obsMode,
[1399]82 String &bunit,
[1325]83 Float &equinox,
[1399]84 String &dopplerFrame,
[1325]85 Double &mjd,
86 Double &refFreq,
87 Double &bandwidth);
88
89 // Get frequency parameters for each IF.
90 virtual Int getFreqInfo(
91 Vector<Double> &startFreq,
92 Vector<Double> &endFreq);
93
94 // Set data selection criteria. Channel numbering is 1-relative, zero or
95 // negative channel numbers are taken to be offsets from the last channel.
96 virtual uInt select(
97 const Vector<Bool> beamSel,
98 const Vector<Bool> IFsel,
99 const Vector<Int> startChan,
100 const Vector<Int> endChan,
101 const Vector<Int> refChan,
102 const Bool getSpectra = True,
103 const Bool getXPol = False,
[1452]104 const Int coordSys = 0);
[1325]105
106 // Find the range of the data selected in time and position.
107 virtual Int findRange(
108 Int &nRow,
109 Int &nSel,
110 Vector<Double> &timeSpan,
111 Matrix<Double> &positions);
112
113 // Read the next data record.
[1452]114 virtual Int read(PKSrecord &pksrec);
[1325]115
116 // Close the MS.
117 virtual void close(void);
118
119 private:
120 Bool cHaveBaseLin, cHaveCalFctr, cHaveSrcVel, cHaveTsys, cHaveXCalFctr,
121 cMSopen;
122 Int cCycleNo, cIdx, cNRow, cScanNo;
123 Double cTime;
124 Vector<Int> cEndChan, cRefChan, cStartChan;
125 Vector<Bool> cBeams, cIFs;
126 Vector<Slicer> cDataSel;
127 MeasurementSet cPKSMS;
128
129 ROScalarColumn<Int> cScanNoCol;
130 ROScalarColumn<Double> cTimeCol;
131 ROScalarColumn<Double> cIntervalCol;
132 ROScalarColumn<Int> cFieldIdCol;
133 ROScalarColumn<String> cFieldNameCol;
134 ROScalarColumn<Int> cSrcIdCol;
135 ROScalarColumn<String> cSrcNameCol;
136 ROArrayColumn<Double> cSrcDirCol;
137 ROArrayColumn<Double> cSrcPMCol;
138 ROArrayColumn<Double> cSrcVelCol;
139 ROScalarColumn<Int> cStateIdCol;
140 ROScalarColumn<String> cObsModeCol;
141 ROArrayColumn<Double> cSrcRestFrqCol;
142 ROScalarColumn<Int> cDataDescIdCol;
143 ROArrayColumn<Double> cChanFreqCol;
144 ROScalarColumn<Double> cWeatherTimeCol;
145 ROScalarColumn<Float> cTemperatureCol;
146 ROScalarColumn<Float> cPressureCol;
147 ROScalarColumn<Float> cHumidityCol;
148 ROScalarColumn<Int> cBeamNoCol;
149 ROArrayColumn<Double> cPointingCol;
150 ROArrayColumn<Float> cTsysCol;
151 ROArrayColumn<Float> cSigmaCol;
152 ROArrayColumn<Float> cCalFctrCol;
153 ROArrayColumn<Float> cBaseLinCol;
154 ROArrayColumn<Float> cBaseSubCol;
155 ROArrayColumn<Float> cFloatDataCol;
156 ROArrayColumn<Bool> cFlagCol;
157 ROScalarColumn<Complex> cXCalFctrCol;
158 ROArrayColumn<Complex> cDataCol;
159 ROScalarColumn<Int> cNumReceptorCol;
160};
161
162#endif
Note: See TracBrowser for help on using the repository browser.