Ignore:
Timestamp:
06/09/10 19:03:06 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: Yes

JIRA Issue: Yes (CAS-2211)

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: ASAP 3.0.0 interface changes

Test Programs:

Put in Release Notes: Yes

Module(s): all the CASA sd tools and tasks are affected.

Description: Merged ATNF-ASAP 3.0.0 developments to CASA (alma) branch.

Note you also need to update casa/code/atnf.


Location:
branches/alma
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/alma

  • branches/alma/external/atnf/PKSIO/MBFITSreader.h

    r1453 r1757  
    22//# MBFITSreader.h: ATNF single-dish RPFITS reader.
    33//#---------------------------------------------------------------------------
    4 //# Copyright (C) 2000-2006
    5 //# Mark Calabretta, ATNF
     4//# livedata - processing pipeline for single-dish, multibeam spectral data.
     5//# Copyright (C) 2000-2009, Australia Telescope National Facility, CSIRO
    66//#
    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.
     7//# This file is part of livedata.
    118//#
    12 //# This library is distributed in the hope that it will be useful, but WITHOUT
     9//# livedata is free software: you can redistribute it and/or modify it under
     10//# the terms of the GNU General Public License as published by the Free
     11//# Software Foundation, either version 3 of the License, or (at your option)
     12//# any later version.
     13//#
     14//# livedata is distributed in the hope that it will be useful, but WITHOUT
    1315//# 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//# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
     17//# more details.
    1618//#
    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.
     19//# You should have received a copy of the GNU General Public License along
     20//# with livedata.  If not, see <http://www.gnu.org/licenses/>.
    2021//#
    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,
     22//# Correspondence concerning livedata may be directed to:
     23//#        Internet email: mcalabre@atnf.csiro.au
     24//#        Postal address: Dr. Mark Calabretta
     25//#                        Australia Telescope National Facility, CSIRO
     26//#                        PO Box 76
     27//#                        Epping NSW 1710
    2728//#                        AUSTRALIA
    2829//#
    29 //# $Id$
     30//# http://www.atnf.csiro.au/computing/software/livedata.html
     31//# $Id: MBFITSreader.h,v 19.23 2009-09-29 07:33:38 cal103 Exp $
    3032//#---------------------------------------------------------------------------
    3133//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
     
    3941
    4042#include <atnf/PKSIO/FITSreader.h>
    41 #include <atnf/PKSIO/PKSMBrecord.h>
     43#include <atnf/PKSIO/MBrecord.h>
     44
     45using namespace std;
    4246
    4347// <summary>
     
    7882        double antPos[3],
    7983        char   obsType[32],
     84        char   bunit[32],
    8085        float  &equinox,
    8186        char   radecsys[32],
     
    101106
    102107    // Read the next data record.
    103     virtual int read(PKSMBrecord &record);
     108    virtual int read(MBrecord &record);
    104109
    105110    // Close the RPFITS file.
     
    107112
    108113  private:
    109     char   cDateObs[10];
     114    // RPFITSIN subroutine arguments.
     115    int   cBaseline, cFlag, cBin, cIFno, cSrcNo;
     116    float cUTC, cU, cV, cW, *cVis, *cWgt;
     117
     118    char   cDateObs[12];
    110119    int    *cBeamSel, *cChanOff, cFirst, *cIFSel, cInterp, cIntTime, cMBopen,
    111            cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cTid, *cXpolOff;
    112     float  *cVis;
     120           cMopra, cNBeamSel, cNBin, cRetry, cSimulIF, cSUpos, *cXpolOff;
    113121
    114122    // The data has to be bufferred to allow positions to be interpolated.
    115123    int    cEOF, cEOS, cFlushBin, cFlushIF, cFlushing;
    116124    double *cPosUTC;
    117     PKSMBrecord *cBuffer;
     125    MBrecord *cBuffer;
    118126
     127    // Scan and cycle number bookkeeping.
    119128    int    cCycleNo, cScanNo;
    120     double cUTC;
     129    double cPrevUTC;
    121130
    122131    // Read the next data record from the RPFITS file.
    123132    int rpget(int syscalonly, int &EOS);
    124     // These are no longer define in the RPFITS.h file so moved here
    125     int jstat;
    126     float *weight;
    127     int baseline;
    128     int flag;
    129     int bin;
    130     int if_no;
    131     int sourceno;
    132     float *vis;
    133     float u;
    134     float v;
    135     float w;
    136     float ut;
    137            
     133    int rpfitsin(int &jstat);
     134
     135    // Check and, if necessary, repair a position timestamp.
     136    int    cCode5, cNRate;
     137    double cAvRate[2];
     138    int fixw(const char *datobs, int cycleNo, int beamNo, double avRate[2],
     139             double thisRA, double thisDec, double thisUTC,
     140             double nextRA, double nextDec, float &nextUTC);
     141
     142    // Subtract two UTCs (s).
     143    double utcDiff(double utc1, double utc2);
     144
     145    // Compute and apply the scan rate corrected for grid convergence.
     146    double cRA0, cDec0;
     147    void  scanRate(double ra0, double dec0,
     148                   double ra1, double dec1,
     149                   double ra2, double dec2, double dt,
     150                   double &raRate, double &decRate);
     151    void applyRate(double ra0, double dec0,
     152                   double ra1, double dec1,
     153                   double raRate, double decRate, double dt,
     154                   double &ra2, double &dec2);
     155    void eulerx(double lng0, double lat0, double phi0, double theta,
     156                double phi, double &lng1, double &lat1);
    138157};
    139158
Note: See TracChangeset for help on using the changeset viewer.