condensed logic

This commit is contained in:
2024-08-02 14:05:05 +02:00
parent 87a79a265c
commit 19f1c8e375

View File

@ -107,18 +107,17 @@ def work(backend_address, accumulator_host, accumulator_port, visualisation_host
detector_name = results.get("detector_name", "")
results["laser_on"] = False
results["number_of_spots"] = 0
results["is_hit_frame"] = False
daq_rec = results.get("daq_rec", 0)
event_laser = read_bit(daq_rec, 16)
event_darkshot = read_bit(daq_rec, 17)
# event_fel = read_bit(daq_rec, 18)
event_ppicker = read_bit(daq_rec, 19)
if not event_darkshot:
results["laser_on"] = event_laser
results["laser_on"] = event_laser and not event_darkshot
# Filter only ppicker events, if requested; skipping all other events
select_only_ppicker_events = results.get("select_only_ppicker_events", False)