FACT++  1.0
static void DrsCalibrate::RemoveSpikes ( float *  p,
uint32_t  roi 
)
inlinestatic

Definition at line 567 of file DrsCalib.h.

References i.

Referenced by RawDataViewer::ApplyCalibration().

568  {
569  if (roi<4)
570  return;
571 
572  for (size_t i=1; i<roi-2; i++)
573  {
574  if (p[i]-p[i-1]>25 && p[i]-p[i+1]>25)
575  {
576  p[i] = (p[i-1]+p[i+1])/2;
577  }
578 
579  if (p[i]-p[i-1]>22 && fabs(p[i]-p[i+1])<4 && p[i+1]-p[i+2]>22)
580  {
581  p[i] = (p[i-1]+p[i+2])/2;
582  p[i+1] = p[i];
583  }
584  }
585  }
int i
Definition: db_dim_client.c:21

+ Here is the caller graph for this function: