source: trunk/external/atnf/PKSIO/PKSreader.h@ 1392

Last change on this file since 1392 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: 6.2 KB
Line 
1//#---------------------------------------------------------------------------
2//# PKSreader.h: Class to read Parkes multibeam data.
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: PKSreader.h,v 19.11 2006/07/05 05:00:21 mcalabre Exp $
29//#---------------------------------------------------------------------------
30//# Original: 2000/08/02, Mark Calabretta, ATNF
31//#---------------------------------------------------------------------------
32
33#ifndef ATNF_PKSREADER_H
34#define ATNF_PKSREADER_H
35
36#include <casa/aips.h>
37#include <casa/Arrays/Matrix.h>
38#include <casa/Arrays/Vector.h>
39#include <casa/BasicSL/Complex.h>
40#include <casa/BasicSL/String.h>
41
42// <summary>
43// Class to read Parkes multibeam data.
44// </summary>
45
46#include <casa/namespace.h>
47
48// Open an appropriate PKSreader for a Parkes Multibeam dataset.
49class PKSreader* getPKSreader(
50 const String name,
51 const Int retry,
52 const Int interpolate,
53 String &format,
54 Vector<Bool> &beams,
55 Vector<Bool> &IFs,
56 Vector<uInt> &nChan,
57 Vector<uInt> &nPol,
58 Vector<Bool> &haveXPol,
59 Bool &haveBase,
60 Bool &haveSpectra);
61
62// As above, but search a list of directories for it.
63class PKSreader* getPKSreader(
64 const String name,
65 const Vector<String> directories,
66 const Int retry,
67 const Int interpolate,
68 Int &iDir,
69 String &format,
70 Vector<Bool> &beams,
71 Vector<Bool> &IFs,
72 Vector<uInt> &nChan,
73 Vector<uInt> &nPol,
74 Vector<Bool> &haveXPol,
75 Bool &haveBase,
76 Bool &haveSpectra);
77
78
79class PKSreader
80{
81 public:
82 // Destructor.
83 virtual ~PKSreader() {};
84
85 // Open the dataset.
86 virtual Int open(
87 const String inName,
88 Vector<Bool> &beams,
89 Vector<Bool> &IFs,
90 Vector<uInt> &nChan,
91 Vector<uInt> &nPol,
92 Vector<Bool> &haveXPol,
93 Bool &haveBase,
94 Bool &haveSpectra) = 0;
95
96 // Get parameters describing the data.
97 virtual Int getHeader(
98 String &observer,
99 String &project,
100 String &antName,
101 Vector<Double> &antPosition,
102 String &obsType,
103 Float &equinox,
104 String &dopplerFrame,
105 Double &mjd,
106 Double &refFreq,
107 Double &bandwidth) = 0;
108
109 // Get frequency parameters for each IF.
110 virtual Int getFreqInfo(
111 Vector<Double> &startFreq,
112 Vector<Double> &endFreq) = 0;
113
114 // Set data selection criteria. Channel numbering is 1-relative, zero or
115 // negative channel numbers are taken to be offsets from the last channel.
116 virtual uInt select(
117 const Vector<Bool> beamSel,
118 const Vector<Bool> IFsel,
119 const Vector<Int> startChan,
120 const Vector<Int> endChan,
121 const Vector<Int> refChan,
122 const Bool getSpectra = True,
123 const Bool getXPol = False,
124 const Bool getFeedPos = False) = 0;
125
126 // Find the range of the data selected in time and position.
127 virtual Int findRange(
128 Int &nRow,
129 Int &nSel,
130 Vector<Double> &timeSpan,
131 Matrix<Double> &positions) = 0;
132
133 // Read the next data record.
134 virtual Int read(
135 Int &scanNo,
136 Int &cycleNo,
137 Double &mjd,
138 Double &interval,
139 String &fieldName,
140 String &srcName,
141 Vector<Double> &srcDir,
142 Vector<Double> &srcPM,
143 Double &srcVel,
144 String &obsType,
145 Int &IFno,
146 Double &refFreq,
147 Double &bandwidth,
148 Double &freqInc,
149 Double &restFreq,
150 Vector<Float> &tcal,
151 String &tcalTime,
152 Float &azimuth,
153 Float &elevation,
154 Float &parAngle,
155 Float &focusAxi,
156 Float &focusTan,
157 Float &focusRot,
158 Float &temperature,
159 Float &pressure,
160 Float &humidity,
161 Float &windSpeed,
162 Float &windAz,
163 Int &refBeam,
164 Int &beamNo,
165 Vector<Double> &direction,
166 Vector<Double> &scanRate,
167 Vector<Float> &tsys,
168 Vector<Float> &sigma,
169 Vector<Float> &calFctr,
170 Matrix<Float> &baseLin,
171 Matrix<Float> &baseSub,
172 Matrix<Float> &spectra,
173 Matrix<uChar> &flagged,
174 Complex &xCalFctr,
175 Vector<Complex> &xPol) = 0;
176
177 // Read the next data record, just the basics.
178 virtual Int read(
179 Int &IFno,
180 Vector<Float> &tsys,
181 Vector<Float> &calFctr,
182 Matrix<Float> &baseLin,
183 Matrix<Float> &baseSub,
184 Matrix<Float> &spectra,
185 Matrix<uChar> &flagged) = 0;
186
187 // Close the input file.
188 virtual void close() = 0;
189
190 protected:
191 Bool cGetFeedPos, cGetSpectra, cGetXPol;
192
193 Vector<uInt> cNChan, cNPol;
194 Vector<Bool> cHaveXPol;
195};
196
197#endif
Note: See TracBrowser for help on using the repository browser.