Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # compute DFT
- fft_x = fft(window)
- l = len(fft_x)
- freq = fftfreq(l, 1.0/20) # matching vector of frequencies
- fft_x_shifted = fftshift(fft_x) # shift DC component
- half_l = ceil(l/2.0)
- # fold negative frequencies and scale
- fft_x_half = abs((2.0 / 256) * fft_x[:half_l]) # ===> Normal decisione tree, good precision.
- #fft_x_half = abs((2.0 / 256) * fft_x_shifted[:half_l]) # ===> BIG decisione tree, low precision.
- freq_half = freq[:half_l]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement