From 7f26cc3cd3a3ecc6e7d75f1ea78a7b4ef000e796 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Mon, 8 Aug 2022 17:53:59 +0200 Subject: [PATCH] Lib: beacon_sync fig allow single time_delta --- lib/plotting.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/plotting.py b/lib/plotting.py index a8d5732..fb0c442 100644 --- a/lib/plotting.py +++ b/lib/plotting.py @@ -41,7 +41,13 @@ def beacon_sync_figure( ns=1e-3 ): if not hasattr(delta_t, "__len__"): - delta_t = np.repeat(delta_t, 2) + delta_t = np.array([0, delta_t]) + + if not hasattr(impulse_offsets, "__len__"): + impulse_offsets = np.repeat(impulse_offsets, 2) + + if not hasattr(beacon_offsets, "__len__"): + beacon_offsets = np.repeat(beacon_offsets, 2) N_axes = 2 if show_annotations: