source: trunk/external/atnf/PKSIO/MBFITSreader.h@ 1426

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

Mark C added brightness unit to getHeader()

File size: 4.1 KB
RevLine 
[1325]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//#
[1399]29//# $Id: MBFITSreader.h,v 19.14 2007/11/12 03:37:56 cal103 Exp $
[1325]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],
[1399]80 char bunit[32],
[1325]81 float &equinox,
82 char radecsys[32],
83 char dopplerFrame[32],
84 char datobs[32],
85 double &utc,
86 double &refFreq,
87 double &bandwidth);
88
89 // Get frequency parameters for each IF.
90 virtual int getFreqInfo(
91 int &nIF,
92 double* &startFreq,
93 double* &endFreq);
94
95 // Find the range of the data selected in time and position.
96 virtual int findRange(
97 int &nRow,
98 int &nSel,
99 char dateSpan[2][32],
100 double utcSpan[2],
101 double* &positions);
102
103 // Read the next data record.
104 virtual int read(PKSMBrecord &record);
105
106 // Close the RPFITS file.
107 virtual void close(void);
108
109 private:
110 // RPFITSIN subroutine arguments.
111 int cBaseline, cFlag, cBin, cIFno, cSrcNo;
112 float cUTC, cU, cV, cW, *cVis, *cWgt;
113
114 char cDateObs[10];
115 int *cBeamSel, *cChanOff, cFirst, *cIFSel, cInterp, cIntTime, cMBopen,
[1372]116 cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cSUpos, *cXpolOff;
[1325]117
118 // The data has to be bufferred to allow positions to be interpolated.
119 int cEOF, cEOS, cFlushBin, cFlushIF, cFlushing;
120 double *cPosUTC;
121 PKSMBrecord *cBuffer;
122
123 int cCycleNo, cScanNo;
124 double cPrevUTC;
125
126 // Read the next data record from the RPFITS file.
127 int rpget(int syscalonly, int &EOS);
128};
129
130#endif
Note: See TracBrowser for help on using the repository browser.