Hi,
I wanted to see if i could find out the centrifugation speed of my old washing machine using some vibration analysis in Numpy using fft etc. So i wrote a little script that captured accelerometer data at 80Hz for one minute and then placed my ipad on top of the machine during centrifugation. I stored the data in an array in an .npy file. My graphs looked ok, I think, with a dominant peak at about 12Hz(12*60=720rpm...this probably explains why my clothes are so wet coming out from the machine). I tried the same using the the psd function in matplotlib using Python 2.7 and got a similar result, but when i run the code in Python 3.5 I get a very diffrent result. Can somebody explain why? Is it the diffrent versions Python or matplotlib or Pythonista or something else, i dont get it? The .npy file can be found here
# coding: utf-8
import console
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as ml
# console.clear()
file_name = 'wc-cent-2.npy'
data = np.load(file_name)
fig_mag = plt.figure()
plt.psd(data[:, 0], NFFT=256, Fs=80, window=ml.window_hanning, detrend = ml.detrend_none, scale_by_freq = True, noverlap = 0, pad_to = None, sides = 'onesided')
plt.xlabel('Frequency (Hz)')
plt.ylabel('Power/Frequency (dB/Hz)')
plt.title('PSD X')
plt.show()