Changeset 16502 for trunk


Ignore:
Timestamp:
05/30/13 15:59:22 (11 years ago)
Author:
lyard
Message:
fixed bug with negative start cell
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/fitsCompressor.cc

    r16485 r16502  
    736736    header.push_back(HeaderEntry("CHECKSUM", "'0000000000000000'  ", "Checksum for the whole HDU"));
    737737    header.push_back(HeaderEntry("DATASUM" ,  "         0"         , "Checksum for the data block"));
    738     header.push_back(HeaderEntry("EXTNAME" , "'ZDrsCellOffsets'   ", "name of this binary table extension"));
     738    header.push_back(HeaderEntry("EXTNAME" , "'ZDrsCellOffsets'    ", "name of this binary table extension"));
    739739    header.push_back(HeaderEntry("TTYPE1"  , "'OffsetCalibration' ", "label for field   1"));
    740740    header.push_back(HeaderEntry("TFORM1"  , "'1474560I'          ", "data format of field: 2-byte INTEGER"));
     
    17381738            {
    17391739                const int thisStartCell = reinterpret_cast<int16_t*>(&buffer[startCellOffset])[j];
    1740                 if (thisStartCell > -1)
     1740                if (thisStartCell < 0) continue;
    17411741                for (int k=0;k<numSlices;k++)
    17421742                    reinterpret_cast<int16_t*>(&buffer[dataOffset])[numSlices*j + k] -= drsCalib16[1024*j + (thisStartCell+k)%1024];
     
    18581858    if (tableName == "")
    18591859    {
    1860         cout << "Error: table name could not be found. Aborting" << endl;
     1860        cout << "Error: table name from file " << fileNameOut << " could not be found. Aborting" << endl;
    18611861        return -1;
    18621862    }
  • trunk/Mars/mcore/factfits.h

    r16485 r16502  
    6060         for (uint32_t i=0; i<1440*1024; i+=1024, startCell++)
    6161         {
    62              if ((*startCell) > -1)
    6362             for (uint32_t j=0; j<fNumRoi; j++, data++)
     63             {
     64                 if ((*startCell) < 0) continue;
    6465                 *data += fOffsetCalibration[i + (*startCell+j)%1024];
     66             }
    6567         }
    6668    }
Note: See TracChangeset for help on using the changeset viewer.