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/SDFITSreader.h

    r1453 r1757  
    22//# SDFITSreader.h: ATNF CFITSIO interface class for SDFITS input.
    33//#---------------------------------------------------------------------------
    4 //# Copyright (C) 2000-2006
    5 //# Associated Universities, Inc. Washington DC, USA.
     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: aips2-request@nrao.edu.
    23 //#        Postal address: AIPS++ Project Office
    24 //#                        National Radio Astronomy Observatory
    25 //#                        520 Edgemont Road
    26 //#                        Charlottesville, VA 22903-2475 USA
     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
     28//#                        AUSTRALIA
    2729//#
    28 //# $Id$
     30//# http://www.atnf.csiro.au/computing/software/livedata.html
     31//# $Id: SDFITSreader.h,v 19.22 2009-09-29 07:33:39 cal103 Exp $
    2932//#---------------------------------------------------------------------------
    3033//# The SDFITSreader class reads single dish FITS files such as those written
     
    3841
    3942#include <atnf/PKSIO/FITSreader.h>
    40 #include <atnf/PKSIO/PKSMBrecord.h>
     43#include <atnf/PKSIO/MBrecord.h>
     44
     45#include <casa/Logging/LogIO.h>
    4146
    4247#include <fitsio.h>
     48
     49using namespace std;
     50using namespace casa;
    4351
    4452// <summary>
     
    7684        double antPos[3],
    7785        char   obsMode[32],
     86        char   bunit[32],
    7887        float  &equinox,
    7988        char   radecsys[32],
     
    99108
    100109    // Read the next data record.
    101     virtual int read(PKSMBrecord &record);
    102 
    103     // Print out CFITSIO error messages.
    104     void reportError(void);
     110    virtual int read(MBrecord &record);
    105111
    106112    // Close the SDFITS file.
     
    108114
    109115  private:
    110     int      cCycleNo, cExtraSysCal, cNAxis, cStatus;
    111     long     cNAxes[5], cNRow, cReqax[4], cRow;
     116    int      cCycleNo, cExtraSysCal, cNAxes, cStatus;
     117    long     cBeamAxis, cDecAxis, cFreqAxis, cNAxis[5], cNAxisTime, cNRow,
     118             cRaAxis, cRow, cStokesAxis, cTimeAxis, cTimeIdx;
    112119    double   cLastUTC;
    113120    fitsfile *cSDptr;
     
    117124    int  cBeam_1rel, cIF_1rel;
    118125
     126    // for GBT
     127    int *cPols ;
     128
    119129    enum {SCAN, CYCLE, DATE_OBS, TIME, EXPOSURE, OBJECT, OBJ_RA, OBJ_DEC,
    120           RESTFRQ, OBSMODE, BEAM, IF, FqRefPix, FqRefVal, FqDelt, RA, DEC,
    121           SCANRATE, TSYS, CALFCTR, XCALFCTR, BASELIN, BASESUB, DATA, FLAGGED,
    122           DATAXED, XPOLDATA, REFBEAM, TCAL, TCALTIME, AZIMUTH, ELEVATIO,
    123           PARANGLE, FOCUSAXI, FOCUSTAN, FOCUSROT, TAMBIENT, PRESSURE,
    124           HUMIDITY, WINDSPEE, WINDDIRE, NDATA};
     130          RESTFRQ, OBSMODE, BEAM, IF, FqRefVal, FqDelt, FqRefPix, RA, DEC,
     131          TimeRefVal, TimeDelt, TimeRefPix, SCANRATE, TSYS, CALFCTR, XCALFCTR,
     132          BASELIN, BASESUB, DATA, FLAGGED, DATAXED, XPOLDATA, REFBEAM, TCAL,
     133          TCALTIME, AZIMUTH, ELEVATIO, PARANGLE, FOCUSAXI, FOCUSTAN, FOCUSROT,
     134          TAMBIENT, PRESSURE, HUMIDITY, WINDSPEE, WINDDIRE, STOKES, SIG, CAL,
     135          VFRAME, RVSYS, VELDEF, NDATA};
     136
     137    // Message handling.
     138    void log(LogOrigin origin, LogIO::Command cmd, const char *msg = 0x0);
    125139
    126140    void findData(int iData, char *name, int type);
     141    void  findCol(char *name, int *colnum);
    127142    int   readDim(int iData, long iRow, int *naxis, long naxes[]);
    128143    int  readParm(char *name, int type, void *value);
    129144    int  readData(char *name, int type, long iRow, void *value);
    130145    int  readData(int iData, long iRow, void *value);
    131     void  findCol(char *name, int *colnum);
     146    int  readCol(int iData, void *value);
     147    int  readTime(long iRow, int iPix, char *datobs, double &utc);
    132148
    133     // These are for ALFA data, "BDFITS" or "CIMAFITS".
     149    // These are for ALFA data: "BDFITS" or "CIMAFITS".  Statics are required
     150    // for CIMAFITS v2.0 because CAL ON/OFF data is split into separate files.
     151    static int  sInit, sReset;
     152    static int  (*sALFAcalNon)[2], (*sALFAcalNoff)[2];
     153    static float (*sALFAcal)[2], (*sALFAcalOn)[2], (*sALFAcalOff)[2];
     154
    134155    int   cALFA, cALFA_BD, cALFA_CIMA, cALFAscan, cScanNo;
    135     float cALFAcal[8][2], cALFAcalOn[8][2], cALFAcalOff[8][2];
    136     int   alfaCal(short iBeam, short iIF);
     156    float cALFAacc;
     157    int   alfaCal(short iBeam, short iIF, short iPol);
     158    float alfaGain(float zd);
    137159
    138160    // These are for GBT data.
    139161    int   cGBT, cFirstScanNo;
     162    double cGLastUTC[4] ;
     163    int cGLastScan[4] ;
     164    int cGCycleNo[4] ;
    140165};
    141166
Note: See TracChangeset for help on using the changeset viewer.