From 29ae5c196b348b2bc24dce3effeea606eeca0ebe Mon Sep 17 00:00:00 2001 From: gac-x06da Date: Fri, 14 Mar 2025 16:10:16 +0100 Subject: [PATCH] WIP --- pxiii_bec/bec_widgets/auto_updates.py | 2 +- pxiii_bec/device_configs/x06da_device_config.yaml | 2 +- pxiii_bec/scripts/scanwrappers.py | 12 ++++++------ pyproject.toml | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/pxiii_bec/bec_widgets/auto_updates.py b/pxiii_bec/bec_widgets/auto_updates.py index 75dec70..ccecd00 100644 --- a/pxiii_bec/bec_widgets/auto_updates.py +++ b/pxiii_bec/bec_widgets/auto_updates.py @@ -97,4 +97,4 @@ class PlotUpdate(AutoUpdates): # self.run_grid_scan_update(info) # return super().handler(info) - self.plot_handler(info) \ No newline at end of file + self.plot_handler(info) diff --git a/pxiii_bec/device_configs/x06da_device_config.yaml b/pxiii_bec/device_configs/x06da_device_config.yaml index f9f30e4..1b4008c 100644 --- a/pxiii_bec/device_configs/x06da_device_config.yaml +++ b/pxiii_bec/device_configs/x06da_device_config.yaml @@ -47,7 +47,7 @@ sldi_sizex: softwareTrigger: false sldi_ceny: description: FE slit-diaphragm vertical center - deviceClass: ophyd.EpicsMotor + deviceClass: ophyd_devices.EpicsMotorEC deviceConfig: {prefix: 'X06DA-FE-SLDI:CENY'} onFailure: buffer enabled: true diff --git a/pxiii_bec/scripts/scanwrappers.py b/pxiii_bec/scripts/scanwrappers.py index 51e5713..82dd10a 100644 --- a/pxiii_bec/scripts/scanwrappers.py +++ b/pxiii_bec/scripts/scanwrappers.py @@ -13,7 +13,7 @@ def ascan( scan_end, steps, exp_time, - datasource=None, + plot=None, visual=True, relative=False, **kwargs, @@ -44,10 +44,10 @@ def ascan( # Draw a simploe plot in the window dock = window.add_dock(f"ScanDisplay {motor}") plt1 = dock.add_widget("BECWaveformWidget") - plt1.plot(x_name=motor, y_name=datasource) + plt1.plot(x_name=motor, y_name=plot) plt1.set_x_label(motor) - plt1.set_y_label(datasource) - plt1.add_dap(motor, datasource, dap="LinearModel") + plt1.set_y_label(plot) + plt1.add_dap(motor, plot, dap="LinearModel") window.show() print("Handing over to 'scans.line_scan'") @@ -57,7 +57,7 @@ def ascan( scan_end, steps=steps, exp_time=exp_time, - datasource=datasource, + plot=plot, relative=relative, **kwargs, ) @@ -68,7 +68,7 @@ def ascan( else: # Fitting without GUI firt_par = bec.dap.LinearModel.fit( - s, motor.name, motor.name, datasource.name, datasource.name + s, motor.name, motor.name, plot.name, plot.name ) # # Some basic fit diff --git a/pyproject.toml b/pyproject.toml index 1297ab6..c744f69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dependencies = [ "bec_ipython_client", "bec_lib", "bec_server", + "bec_widgets", "ophyd_devices", "std_daq_client", "rich",