Поиск точки на графике STFT - PullRequest
1 голос
/ 05 августа 2020

У меня есть краткосрочный график Фурье формы волны напряжения / времени, к которому я применил полосовой фильтр с полосой пропускания 2,5-3 кГц - частоты, которые вызывают этот удар: curve

This is the stft plot which I plotted using matplotlib's pcolorme sh () функция. Здесь штриховка выбрана как 'gouraud': gouraud_stft

Is there any way to find the point which forms a line at a little before 0.0018 sec?

Looking at the stft plot when shading is selected as 'flat', this is the result: flat_stft

Looking at this, I think the line in gouraud shading is the left border of the green block. But I have to do this for multiple waveforms - finding when the curve starts to form. Is there any way to do this from the stft plot? That way, I can have the relevant frequencies as well.

Here is how I plot the stft: (sampleFreq, segmentTimes, and stftX are returned by scipy.signal.stft () )

# function to plot stft
def plotSTFT(sampleFreq, segmentTimes, stftX):
    plt.pcolormesh(segmentTimes, sampleFreq, np.abs(stftX), shading='gouraud')
    plt.ylabel("Frequency (Hz)")
    plt.xlabel("Time (s)")
    plt.title("Sort Term FFT")
    plt.show()

А вот так выглядит np.abs (stftX) например:

[[3.70210968e-03 7.15446518e-04 7.19726916e-03 ... 3.86722138e-03
  1.17172997e-04 1.27395888e-09]
 [3.15837680e-03 2.16981103e-03 4.32806937e-03 ... 2.52695497e-03
  1.09094551e-04 1.27369563e-09]
 [2.00026090e-03 4.65750719e-04 6.91940091e-04 ... 6.14402287e-04
  7.70236881e-05 1.27290625e-09]
 ...
 [3.88944093e-05 1.29308926e-10 4.25956899e-11 ... 7.13448070e-11
  1.41328412e-07 4.26490154e-10]
 [3.88856011e-05 6.46192014e-11 4.08120336e-11 ... 3.62114678e-11
  1.41283187e-07 4.26353366e-10]
 [3.88826928e-05 7.96805222e-13 4.02009003e-11 ... 7.32729719e-12
  1.41291340e-07 4.26307683e-10]]
...