Changeset 17226 for trunk/Mars/mcore
- Timestamp:
- 10/16/13 19:22:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/mcore/factofits.h
r17221 r17226 49 49 50 50 //assign a given drs offset calibration 51 void SetDrsCalibration(const float*calib)51 void SetDrsCalibration(const vector<float> &calib) 52 52 { 53 53 if (!IsOffsetCalibration()) 54 54 fOffsetCalibration.resize(1440*1024); 55 55 56 for (uint32_t i=0; i<1440*1024;i++)57 fOffsetCalibration[i] = (int16_t)(calib[i]*4096 .f/2000.f);56 for (uint32_t i=0; i<1440*1024; i++) 57 fOffsetCalibration[i] = (int16_t)(calib[i]*4096/2000); 58 58 } 59 59 … … 74 74 fOffsetCalibration.resize(1440*1024); 75 75 76 for (uint32_t i=0; i<1440*1024;i++)76 for (uint32_t i=0; i<1440*1024; i++) 77 77 fOffsetCalibration[i] = vec[i]; 78 } 79 80 void SetDrsCalibration(const DrsCalibration& drs) 81 { 82 if (drs.fNumOffset==0) 83 return; 84 85 if (!IsOffsetCalibration()) 86 fOffsetCalibration.resize(1440*1024); 87 88 for (uint32_t i=0; i<1024*1440; i++) 89 fOffsetCalibration[i] = drs.fOffset[i]/drs.fNumOffset; 78 90 } 79 91
Note:
See TracChangeset
for help on using the changeset viewer.