From f40aa9ef82479a98337b3702b39e8a0d8e0ecc0c Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 25 Jul 2021 16:43:33 +0200 Subject: [PATCH] need to ensure channel order for all steps, results should be unique --- slic/core/acquisition/pvchannels.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slic/core/acquisition/pvchannels.py b/slic/core/acquisition/pvchannels.py index 86d7eb18f..65df77a2e 100644 --- a/slic/core/acquisition/pvchannels.py +++ b/slic/core/acquisition/pvchannels.py @@ -13,11 +13,12 @@ class PVChannels(Channels): def check_status(channels, timeout=None): - pvs = [epics.get_pv(ch) for ch in set(channels)] + channels = sorted(channels) + pvs = [epics.get_pv(ch) for ch in channels] states = [pv.wait_for_connection(timeout=timeout) for pv in pvs] - online = sorted(ch for ch, connected in zip(channels, states) if connected) - offline = sorted(ch for ch, connected in zip(channels, states) if not connected) + online = set(ch for ch, connected in zip(channels, states) if connected) + offline = set(ch for ch, connected in zip(channels, states) if not connected) return online, offline