Data Analysis, Chemometrics, Spectroscopy, Raman Spectroscopy, Cosmic Rays.
binarization threshold. spikes = abs(np.array(modified_z_score(np.diff(y)))) > threshold y_out = y.copy() # So we don’t overwrite y for i in np.arange(len(spikes)): if spikes[i] != 0: # If we have an spike in position i w = np.arange(i-m,i+1+m) # we select 2 m + 1 points around our spike w2 =