From c36887191914d23e85a1b480dac324be0eefb963 Mon Sep 17 00:00:00 2001 From: wyzula-jan <133381102+wyzula-jan@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:35:13 +0200 Subject: [PATCH] feat: plot flips every second row --- bec_widgets/examples/mca_readout/mca_plot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bec_widgets/examples/mca_readout/mca_plot.py b/bec_widgets/examples/mca_readout/mca_plot.py index 9efcd32e..2de1d15d 100644 --- a/bec_widgets/examples/mca_readout/mca_plot.py +++ b/bec_widgets/examples/mca_readout/mca_plot.py @@ -78,12 +78,12 @@ class StreamApp(QWidget): row = msgMCS.content["signals"]["mca1"] metadata = msgMCS.metadata + # Check if the current number of rows is odd + if parent.data is not None and parent.data.shape[0] % 2 == 1: + row = np.flip(row) # Flip the row + if parent.data is None: parent.data = np.array([row]) - - # Check if the current number of rows is odd - # if parent.data is not None and parent.data.shape[0] % 2 == 0: - # row = np.flip(row) # Flip the rowR else: parent.data = np.vstack((parent.data, row))