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
I've noticed a bizzar frequency response from the rrcosfilter. I suspect this is an edge case due to the if/else in the module. The time waveform doesn't look unusual.
importmatplotlib.pyplotaspltimportscipy.fftpackasfftpackfromcommpyimportrrcosfilterimportnumpyasnpimportscipydefpadded_centered_fft(taps,mintaps=1024,db=True,db_min=-300,fs=1):
""" returns the fft of the zero padded taps, and centers it """iflen(taps) <mintaps:
taps=np.concatenate((taps,np.zeros(mintaps-len(taps))))
dfreq, fft=fftpack.fftshift(fftpack.fftfreq(len(taps))),fftpack.fftshift(scipy.fft(taps))
fft_abs=np.abs(fft)
fft_db=20*np.log10(fft_abs+max(np.abs(fft))*(10**((db_min-50)/20)) )
fft_db[np.where(fft_db<db_min)]=db_mindfreq*=fsreturn (dfreq, fft_db) ifdbelse (dfreq,fft)
plt.plot(*padded_centered_fft(rrcosfilter(N=400,alpha=0.15,Ts=1,Fs=3.01)[1]),label='3.01')
plt.plot(*padded_centered_fft(rrcosfilter(N=400,alpha=0.15,Ts=1,Fs=3)[1]),label='3')
plt.plot(*padded_centered_fft(rrcosfilter(N=400,alpha=0.15,Ts=1,Fs=2.99)[1]),':',label='2.99')
plt.legend(loc='best')
plt.show()
The text was updated successfully, but these errors were encountered:
I've noticed a bizzar frequency response from the rrcosfilter. I suspect this is an edge case due to the if/else in the module. The time waveform doesn't look unusual.
The text was updated successfully, but these errors were encountered: