Skip to content
Snippets Groups Projects
Commit 97334f9f authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Correct plot_magnitude_spectrum().

parent d52173a8
No related branches found
No related tags found
1 merge request!411Resolve RTSD-271
......@@ -215,7 +215,7 @@ def plot_power_spectrum(fn, HF, fmt='r', fs=1.0, fLim=None, dbLim=None):
plt.grid(True)
def plot_magnitude_spectrum(f, HF, fmt='r', fs=1.0, fLim=None, voltLim=None):
def plot_magnitude_spectrum(fn, HF, fmt='r', fs=1.0, fLim=None, voltLim=None):
"""Plot magnitude (= voltage) spectrum
Input:
......@@ -227,7 +227,7 @@ def plot_magnitude_spectrum(f, HF, fmt='r', fs=1.0, fLim=None, voltLim=None):
f = fn * fs # scale fn by fs
flabel = 'Frequency [fs = %f]' % fs
plt.plot(f * fs, np.abs(HF), fmt)
plt.plot(f, np.abs(HF), fmt)
plt.title('Magnitude spectrum')
plt.ylabel('Voltage')
plt.xlabel(flabel)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment