Changeset 16939 for trunk


Ignore:
Timestamp:
06/28/13 11:57:18 (11 years ago)
Author:
lyard
Message:
got rid of over 1024 start cell values by adding modulo
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/factfits.h

    r16560 r16939  
    6262         {
    6363             if (*startCell < 0)
     64             {
     65                 data += fNumRoi;
    6466                 continue;
    65 
     67             }
    6668             for (uint32_t j=0; j<fNumRoi; j++, data++)
    6769                 *data += fOffsetCalibration[i + (*startCell+j)%1024];
     
    7981             }
    8082
     83             const int16_t modStart = startCell[ch] % 1024;
    8184             const int16_t *off = fOffsetCalibration.data() + ch*1024;
    8285
    83              const int16_t *cal = off+startCell[ch];
     86             const int16_t *cal = off+modStart;
    8487             const int16_t *end = data+fNumRoi;
    8588
    86              if (startCell[ch]+fNumRoi>1024)
     89             if (modStart+fNumRoi>1024)
    8790             {
    8891                 while (cal<off+1024)
     
    9497                 *data++ += *cal++;
    9598         }
    96     }
     99
     100}
    97101
    98102    bool init()
Note: See TracChangeset for help on using the changeset viewer.