Ignore:
Timestamp:
04/13/10 14:29:38 (14 years ago)
Author:
Malte Marquarding
Message:

Update from livedata CVS repository

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/atnf/PKSIO/MBFITSreader.cc

    r1635 r1720  
    22//# MBFITSreader.cc: ATNF single-dish RPFITS reader.
    33//#---------------------------------------------------------------------------
    4 //# Copyright (C) 2000-2008
    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: MBFITSreader.cc,v 19.55 2009-01-20 06:45:33 cal103 Exp $
     30//# http://www.atnf.csiro.au/computing/software/livedata.html
     31//# $Id: MBFITSreader.cc,v 19.57 2009-10-30 06:34:36 cal103 Exp $
    3032//#---------------------------------------------------------------------------
    3133//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
     
    696698        if (cIFno > cNIF) continue;
    697699
    698         // Apply IF selection.
     700        // Apply IF selection; iIFSel == 0 for the first selected IF, == 1
     701        // for the second, etc.
    699702        iIFSel = cIFSel[cIFno - 1];
    700703        if (iIFSel < 0) continue;
     
    721724          // an offset to be applied when comparing integration timestamps.
    722725          cod = 86400.0;
    723 
    724         } else if (cUTC < cPrevUTC - 1.0) {
    725           sprintf(cMsg,
    726             "WARNING: Cycle %d:%03d-%03d, UTC went backwards from\n"
    727             "         %.1f to %.1f!  Incrementing day number,\n"
    728             "         positions may be unreliable.", cScanNo, cCycleNo,
    729             cCycleNo+1, cPrevUTC, cUTC);
    730           logMsg(cMsg);
    731           cUTC += 86400.0;
     726        }
     727
     728        if ((cUTC+cod) < cPrevUTC - 1.0) {
     729          if (cBin == 1 && iIFSel) {
     730            // Multiple-IF, binning-mode data is only partially time ordered.
     731#ifdef PKSIO_DEBUG
     732            fprintf(stderr, "New IF in multiple-IF, binning-mode data.\n");
     733#endif
     734            cCycleNo -= cNBin;
     735            cPrevUTC = -1.0;
     736
     737          } else {
     738            // All other data should be fully time ordered.
     739            sprintf(cMsg,
     740              "WARNING: Cycle %d:%03d-%03d, UTC went backwards from\n"
     741              "         %.1f to %.1f!  Incrementing day number,\n"
     742              "         positions may be unreliable.", cScanNo, cCycleNo,
     743              cCycleNo+1, cPrevUTC, cUTC);
     744            logMsg(cMsg);
     745            cUTC += 86400.0;
     746          }
    732747        }
    733748
     
    801816          break;
    802817        }
     818
     819        // Start with the first IF in the next bin.
     820        cFlushIF = 0;
    803821      }
    804822
Note: See TracChangeset for help on using the changeset viewer.