Skip to content
Snippets Groups Projects

Resolve RTSD-265

Merged Eric Kooistra requested to merge RTSD-265 into master
1 file
+ 5
2
Compare changes
  • Side-by-side
  • Inline
@@ -146,7 +146,8 @@ def plot_spectra(fn, HF, fs=1.0, fLim=None, dbLim=None, aLim=None):
. fs: sample frequency in Hz
"""
Hmag = np.abs(HF)
Hphs = np.unwrap(np.angle(HF))
# Hphs = np.unwrap(np.angle(HF))
Hphs = np.angle(HF)
Hpow_dB = pow_db(HF) # power response
f = fn * fs # scale fn by fs
flabel = 'Frequency [fs = %f]' % fs
@@ -209,7 +210,9 @@ def plot_phase_spectrum(fn, HF, fmt='r', fs=1.0, fLim=None, aLim=None):
f = fn * fs # scale fn by fs
flabel = 'Frequency [fs = %f]' % fs
plt.plot(f, np.unwrap(np.angle(HF)), fmt)
# Hphs = np.unwrap(np.angle(HF))
Hphs = np.angle(HF)
plt.plot(f, Hphs, fmt)
plt.title('Phase spectrum')
plt.ylabel('Pase [rad]')
plt.xlabel(flabel)
Loading