Changeset 1372 for trunk/external/atnf


Ignore:
Timestamp:
07/09/07 11:34:03 (17 years ago)
Author:
mar637
Message:

latest update from livedata CVS. This has the Hobart position fix

Location:
trunk/external/atnf/PKSIO
Files:
2 edited

Legend:

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

    r1325 r1372  
    2727//#                        AUSTRALIA
    2828//#
    29 //# $Id: MBFITSreader.cc,v 19.32 2007/01/30 23:40:30 cal103 Exp $
     29//# $Id: MBFITSreader.cc,v 19.34 2007/07/02 06:12:18 cal103 Exp $
    3030//#---------------------------------------------------------------------------
    3131//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
     
    132132
    133133  if (jstat) {
    134     fprintf(stderr, "Failed to open MBFITS file: %s\n", rpname);
     134    fprintf(stderr, "ERROR, failed to open MBFITS file: %s\n", rpname);
    135135    return 1;
    136136  }
     
    152152
    153153  if (jstat) {
    154     fprintf(stderr, "Failed to read MBFITS header: %s\n", rpname);
     154    fprintf(stderr, "ERROR, failed to read MBFITS header: %s\n", rpname);
    155155    close();
    156156    return 1;
     
    160160  cMopra = strncmp(names_.instrument, "ATMOPRA", 7) == 0;
    161161
    162   // Tidbinbilla data has some more.
    163   cTid = strncmp(names_.sta, "tid", 3) == 0;
    164   if (cTid) {
    165     // Telescope position is stored in the source table.
     162  // Non-ATNF data may not store the position in (u,v,w).
     163  if (strncmp(names_.sta, "tid", 3) == 0) {
     164    fprintf(stderr, "WARNING, found Tidbinbilla data");
     165    cSUpos = 1;
     166  } else if (strncmp(names_.sta, "HOB", 3) == 0) {
     167    fprintf(stderr, "WARNING, found Hobart data");
     168    cSUpos = 1;
     169  } else if (strncmp(names_.sta, "CED", 3) == 0) {
     170    fprintf(stderr, "WARNING, found Ceduna data");
     171    cSUpos = 1;
     172  } else {
     173    cSUpos = 0;
     174  }
     175
     176  if (cSUpos) {
     177    fprintf(stderr, ", using telescope position from SU table.\n");
    166178    cInterp = 0;
    167179  }
     
    177189
    178190  if (cNBeam <= 0) {
    179     fprintf(stderr, "Couldn't determine number of beams.\n");
     191    fprintf(stderr, "ERROR, couldn't determine number of beams.\n");
    180192    close();
    181193    return 1;
     
    279291  // Read the first syscal record.
    280292  if (rpget(1, cEOS)) {
    281     fprintf(stderr, "Error: Failed to read first syscal record.\n");
     293    fprintf(stderr, "ERROR, failed to read first syscal record.\n");
    282294    close();
    283295    return 1;
     
    314326{
    315327  if (!cMBopen) {
    316     fprintf(stderr, "An MBFITS file has not been opened.\n");
     328    fprintf(stderr, "ERROR, an MBFITS file has not been opened.\n");
    317329    return 1;
    318330  }
     
    436448
    437449  if (!cMBopen) {
    438     fprintf(stderr, "An MBFITS file has not been opened.\n");
     450    fprintf(stderr, "ERROR, an MBFITS file has not been opened.\n");
    439451    return 1;
    440452  }
     
    564576
    565577          if (cNBin > 1 && cNBeamSel > 1) {
    566             fprintf(stderr, "Cannot handle binning mode for multiple "
     578            fprintf(stderr, "ERROR, cannot handle binning mode for multiple "
    567579                            "beams.\n");
    568580            close();
     
    891903      }
    892904
     905      // Sanity check on incomplete integrations within a scan.
     906      if (iMBuff->nIF && (iMBuff->cycleNo != cCycleNo)) {
     907        // Force the incomplete integration to be flushed before proceeding.
     908        cFlushing = 1;
     909        continue;
     910      }
     911
    893912      iMBuff->scanNo  = cScanNo;
    894913      iMBuff->cycleNo = cCycleNo;
     
    929948
    930949      // Beam position at the specified time.
    931       if (cTid) {
    932         // Tidbinbilla data.
     950      if (cSUpos) {
     951        // Non-ATNF data that does not store the position in (u,v,w).
    933952        iMBuff->ra  = doubles_.su_ra[cSrcNo-1];
    934953        iMBuff->dec = doubles_.su_dec[cSrcNo-1];
     
    12111230  }
    12121231
    1213   fprintf(stderr, "RPFITS read failed too many times.\n");
     1232  fprintf(stderr, "ERROR, RPFITS read failed too many times.\n");
    12141233  return 2;
    12151234}
  • trunk/external/atnf/PKSIO/MBFITSreader.h

    r1325 r1372  
    2727//#                        AUSTRALIA
    2828//#
    29 //# $Id: MBFITSreader.h,v 19.12 2007/01/30 23:40:30 cal103 Exp $
     29//# $Id: MBFITSreader.h,v 19.13 2007/07/02 06:11:22 cal103 Exp $
    3030//#---------------------------------------------------------------------------
    3131//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
     
    113113    char   cDateObs[10];
    114114    int    *cBeamSel, *cChanOff, cFirst, *cIFSel, cInterp, cIntTime, cMBopen,
    115            cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cTid, *cXpolOff;
     115           cMopra, cNBeamSel, cNBin, cRetry, *cStaleness, cSUpos, *cXpolOff;
    116116
    117117    // The data has to be bufferred to allow positions to be interpolated.
Note: See TracChangeset for help on using the changeset viewer.