//#--------------------------------------------------------------------------- //# PKSMS2reader.h: Class to read Parkes Multibeam data from a v2 MS. //#--------------------------------------------------------------------------- //# Copyright (C) 2000-2006 //# Associated Universities, Inc. Washington DC, USA. //# //# This library is free software; you can redistribute it and/or modify it //# under the terms of the GNU Library General Public License as published by //# the Free Software Foundation; either version 2 of the License, or (at your //# option) any later version. //# //# This library is distributed in the hope that it will be useful, but WITHOUT //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public //# License for more details. //# //# You should have received a copy of the GNU Library General Public License //# along with this library; if not, write to the Free Software Foundation, //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. //# //# Correspondence concerning AIPS++ should be addressed as follows: //# Internet email: aips2-request@nrao.edu. //# Postal address: AIPS++ Project Office //# National Radio Astronomy Observatory //# 520 Edgemont Road //# Charlottesville, VA 22903-2475 USA //# //# $Id: PKSMS2reader.h,v 19.12 2006/07/05 04:55:45 mcalabre Exp $ //#--------------------------------------------------------------------------- //# Original: 2000/08/03, Mark Calabretta, ATNF //#--------------------------------------------------------------------------- #ifndef ATNF_PKSMS2READER_H #define ATNF_PKSMS2READER_H #include #include #include #include #include #include #include #include #include #include // // Class to read Parkes Multibeam data from a v2 MS. // #include class PKSMS2reader : public PKSreader { public: // Default constructor. PKSMS2reader(); // Destructor. virtual ~PKSMS2reader(); // Open the MS for reading. virtual Int open( const String msName, Vector &beams, Vector &IFs, Vector &nChan, Vector &nPol, Vector &haveXPol, Bool &haveBase, Bool &haveSpectra); // Get parameters describing the data. virtual Int getHeader( String &observer, String &project, String &antName, Vector &antPosition, String &obsMode, Float &equinox, String &freqRef, Double &mjd, Double &refFreq, Double &bandwidth); // Get frequency parameters for each IF. virtual Int getFreqInfo( Vector &startFreq, Vector &endFreq); // Set data selection criteria. Channel numbering is 1-relative, zero or // negative channel numbers are taken to be offsets from the last channel. virtual uInt select( const Vector beamSel, const Vector IFsel, const Vector startChan, const Vector endChan, const Vector refChan, const Bool getSpectra = True, const Bool getXPol = False, const Bool getFeedPos = False); // Find the range of the data selected in time and position. virtual Int findRange( Int &nRow, Int &nSel, Vector &timeSpan, Matrix &positions); // Read the next data record. virtual Int read( Int &scanNo, Int &cycleNo, Double &mjd, Double &interval, String &fieldName, String &srcName, Vector &srcDir, Vector &srcPM, Double &srcVel, String &obsMode, Int &IFno, Double &refFreq, Double &bandwidth, Double &freqInc, Double &restFreq, Vector &tcal, String &tcalTime, Float &azimuth, Float &elevation, Float &parAngle, Float &focusAxi, Float &focusTan, Float &focusRot, Float &temperature, Float &pressure, Float &humidity, Float &windSpeed, Float &windAz, Int &refBeam, Int &beamNo, Vector &direction, Vector &scanRate, Vector &tsys, Vector &sigma, Vector &calFctr, Matrix &baseLin, Matrix &baseSub, Matrix &spectra, Matrix &flagged, Complex &xCalFctr, Vector &xPol); // Read the next data record, just the basics. virtual Int read( Int &IFno, Vector &tsys, Vector &calFctr, Matrix &baseLin, Matrix &baseSub, Matrix &spectra, Matrix &flagged); // Close the MS. virtual void close(void); private: Bool cHaveBaseLin, cHaveCalFctr, cHaveSrcVel, cHaveTsys, cHaveXCalFctr, cMSopen; Int cCycleNo, cIdx, cNRow, cScanNo; Double cTime; Vector cEndChan, cRefChan, cStartChan; Vector cBeams, cIFs; Vector cDataSel; MeasurementSet cPKSMS; ROScalarColumn cScanNoCol; ROScalarColumn cTimeCol; ROScalarColumn cIntervalCol; ROScalarColumn cFieldIdCol; ROScalarColumn cFieldNameCol; ROScalarColumn cSrcIdCol; ROScalarColumn cSrcNameCol; ROArrayColumn cSrcDirCol; ROArrayColumn cSrcPMCol; ROArrayColumn cSrcVelCol; ROScalarColumn cStateIdCol; ROScalarColumn cObsModeCol; ROArrayColumn cSrcRestFrqCol; ROScalarColumn cDataDescIdCol; ROArrayColumn cChanFreqCol; ROScalarColumn cWeatherTimeCol; ROScalarColumn cTemperatureCol; ROScalarColumn cPressureCol; ROScalarColumn cHumidityCol; ROScalarColumn cBeamNoCol; ROArrayColumn cPointingCol; ROArrayColumn cTsysCol; ROArrayColumn cSigmaCol; ROArrayColumn cCalFctrCol; ROArrayColumn cBaseLinCol; ROArrayColumn cBaseSubCol; ROArrayColumn cFloatDataCol; ROArrayColumn cFlagCol; ROScalarColumn cXCalFctrCol; ROArrayColumn cDataCol; ROScalarColumn cNumReceptorCol; }; #endif