I have a noisy sinewave in varying frequencies. I save all the samples (in mV) of this sinewave in variable data_mV I can find the peaks of my sinewave with the following function using find_peaks from the scipy python library def find_peaks_in_signal(data_mV,sampling_rate,signal_frequency,plot): if(debug_prints): print("Sampling rate = ",sampling_rate) print("Expected signal frequency = ",signal_frequency) distance = (sampling_rate / signal_frequency) - 100 print("Distance = ",distance) peaks, _ = find_peaks(data_mV, distance=distance) if plot: plt.plot(data_mV) plt.plot(peaks, data_mV[peaks], "x") plt.plot(np.zeros_like(data_mV), "--", color="gray") plt.show() return peaks The result is: As you can see I am able to detect the peaks quite nicely. My absolute goal is to be able to calculate Average Peak to Peak voltage of the sinewave. Perhaps someone could point me in the right direction on what is the most reliable way to do that? Can this be done using scipy functions or scipy does not have this kind of thing implemented? Continue reading...