diff --git a/impl/utils/plot_amp_phase.py b/impl/utils/plot_amp_phase.py index a70a40d..cbc2af5 100755 --- a/impl/utils/plot_amp_phase.py +++ b/impl/utils/plot_amp_phase.py @@ -17,7 +17,7 @@ with open(sys.argv[1], 'rb') as infile: t = np.arange(0, T*data.size, T) amp = np.absolute(data) - phase = np.angle(data) + phase = np.unwrap(np.angle(data)) pp.plot(t, amp, 'r-') pp.legend(['Amplitude']) diff --git a/impl/utils/plot_spectrum_loop.py b/impl/utils/plot_spectrum_loop.py index fd82924..aba9ff4 100755 --- a/impl/utils/plot_spectrum_loop.py +++ b/impl/utils/plot_spectrum_loop.py @@ -35,8 +35,11 @@ ax.legend(['Spectrum']) ax.set_xlabel('Frequency [Hz]') def update(*args): - spec, f = load_data() - line.set_ydata(spec) + try: + spec, f = load_data() + line.set_ydata(spec) + except Exception as e: + print(e) return [line]