ctdproc.helpers.glitchcorrect
- ctdproc.helpers.glitchcorrect(x, diffx, prodx, ibefore=0, iafter=0)[source]
Remove glitches/spikes in array.
Adapted from tms_tc_glitchcorrect.m
- Parameters:
x (np.array) – Input array
diffx (int) – Threshold for differences
prodx (int) – Threshold for products
ibefore (int, optional) – Number of elements to interpolate on left side of glitch
after (int, optional) – Number of elements to interpolate on right side of glitch
- Returns:
y – Interpolated array
- Return type:
np.array