Ignore:
Timestamp:
11/19/08 20:41:16 (16 years ago)
Author:
Malte Marquarding
Message:

update from livedata CVS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/atnf/PKSIO/PKSreader.h

    r1427 r1452  
    2626//#                        Charlottesville, VA 22903-2475 USA
    2727//#
    28 //# $Id: PKSreader.h,v 19.13 2008-06-26 01:50:24 cal103 Exp $
     28//# $Id: PKSreader.h,v 19.22 2008-11-17 06:44:34 cal103 Exp $
    2929//#---------------------------------------------------------------------------
    3030//# Original: 2000/08/02, Mark Calabretta, ATNF
     
    3434#define ATNF_PKSREADER_H
    3535
     36#include <atnf/PKSIO/PKSmsg.h>
     37#include <atnf/PKSIO/PKSrecord.h>
     38
    3639#include <casa/aips.h>
    3740#include <casa/Arrays/Matrix.h>
    3841#include <casa/Arrays/Vector.h>
    39 #include <casa/BasicSL/Complex.h>
    4042#include <casa/BasicSL/String.h>
    4143
     
    4547// Class to read Parkes multibeam data.
    4648// </summary>
     49
     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);
    4765
    4866// Open an appropriate PKSreader for a Parkes Multibeam dataset.
     
    7694        Bool   &haveSpectra);
    7795
    78 class MBrecord;
    79 
    80 class PKSreader
     96class PKSreader : public PKSmsg
    8197{
    8298  public:
     
    116132    // Set data selection criteria.  Channel numbering is 1-relative, zero or
    117133    // negative channel numbers are taken to be offsets from the last channel.
     134    // Coordinate system selection (only supported for SDFITS input):
     135    //   0: equatorial (RA,Dec),
     136    //   1: vertical (Az,El),
     137    //   2: feed-plane.
    118138    virtual uInt select(
    119139        const Vector<Bool> beamSel,
     
    124144        const Bool getSpectra = True,
    125145        const Bool getXPol    = False,
    126         const Bool getFeedPos = False) = 0;
     146        const Int  coordSys   = 0) = 0;
    127147
    128148    // Find the range of the data selected in time and position.
     
    133153        Matrix<Double> &positions) = 0;
    134154
    135     // Read the next data record (MBrecord is defined below).
    136     virtual Int read(MBrecord &mbrec) = 0;
    137 
    138     // Read the next data record (for backwards compatibility, do not use).
    139     virtual Int read(
    140         Int             &scanNo,
    141         Int             &cycleNo,
    142         Double          &mjd,
    143         Double          &interval,
    144         String          &fieldName,
    145         String          &srcName,
    146         Vector<Double>  &srcDir,
    147         Vector<Double>  &srcPM,
    148         Double          &srcVel,
    149         String          &obsType,
    150         Int             &IFno,
    151         Double          &refFreq,
    152         Double          &bandwidth,
    153         Double          &freqInc,
    154         Double          &restFreq,
    155         Vector<Float>   &tcal,
    156         String          &tcalTime,
    157         Float           &azimuth,
    158         Float           &elevation,
    159         Float           &parAngle,
    160         Float           &focusAxi,
    161         Float           &focusTan,
    162         Float           &focusRot,
    163         Float           &temperature,
    164         Float           &pressure,
    165         Float           &humidity,
    166         Float           &windSpeed,
    167         Float           &windAz,
    168         Int             &refBeam,
    169         Int             &beamNo,
    170         Vector<Double>  &direction,
    171         Vector<Double>  &scanRate,
    172         Vector<Float>   &tsys,
    173         Vector<Float>   &sigma,
    174         Vector<Float>   &calFctr,
    175         Matrix<Float>   &baseLin,
    176         Matrix<Float>   &baseSub,
    177         Matrix<Float>   &spectra,
    178         Matrix<uChar>   &flagged,
    179         Complex         &xCalFctr,
    180         Vector<Complex> &xPol);
    181 
    182     // Read the next data record, just the basics.
    183     virtual Int read(
    184         Int           &IFno,
    185         Vector<Float> &tsys,
    186         Vector<Float> &calFctr,
    187         Matrix<Float> &baseLin,
    188         Matrix<Float> &baseSub,
    189         Matrix<Float> &spectra,
    190         Matrix<uChar> &flagged) = 0;
     155    // Read the next data record.
     156    virtual Int read(PKSrecord &pksrec) = 0;
    191157
    192158    // Close the input file.
     
    194160
    195161  protected:
    196     Bool   cGetFeedPos, cGetSpectra, cGetXPol;
     162    Bool  cGetSpectra, cGetXPol;
     163    Int   cCoordSys;
    197164
    198165    Vector<uInt> cNChan, cNPol;
     
    200167};
    201168
    202 
    203 // Essentially just a struct used as a function argument.
    204 class MBrecord
    205 {
    206   public:
    207     Int             scanNo;
    208     Int             cycleNo;
    209     Double          mjd;
    210     Double          interval;
    211     String          fieldName;
    212     String          srcName;
    213     Vector<Double>  srcDir;
    214     Vector<Double>  srcPM;
    215     Double          srcVel;
    216     String          obsType;
    217     Int             IFno;
    218     Double          refFreq;
    219     Double          bandwidth;
    220     Double          freqInc;
    221     Double          restFreq;
    222     Vector<Float>   tcal;
    223     String          tcalTime;
    224     Float           azimuth;
    225     Float           elevation;
    226     Float           parAngle;
    227     Float           focusAxi;
    228     Float           focusTan;
    229     Float           focusRot;
    230     Float           temperature;
    231     Float           pressure;
    232     Float           humidity;
    233     Float           windSpeed;
    234     Float           windAz;
    235     Int             refBeam;
    236     Int             beamNo;
    237     Vector<Double>  direction;
    238     Vector<Double>  scanRate;
    239     Int             rateAge;
    240     Int             rateson;
    241     Vector<Float>   tsys;
    242     Vector<Float>   sigma;
    243     Vector<Float>   calFctr;
    244     Matrix<Float>   baseLin;
    245     Matrix<Float>   baseSub;
    246     Matrix<Float>   spectra;
    247     Matrix<uChar>   flagged;
    248     Complex         xCalFctr;
    249     Vector<Complex> xPol;
    250 };
    251 
    252169#endif
Note: See TracChangeset for help on using the changeset viewer.