source: trunk/external/atnf/PKSIO/MBFITSreader.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: 4.1 KB
Line 
1//#---------------------------------------------------------------------------
2//# MBFITSreader.h: ATNF single-dish RPFITS reader.
3//#---------------------------------------------------------------------------
4//# Copyright (C) 2000-2007
5//# Mark Calabretta, ATNF
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 this software should be addressed as follows:
22//# Internet email: mcalabre@atnf.csiro.au.
23//# Postal address: Dr. Mark Calabretta,
24//# Australia Telescope National Facility,
25//# P.O. Box 76,
26//# Epping, NSW, 2121,
27//# AUSTRALIA
28//#
29//# $Id: MBFITSreader.h,v 19.12 2007/01/30 23:40:30 cal103 Exp $
30//#---------------------------------------------------------------------------
31//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
32//# Multibeam MBFITS files).
33//#
34//# Original: 2000/07/28 Mark Calabretta
35//#---------------------------------------------------------------------------
36
37#ifndef ATNF_MBFITSREADER_H
38#define ATNF_MBFITSREADER_H
39
40#include <atnf/PKSIO/FITSreader.h>
41#include <atnf/PKSIO/PKSMBrecord.h>
42
43// <summary>
44// ATNF single-dish RPFITS reader.
45// </summary>
46
47class MBFITSreader : public FITSreader
48{
49 public:
50 // Default constructor; position interpolation codes are:
51 // 0: no interpolation,
52 // 1: correct interpolation,
53 // 2: pksmbfits interpolation.
54 MBFITSreader(const int retry = 0, const int interpolate = 1);
55
56 // Destructor.
57 virtual ~MBFITSreader();
58
59 // Open the RPFITS file for reading.
60 virtual int open(
61 char *rpname,
62 int &nBeam,
63 int* &beams,
64 int &nIF,
65 int* &IFs,
66 int* &nChan,
67 int* &nPol,
68 int* &haveXPol,
69 int &haveBase,
70 int &haveSpectra,
71 int &extraSysCal);
72
73 // Get parameters describing the data.
74 virtual int getHeader(
75 char observer[32],
76 char project[32],
77 char telescope[32],
78 double antPos[3],
79 char obsType[32],
80 float &equinox,
81 char radecsys[32],
82 char dopplerFrame[32],
83 char datobs[32],
84 double &utc,
85 double &refFreq,
86 double &bandwidth);
87
88 // Get frequency parameters for each IF.
89 virtual int getFreqInfo(
90 int &nIF,
91 double* &startFreq,
92 double* &endFreq);
93
94 // Find the range of the data selected in time and position.
95 virtual int findRange(
96 int &nRow,
97 int &nSel,
98 char dateSpan[2][32],
99 double utcSpan[2],
100 double* &positions);
101
102 // Read the next data record.
103 virtual int read(PKSMBrecord &record);
104
105 // Close the RPFITS file.
106 virtual void close(void);
107
108 private:
109 // RPFITSIN subroutine arguments.
110 int cBaseline, cFlag, cBin, cIFno, cSrcNo;
111 float cUTC, cU, cV, cW, *cVis, *cWgt;
112
113 char cDateObs[10];
114 int *cBeamSel, *cChanOff, cFirst, *cIFSel, cInterp, cIntTime, cMBopen,
115 cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cTid, *cXpolOff;
116
117 // The data has to be bufferred to allow positions to be interpolated.
118 int cEOF, cEOS, cFlushBin, cFlushIF, cFlushing;
119 double *cPosUTC;
120 PKSMBrecord *cBuffer;
121
122 int cCycleNo, cScanNo;
123 double cPrevUTC;
124
125 // Read the next data record from the RPFITS file.
126 int rpget(int syscalonly, int &EOS);
127};
128
129#endif
Note: See TracBrowser for help on using the repository browser.