diff --git a/pxiii_bec/bec_widgets/auto_updates/auto_updates.py b/pxiii_bec/bec_widgets/auto_updates/auto_updates.py index b0b4440..0467f38 100644 --- a/pxiii_bec/bec_widgets/auto_updates/auto_updates.py +++ b/pxiii_bec/bec_widgets/auto_updates/auto_updates.py @@ -29,48 +29,48 @@ class PlotUpdate(AutoUpdates): msg (ScanStatusMessage): The scan status message. """ - if "kwargs" in msg.request_inputs: - dev_plt = msg.request_inputs["kwargs"].get("plot", None) - # Handle depending on scan dimension - if len(msg.scan_report_devices) == 1: - dev_x = msg.scan_report_devices[0] - if dev_plt is not None: - # Set the dock to the waveform widget - wf = self.set_dock_to_widget("Waveform") - # Clear the waveform widget and plot the data - wf.clear_all() - wf.plot( - x_name=dev_x, - y_name=dev_plt, - label=f"Scan {msg.info.scan_number} - {dev_plt}", - title=f"Scan {msg.info.scan_number}", - x_label=dev_x, - y_label=dev_plt, - ) - if len(msg.scan_report_devices) == 2: - dev_x = msg.scan_report_devices[0] - dev_y = msg.scan_report_devices[1] - if dev_plt is not None: - # Set the dock to the waveform widget - wf = self.set_dock_to_widget("Waveform") - # Clear the waveform widget and plot the data - wf.clear_all() - wf.plot( - x_name=dev_x, - y_name=dev_y, - z_name=dev_plt, - label=f"Scan {msg.info.scan_number} - {dev_plt}", - title=f"Scan {msg.info.scan_number}", - x_label=dev_x, - y_label=dev_y, - z_label=dev_plt, - ) - elif msg.scan_name == "line_scan" and msg.scan_report_devices: - return self.simple_line_scan(msg) - elif msg.scan_name == "grid_scan" and msg.scan_report_devices: - return self.simple_grid_scan(msg) - elif msg.scan_report_devices: - return self.best_effort(msg) + # if "kwargs" in msg.request_inputs: + # dev_plt = msg.request_inputs["kwargs"].get("plot", None) + + # if dev_plt is not None: + # # Handle depending on scan dimension + # if len(msg.scan_report_devices) == 1: + # dev_x = msg.scan_report_devices[0] + # # Set the dock to the waveform widget + # wf = self.set_dock_to_widget("Waveform") + # # Clear the waveform widget and plot the data + # wf.clear_all() + # wf.plot( + # x_name=dev_x, + # y_name=dev_plt, + # label=f"Scan {msg.info.scan_number} - {dev_plt}", + # title=f"Scan {msg.info.scan_number}", + # x_label=dev_x, + # y_label=dev_plt, + # ) + # if len(msg.scan_report_devices) == 2: + # dev_x = msg.scan_report_devices[0] + # dev_y = msg.scan_report_devices[1] + # # Set the dock to the waveform widget + # wf = self.set_dock_to_widget("Waveform") + # # Clear the waveform widget and plot the data + # wf.clear_all() + # wf.plot( + # x_name=dev_x, + # y_name=dev_y, + # z_name=dev_plt, + # label=f"Scan {msg.info.scan_number} - {dev_plt}", + # title=f"Scan {msg.info.scan_number} - {dev_plt}", + # x_label=dev_x, + # y_label=dev_y, + # z_label=dev_plt, + # ) + # elif msg.scan_name == "line_scan" and msg.scan_report_devices: + # return self.simple_line_scan(msg) + # elif msg.scan_name == "grid_scan" and msg.scan_report_devices: + # return self.simple_grid_scan(msg) + # elif msg.scan_report_devices: + # return self.best_effort(msg) return None def on_scan_closed(self, msg: ScanStatusMessage) -> None: diff --git a/pxiii_bec/devices/A3200.py b/pxiii_bec/devices/A3200.py index 4e9941e..94c17d2 100644 --- a/pxiii_bec/devices/A3200.py +++ b/pxiii_bec/devices/A3200.py @@ -97,10 +97,10 @@ class AerotechAbrStage(PSIDeviceBase, Device): # ) # Status flags for all axes - omega_done = Component(EpicsSignalRO, "-DF1:OMEGA-DONE", kind=Kind.normal) - gmx_done = Component(EpicsSignalRO, "-DF1:GMX-DONE", kind=Kind.normal) - gmy_done = Component(EpicsSignalRO, "-DF1:GMY-DONE", kind=Kind.normal) - gmz_done = Component(EpicsSignalRO, "-DF1:GMZ-DONE", kind=Kind.normal) + omega_done = Component(EpicsSignalRO, "-DF1:OMEGA-DONE", auto_monitor=True, kind=Kind.normal) + gmx_done = Component(EpicsSignalRO, "-DF1:GMX-DONE", auto_monitor=True, kind=Kind.normal) + gmy_done = Component(EpicsSignalRO, "-DF1:GMY-DONE", auto_monitor=True, kind=Kind.normal) + gmz_done = Component(EpicsSignalRO, "-DF1:GMZ-DONE", auto_monitor=True, kind=Kind.normal) # For some reason the task interface is called PSO... scan_command = Component(EpicsSignal, "-PSO:CMD", put_complete=True, kind=Kind.omitted) @@ -128,7 +128,7 @@ class AerotechAbrStage(PSIDeviceBase, Device): task2 = Component(EpicsSignalRO, "-AERO:TSK2-DONE", auto_monitor=True) task3 = Component(EpicsSignalRO, "-AERO:TSK3-DONE", auto_monitor=True) task4 = Component(EpicsSignalRO, "-AERO:TSK4-DONE", auto_monitor=True) - scan_done = Component(EpicsSignal, "-GRD:SCAN-DONE", kind=Kind.config) + scan_done = Component(EpicsSignal, "-GRD:SCAN-DONE", auto_monitor=True, kind=Kind.config) def __init__( self,