Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Fs = 25600 # Hz
- sampling_period = 0.1
- N = int(Fs * sampling_period)
- fc = 1000 # Cut-off frequency of the filter
- w = fc / (Fs / 2) # Normalize the frequency
- b, a = signal.butter(10, w)
- filter_out = signal.filtfilt(b, a, bearing1_1["horiz_acc"])
- f = np.fft.fftfreq(int(N), 1/Fs)
- window = np.hanning(int(N))
- X = 1/N * np.abs(np.fft.fft(filter_out * window)) * 2 # Multiply by 2 for hann window power correction?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement