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

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

update from livedata CVS

File size: 5.2 KB
RevLine 
[1325]1//#---------------------------------------------------------------------------
2//# PKSreader.h: Class to read Parkes multibeam data.
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: PKSreader.h,v 19.22 2008-11-17 06:44:34 cal103 Exp $
[1325]29//#---------------------------------------------------------------------------
30//# Original: 2000/08/02, Mark Calabretta, ATNF
31//#---------------------------------------------------------------------------
32
33#ifndef ATNF_PKSREADER_H
34#define ATNF_PKSREADER_H
35
[1452]36#include <atnf/PKSIO/PKSmsg.h>
37#include <atnf/PKSIO/PKSrecord.h>
38
[1325]39#include <casa/aips.h>
40#include <casa/Arrays/Matrix.h>
41#include <casa/Arrays/Vector.h>
42#include <casa/BasicSL/String.h>
43
[1427]44#include <casa/namespace.h>
45
[1325]46// <summary>
47// Class to read Parkes multibeam data.
48// </summary>
49
[1452]50// Return an appropriate PKSreader for a Parkes Multibeam dataset.
51class PKSreader* getPKSreader(
52 const String name,
53 const Int retry,
54 const Int interpolate,
55 String &format);
56
57// As above, but search a list of directories for it.
58class PKSreader* getPKSreader(
59 const String name,
60 const Vector<String> directories,
61 const Int retry,
62 const Int interpolate,
63 Int &iDir,
64 String &format);
65
[1325]66// Open an appropriate PKSreader for a Parkes Multibeam dataset.
67class PKSreader* getPKSreader(
68 const String name,
69 const Int retry,
70 const Int interpolate,
71 String &format,
72 Vector<Bool> &beams,
73 Vector<Bool> &IFs,
74 Vector<uInt> &nChan,
75 Vector<uInt> &nPol,
76 Vector<Bool> &haveXPol,
77 Bool &haveBase,
78 Bool &haveSpectra);
79
80// As above, but search a list of directories for it.
81class PKSreader* getPKSreader(
82 const String name,
83 const Vector<String> directories,
84 const Int retry,
85 const Int interpolate,
86 Int &iDir,
87 String &format,
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);
95
[1452]96class PKSreader : public PKSmsg
[1325]97{
98 public:
99 // Destructor.
100 virtual ~PKSreader() {};
101
102 // Open the dataset.
103 virtual Int open(
104 const String inName,
105 Vector<Bool> &beams,
106 Vector<Bool> &IFs,
107 Vector<uInt> &nChan,
108 Vector<uInt> &nPol,
109 Vector<Bool> &haveXPol,
110 Bool &haveBase,
111 Bool &haveSpectra) = 0;
112
113 // Get parameters describing the data.
114 virtual Int getHeader(
115 String &observer,
116 String &project,
117 String &antName,
118 Vector<Double> &antPosition,
119 String &obsType,
[1399]120 String &bunit,
[1325]121 Float &equinox,
122 String &dopplerFrame,
123 Double &mjd,
124 Double &refFreq,
125 Double &bandwidth) = 0;
126
127 // Get frequency parameters for each IF.
128 virtual Int getFreqInfo(
129 Vector<Double> &startFreq,
130 Vector<Double> &endFreq) = 0;
131
132 // Set data selection criteria. Channel numbering is 1-relative, zero or
133 // negative channel numbers are taken to be offsets from the last channel.
[1452]134 // Coordinate system selection (only supported for SDFITS input):
135 // 0: equatorial (RA,Dec),
136 // 1: vertical (Az,El),
137 // 2: feed-plane.
[1325]138 virtual uInt select(
139 const Vector<Bool> beamSel,
140 const Vector<Bool> IFsel,
141 const Vector<Int> startChan,
142 const Vector<Int> endChan,
143 const Vector<Int> refChan,
144 const Bool getSpectra = True,
145 const Bool getXPol = False,
[1452]146 const Int coordSys = 0) = 0;
[1325]147
148 // Find the range of the data selected in time and position.
149 virtual Int findRange(
150 Int &nRow,
151 Int &nSel,
152 Vector<Double> &timeSpan,
153 Matrix<Double> &positions) = 0;
154
[1452]155 // Read the next data record.
156 virtual Int read(PKSrecord &pksrec) = 0;
[1427]157
[1325]158 // Close the input file.
159 virtual void close() = 0;
160
161 protected:
[1452]162 Bool cGetSpectra, cGetXPol;
163 Int cCoordSys;
[1325]164
165 Vector<uInt> cNChan, cNPol;
166 Vector<Bool> cHaveXPol;
167};
168
169#endif
Note: See TracBrowser for help on using the repository browser.