Ignore:
Timestamp:
11/16/07 13:36:15 (17 years ago)
Author:
Malte Marquarding
Message:

Mark C added brightness unit to getHeader()

File:
1 edited

Legend:

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

    r1372 r1399  
    2727//#                        AUSTRALIA
    2828//#
    29 //# $Id: MBFITSreader.cc,v 19.34 2007/07/02 06:12:18 cal103 Exp $
     29//# $Id: MBFITSreader.cc,v 19.36 2007/11/12 03:37:56 cal103 Exp $
    3030//#---------------------------------------------------------------------------
    3131//# The MBFITSreader class reads single dish RPFITS files (such as Parkes
     
    317317        double antPos[3],
    318318        char   obsType[32],
     319        char   bunit[32],
    319320        float  &equinox,
    320321        char   radecsys[32],
     
    392393  obsType[j] = '\0';
    393394
     395  // Brightness unit.
     396  sprintf(bunit, "%-16.16s", names_.bunit);
     397  if (strcmp(bunit, "JY") == 0) {
     398    bunit[1] = 'y';
     399  } else if (strcmp(bunit, "JY/BEAM") == 0) {
     400    strcpy(bunit, "Jy/beam");
     401  }
     402
    394403  // Coordinate frames.
    395404  equinox = 2000.0f;
     
    613622        }
    614623
     624        // Check for change-of-day.
     625        if (cUTC < cPrevUTC - 85800.0) {
     626          cUTC += 86400.0;
     627        }
     628
     629        if (cNBin > 1) {
     630          // Binning mode: correct the time.
     631          cUTC += param_.intbase * (cBin - (cNBin + 1)/2.0);
     632        }
     633
     634        // New integration cycle?
     635        if (cUTC > cPrevUTC) {
     636          cCycleNo++;
     637          cPrevUTC = cUTC + 0.0001;
     638        }
     639
    615640        // Apply beam selection.
    616641        beamNo = int(cBaseline / 256.0);
     
    626651
    627652        sprintf(cDateObs, "%-10.10s", names_.datobs);
    628 
    629         // Check for change-of-day.
    630         if (cUTC < cPrevUTC - 85800.0) {
    631           cUTC += 86400.0;
    632         }
    633 
    634         if (cNBin > 1) {
    635           // Binning mode: correct the time.
    636           cUTC += param_.intbase * (cBin - (cNBin + 1)/2.0);
    637         }
    638 
    639         // New integration cycle?
    640         if (cUTC > cPrevUTC) {
    641           cCycleNo++;
    642           cPrevUTC = cUTC + 0.0001;
    643         }
    644653
    645654        // Compute buffer number.
     
    895904    if (!cFlushing) {
    896905      // Buffer this MBrec.
    897       if (cCycleNo == 1 && iMBuff->IFno[0]) {
     906      if ((cScanNo > iMBuff->scanNo) && iMBuff->IFno[0]) {
    898907        // Sanity check on the number of IFs in the new scan.
    899908        if (if_.n_if != cNIF) {
Note: See TracChangeset for help on using the changeset viewer.