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

Last change on this file since 1361 was 1325, checked in by mar637, 18 years ago

Changes to use casacore instead of casa_asap/aips++\nAdded atnf PKSIO library snapshot to external and linking against this local copy

File size: 7.0 KB
Line 
1//#---------------------------------------------------------------------------
2//# PKSMS2reader.h: Class to read Parkes Multibeam data from a v2 MS.
3//#---------------------------------------------------------------------------
4//# Copyright (C) 2000-2006
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//#
28//# $Id: PKSMS2reader.h,v 19.12 2006/07/05 04:55:45 mcalabre Exp $
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,
81 Float &equinox,
82 String &freqRef,
83 Double &mjd,
84 Double &refFreq,
85 Double &bandwidth);
86
87 // Get frequency parameters for each IF.
88 virtual Int getFreqInfo(
89 Vector<Double> &startFreq,
90 Vector<Double> &endFreq);
91
92 // Set data selection criteria. Channel numbering is 1-relative, zero or
93 // negative channel numbers are taken to be offsets from the last channel.
94 virtual uInt select(
95 const Vector<Bool> beamSel,
96 const Vector<Bool> IFsel,
97 const Vector<Int> startChan,
98 const Vector<Int> endChan,
99 const Vector<Int> refChan,
100 const Bool getSpectra = True,
101 const Bool getXPol = False,
102 const Bool getFeedPos = False);
103
104 // Find the range of the data selected in time and position.
105 virtual Int findRange(
106 Int &nRow,
107 Int &nSel,
108 Vector<Double> &timeSpan,
109 Matrix<Double> &positions);
110
111 // Read the next data record.
112 virtual Int read(
113 Int &scanNo,
114 Int &cycleNo,
115 Double &mjd,
116 Double &interval,
117 String &fieldName,
118 String &srcName,
119 Vector<Double> &srcDir,
120 Vector<Double> &srcPM,
121 Double &srcVel,
122 String &obsMode,
123 Int &IFno,
124 Double &refFreq,
125 Double &bandwidth,
126 Double &freqInc,
127 Double &restFreq,
128 Vector<Float> &tcal,
129 String &tcalTime,
130 Float &azimuth,
131 Float &elevation,
132 Float &parAngle,
133 Float &focusAxi,
134 Float &focusTan,
135 Float &focusRot,
136 Float &temperature,
137 Float &pressure,
138 Float &humidity,
139 Float &windSpeed,
140 Float &windAz,
141 Int &refBeam,
142 Int &beamNo,
143 Vector<Double> &direction,
144 Vector<Double> &scanRate,
145 Vector<Float> &tsys,
146 Vector<Float> &sigma,
147 Vector<Float> &calFctr,
148 Matrix<Float> &baseLin,
149 Matrix<Float> &baseSub,
150 Matrix<Float> &spectra,
151 Matrix<uChar> &flagged,
152 Complex &xCalFctr,
153 Vector<Complex> &xPol);
154
155 // Read the next data record, just the basics.
156 virtual Int read(
157 Int &IFno,
158 Vector<Float> &tsys,
159 Vector<Float> &calFctr,
160 Matrix<Float> &baseLin,
161 Matrix<Float> &baseSub,
162 Matrix<Float> &spectra,
163 Matrix<uChar> &flagged);
164
165 // Close the MS.
166 virtual void close(void);
167
168 private:
169 Bool cHaveBaseLin, cHaveCalFctr, cHaveSrcVel, cHaveTsys, cHaveXCalFctr,
170 cMSopen;
171 Int cCycleNo, cIdx, cNRow, cScanNo;
172 Double cTime;
173 Vector<Int> cEndChan, cRefChan, cStartChan;
174 Vector<Bool> cBeams, cIFs;
175 Vector<Slicer> cDataSel;
176 MeasurementSet cPKSMS;
177
178 ROScalarColumn<Int> cScanNoCol;
179 ROScalarColumn<Double> cTimeCol;
180 ROScalarColumn<Double> cIntervalCol;
181 ROScalarColumn<Int> cFieldIdCol;
182 ROScalarColumn<String> cFieldNameCol;
183 ROScalarColumn<Int> cSrcIdCol;
184 ROScalarColumn<String> cSrcNameCol;
185 ROArrayColumn<Double> cSrcDirCol;
186 ROArrayColumn<Double> cSrcPMCol;
187 ROArrayColumn<Double> cSrcVelCol;
188 ROScalarColumn<Int> cStateIdCol;
189 ROScalarColumn<String> cObsModeCol;
190 ROArrayColumn<Double> cSrcRestFrqCol;
191 ROScalarColumn<Int> cDataDescIdCol;
192 ROArrayColumn<Double> cChanFreqCol;
193 ROScalarColumn<Double> cWeatherTimeCol;
194 ROScalarColumn<Float> cTemperatureCol;
195 ROScalarColumn<Float> cPressureCol;
196 ROScalarColumn<Float> cHumidityCol;
197 ROScalarColumn<Int> cBeamNoCol;
198 ROArrayColumn<Double> cPointingCol;
199 ROArrayColumn<Float> cTsysCol;
200 ROArrayColumn<Float> cSigmaCol;
201 ROArrayColumn<Float> cCalFctrCol;
202 ROArrayColumn<Float> cBaseLinCol;
203 ROArrayColumn<Float> cBaseSubCol;
204 ROArrayColumn<Float> cFloatDataCol;
205 ROArrayColumn<Bool> cFlagCol;
206 ROScalarColumn<Complex> cXCalFctrCol;
207 ROArrayColumn<Complex> cDataCol;
208 ROScalarColumn<Int> cNumReceptorCol;
209};
210
211#endif
Note: See TracBrowser for help on using the repository browser.