Data Analysis, Chemometrics, Spectroscopy, Raman Spectroscopy, Cosmic Rays.
First we calculated ∇x(i): dist = 0 delta_intensity = [] for i in np.arange(len(intensity)-1): dist = intensity[i+1] — intensity[i] delta_intensity.append(dist) delta_int = np.array(delta_intensity) # Alternatively to the for loop one can use: # delta_int = np.diff(intensity)