Python code
Python code
(OP)
Hi guys,
Does anyone have Python code for calculating vibration magnitude and phase shift using a PC sound card?
thanks
Mark.
Does anyone have Python code for calculating vibration magnitude and phase shift using a PC sound card?
thanks
Mark.





RE: Python code
import audiolab, scipy
x, fs, nbits = audiolab.wavread(filename)
X = scipy.fft(x)
If you want the magnitude response:
import pylab
Xdb = 20*scipy.log10(scipy.absolute(X))
f = scipy.linspace(0, fs, len(Xdb))
pylab.plot(f, Xdb)
pylab.show()
which all seems jolly relevant to me
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: Python code
http://vibrationdata.wordpress.com/category/python...
http://vibrationdata.com/python-wiki/index.php?tit...
Good Luck,
Jim
Jim Kinney
Kennedy Space Center, FL
RE: Python code
RE: Python code
For example, real time fast slew rate antinoise systems use time signal filtering, they don't bother with frequency domain.
Cheers
Greg Locock
New here? Try reading these, they might help FAQ731-376: Eng-Tips.com Forum Policies http://eng-tips.com/market.cfm?
RE: Python code
managed to get a simple program to detect phase shift using zero crossings. however I just discovered there is another method called the "wattmeter method". It is more robust from what I understand. Does anyone know how it works and how I could apply it to software code?
thanks
mark.