You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scaling factor differs from case to case (e.g. Zimin et al, 2003 test needs the scale factor of ca. 640).
Do I forget something?!
Another question is concerning the periodicity. Does this library consider the signal as a periodic signal? what about the edges in non-periodic signals? Do we need something like "cone of influence"?!
Thanks in advance for your kind answer.
The text was updated successfully, but these errors were encountered:
Due to the normalized Gaussian weight, Stockwell integral in time (dx) must produce the Fourier spectrum (frequency domain) exactly:
F(f) = integral { S(x,f) . dx }
Therefore the power spectrum of Fourier transform must be the same as power spectrum of Stockwell transform (following your example):
dx = t[1] - t[0]
fk = np.fft.rfft(w) / (len(w))# normalized FFT
pk = np.abs(fk)**2
freq = np.fft.rfftfreq( len(w) , dx )
stock_p = (np.abs( (stock*dx).sum(axis=1)))**2
these two power spectrum are almost the same but meet each other only using a scale factor of 400!
scale = 400 # 400? 1?
fig,ax = plt.subplots(figsize=(8,8))
plt.plot(freq[0:251],stock_p/scale,linewidth=3, label='Stockwell transform')
plt.plot(freq[0:251],pk[0:251],'*',linewidth=3,color='k', label='conventional Fourier transform')
ax.set(xlabel='frequency (Hz)', ylabel='Power spectrum P(f)')
leg = plt.legend( prop={'size':10})
The scaling factor differs from case to case (e.g. Zimin et al, 2003 test needs the scale factor of ca. 640).
Do I forget something?!
Another question is concerning the periodicity. Does this library consider the signal as a periodic signal? what about the edges in non-periodic signals? Do we need something like "cone of influence"?!
Thanks in advance for your kind answer.
The text was updated successfully, but these errors were encountered: