From 17c6839e3bb89a5632938628e6913a61cc4528ad Mon Sep 17 00:00:00 2001 From: Craig Warren Date: Thu, 26 May 2016 12:16:32 +0100 Subject: [PATCH] Better handling of when s21 is None. --- tools/plot_antenna_params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/plot_antenna_params.py b/tools/plot_antenna_params.py index d99c710d..431c66ef 100644 --- a/tools/plot_antenna_params.py +++ b/tools/plot_antenna_params.py @@ -309,7 +309,7 @@ def mpl_plot(time, freqs, Vinc, Vincp, Iinc, Iincp, Vref, Vrefp, Iref, Irefp, Vt ax.grid() # Plot frequency spectra of s21 - if 's21' in locals() or globals(): + if s21 is not None: ax = plt.subplot(gs2[0, 1]) markerline, stemlines, baseline = ax.stem(freqs[pltrange], s21[pltrange], '-.') plt.setp(baseline, 'linewidth', 0)