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

Last change on this file since 1406 was 1399, checked in by Malte Marquarding, 17 years ago

Mark C added brightness unit to getHeader()

File size: 7.0 KB
RevLine 
[1325]1//#---------------------------------------------------------------------------
2//# PKSMS2reader.h: Class to read Parkes Multibeam data from a v2 MS.
3//#---------------------------------------------------------------------------
[1399]4//# Copyright (C) 2000-2007
[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//#
[1399]28//# $Id: PKSMS2reader.h,v 19.13 2007/11/12 03:37:56 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>
37
38#include <casa/aips.h>
39#include <casa/Arrays/Matrix.h>
40#include <casa/Arrays/Slicer.h>
41#include <casa/Arrays/Vector.h>
42#include <casa/BasicSL/Complex.h>
43#include <casa/BasicSL/String.h>
44#include <ms/MeasurementSets/MeasurementSet.h>
45#include <tables/Tables/ArrayColumn.h>
46#include <tables/Tables/ScalarColumn.h>
47
48// <summary>
49// Class to read Parkes Multibeam data from a v2 MS.
50// </summary>
51
52#include <casa/namespace.h>
53
54class PKSMS2reader : public PKSreader
55{
56 public:
57 // Default constructor.
58 PKSMS2reader();
59
60 // Destructor.
61 virtual ~PKSMS2reader();
62
63 // Open the MS for reading.
64 virtual Int open(
65 const String msName,
66 Vector<Bool> &beams,
67 Vector<Bool> &IFs,
68 Vector<uInt> &nChan,
69 Vector<uInt> &nPol,
70 Vector<Bool> &haveXPol,
71 Bool &haveBase,
72 Bool &haveSpectra);
73
74 // Get parameters describing the data.
75 virtual Int getHeader(
76 String &observer,
77 String &project,
78 String &antName,
79 Vector<Double> &antPosition,
80 String &obsMode,
[1399]81 String &bunit,
[1325]82 Float &equinox,
[1399]83 String &dopplerFrame,
[1325]84 Double &mjd,
85 Double &refFreq,
86 Double &bandwidth);
87
88 // Get frequency parameters for each IF.
89 virtual Int getFreqInfo(
90 Vector<Double> &startFreq,
91 Vector<Double> &endFreq);
92
93 // Set data selection criteria. Channel numbering is 1-relative, zero or
94 // negative channel numbers are taken to be offsets from the last channel.
95 virtual uInt select(
96 const Vector<Bool> beamSel,
97 const Vector<Bool> IFsel,
98 const Vector<Int> startChan,
99 const Vector<Int> endChan,
100 const Vector<Int> refChan,
101 const Bool getSpectra = True,
102 const Bool getXPol = False,
103 const Bool getFeedPos = False);
104
105 // Find the range of the data selected in time and position.
106 virtual Int findRange(
107 Int &nRow,
108 Int &nSel,
109 Vector<Double> &timeSpan,
110 Matrix<Double> &positions);
111
112 // Read the next data record.
113 virtual Int read(
114 Int &scanNo,
115 Int &cycleNo,
116 Double &mjd,
117 Double &interval,
118 String &fieldName,
119 String &srcName,
120 Vector<Double> &srcDir,
121 Vector<Double> &srcPM,
122 Double &srcVel,
123 String &obsMode,
124 Int &IFno,
125 Double &refFreq,
126 Double &bandwidth,
127 Double &freqInc,
128 Double &restFreq,
129 Vector<Float> &tcal,
130 String &tcalTime,
131 Float &azimuth,
132 Float &elevation,
133 Float &parAngle,
134 Float &focusAxi,
135 Float &focusTan,
136 Float &focusRot,
137 Float &temperature,
138 Float &pressure,
139 Float &humidity,
140 Float &windSpeed,
141 Float &windAz,
142 Int &refBeam,
143 Int &beamNo,
144 Vector<Double> &direction,
145 Vector<Double> &scanRate,
146 Vector<Float> &tsys,
147 Vector<Float> &sigma,
148 Vector<Float> &calFctr,
149 Matrix<Float> &baseLin,
150 Matrix<Float> &baseSub,
151 Matrix<Float> &spectra,
152 Matrix<uChar> &flagged,
153 Complex &xCalFctr,
154 Vector<Complex> &xPol);
155
156 // Read the next data record, just the basics.
157 virtual Int read(
158 Int &IFno,
159 Vector<Float> &tsys,
160 Vector<Float> &calFctr,
161 Matrix<Float> &baseLin,
162 Matrix<Float> &baseSub,
163 Matrix<Float> &spectra,
164 Matrix<uChar> &flagged);
165
166 // Close the MS.
167 virtual void close(void);
168
169 private:
170 Bool cHaveBaseLin, cHaveCalFctr, cHaveSrcVel, cHaveTsys, cHaveXCalFctr,
171 cMSopen;
172 Int cCycleNo, cIdx, cNRow, cScanNo;
173 Double cTime;
174 Vector<Int> cEndChan, cRefChan, cStartChan;
175 Vector<Bool> cBeams, cIFs;
176 Vector<Slicer> cDataSel;
177 MeasurementSet cPKSMS;
178
179 ROScalarColumn<Int> cScanNoCol;
180 ROScalarColumn<Double> cTimeCol;
181 ROScalarColumn<Double> cIntervalCol;
182 ROScalarColumn<Int> cFieldIdCol;
183 ROScalarColumn<String> cFieldNameCol;
184 ROScalarColumn<Int> cSrcIdCol;
185 ROScalarColumn<String> cSrcNameCol;
186 ROArrayColumn<Double> cSrcDirCol;
187 ROArrayColumn<Double> cSrcPMCol;
188 ROArrayColumn<Double> cSrcVelCol;
189 ROScalarColumn<Int> cStateIdCol;
190 ROScalarColumn<String> cObsModeCol;
191 ROArrayColumn<Double> cSrcRestFrqCol;
192 ROScalarColumn<Int> cDataDescIdCol;
193 ROArrayColumn<Double> cChanFreqCol;
194 ROScalarColumn<Double> cWeatherTimeCol;
195 ROScalarColumn<Float> cTemperatureCol;
196 ROScalarColumn<Float> cPressureCol;
197 ROScalarColumn<Float> cHumidityCol;
198 ROScalarColumn<Int> cBeamNoCol;
199 ROArrayColumn<Double> cPointingCol;
200 ROArrayColumn<Float> cTsysCol;
201 ROArrayColumn<Float> cSigmaCol;
202 ROArrayColumn<Float> cCalFctrCol;
203 ROArrayColumn<Float> cBaseLinCol;
204 ROArrayColumn<Float> cBaseSubCol;
205 ROArrayColumn<Float> cFloatDataCol;
206 ROArrayColumn<Bool> cFlagCol;
207 ROScalarColumn<Complex> cXCalFctrCol;
208 ROArrayColumn<Complex> cDataCol;
209 ROScalarColumn<Int> cNumReceptorCol;
210};
211
212#endif
Note: See TracBrowser for help on using the repository browser.