def testPSD(display = True) :
""" Read a signal, compute PSD and compare standard deviation to m0 """
df = read( r'../../testData/motion.dat' )
RsSig = np.std( df.values[:,0] ) * 4
print ("Rs from sigma " , RsSig)
psd = getPSD(df )
RsM0 = (np.sum(psd.values[:,0])* dx(psd) ) **0.5 * 4.004
print ("Rs from m0 ",RsM0)
psd = psd[0.1 : 2.0]
if display :
df.plot( )
psd.plot()
plt.show()
评论列表
文章目录