Improvements to debug scripts
This commit is contained in:
parent
d9707ac4a9
commit
66c88bf889
|
@ -17,7 +17,7 @@ with open(sys.argv[1], 'rb') as infile:
|
||||||
t = np.arange(0, T*data.size, T)
|
t = np.arange(0, T*data.size, T)
|
||||||
|
|
||||||
amp = np.absolute(data)
|
amp = np.absolute(data)
|
||||||
phase = np.angle(data)
|
phase = np.unwrap(np.angle(data))
|
||||||
|
|
||||||
pp.plot(t, amp, 'r-')
|
pp.plot(t, amp, 'r-')
|
||||||
pp.legend(['Amplitude'])
|
pp.legend(['Amplitude'])
|
||||||
|
|
|
@ -35,8 +35,11 @@ ax.legend(['Spectrum'])
|
||||||
ax.set_xlabel('Frequency [Hz]')
|
ax.set_xlabel('Frequency [Hz]')
|
||||||
|
|
||||||
def update(*args):
|
def update(*args):
|
||||||
|
try:
|
||||||
spec, f = load_data()
|
spec, f = load_data()
|
||||||
line.set_ydata(spec)
|
line.set_ydata(spec)
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
return [line]
|
return [line]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue