Changeset 14482 for fact/tools/pyscripts/pyfact
- Timestamp:
- 10/17/12 14:01:07 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fact/tools/pyscripts/pyfact/calfactfits.h
r13566 r14482 239 239 //Note: data_nroi=calib_nroi, calib_blm_size=calib_gm_size 240 240 } 241 242 // stolen from TBs MARS ... DrsCalib.h or something like that 243 double *p = npcaldata; 244 // second loop for despiking 245 for (size_t i=1; i<data_nroi-2; i++) 246 { 247 if (p[i]-p[i-1]>25 && p[i]-p[i+1]>25) 248 { 249 p[i] = (p[i-1]+p[i+1])/2; 250 } 251 if (p[i]-p[i-1]>22 && fabs(p[i]-p[i+1])<4 && p[i+1]-p[i+2]>22) 252 { 253 p[i] = (p[i-1]+p[i+2])/2; 254 p[i+1] = p[i]; 255 } 256 } 257 241 258 } 242 259 }
Note:
See TracChangeset
for help on using the changeset viewer.