Bump
This commit is contained in:
@@ -102,10 +102,6 @@ class AerotechFlyscanBase(AsyncFlyScanBase):
|
||||
# Call super
|
||||
yield from super().pre_scan()
|
||||
|
||||
# def stage(self):
|
||||
# """ ToDo: Sot sure if we should call super() here as it'd stage the whole beamline"""
|
||||
# return super().stage()
|
||||
|
||||
def scan_core(self):
|
||||
"""The actual scan logic comes here."""
|
||||
# Kick off the run
|
||||
@@ -127,6 +123,15 @@ class AerotechFlyscanBase(AsyncFlyScanBase):
|
||||
return super().cleanup()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class MeasureStandardWedge(AerotechFlyscanBase):
|
||||
"""Standard wedge scan using the OMEGA motor
|
||||
|
||||
|
||||
@@ -17,43 +17,44 @@ def ascan(motor, scan_start, scan_end, steps, exp_time, datasource, visual=True,
|
||||
if not bl_check_beam():
|
||||
raise RuntimeError("Beamline is not in ready state")
|
||||
|
||||
if visual:
|
||||
# Get or create scan specific window
|
||||
window = None
|
||||
for _, val in bec.gui.windows.items():
|
||||
if val.title == "CurrentScan":
|
||||
window = val.widget
|
||||
window.clear_all()
|
||||
if window is None:
|
||||
window = bec.gui.new("CurrentScan")
|
||||
# if visual:
|
||||
# # Get or create scan specific window
|
||||
# window = None
|
||||
# for _, val in bec.gui.windows.items():
|
||||
# if val.title == "CurrentScan":
|
||||
# window = val.widget
|
||||
# window.clear_all()
|
||||
# if window is None:
|
||||
# window = bec.gui.new("CurrentScan")
|
||||
|
||||
# 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.set_x_label(motor)
|
||||
plt1.set_y_label(datasource)
|
||||
plt1.add_dap(motor, datasource, dap="LinearModel")
|
||||
window.show()
|
||||
# # 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.set_x_label(motor)
|
||||
# plt1.set_y_label(datasource)
|
||||
# plt1.add_dap(motor, datasource, dap="LinearModel")
|
||||
# window.show()
|
||||
|
||||
print("Handing over to 'scans.line_scan'")
|
||||
if "relative" in kwargs:
|
||||
del kwargs["relative"]
|
||||
s = scans.line_scan(
|
||||
motor, scan_start, scan_end, steps=steps, exp_time=exp_time, relative=False, **kwargs
|
||||
motor, scan_start, scan_end, steps=steps, exp_time=exp_time, relative=False, datasource=datasource, **kwargs
|
||||
)
|
||||
|
||||
if visual:
|
||||
fit = plt1.get_dap_params()
|
||||
else:
|
||||
fit = bec.dap.LinearModel.fit(s, motor.name, motor.name, datasource.name, datasource.name)
|
||||
# if visual:
|
||||
# fit = plt1.get_dap_params()
|
||||
# else:
|
||||
# fit = bec.dap.LinearModel.fit(s, motor.name, motor.name, datasource.name, datasource.name)
|
||||
|
||||
# fit = bec.dap.LinearModel(motor, datasource)
|
||||
|
||||
# If fitting via GUI
|
||||
# firt_par = plt1.get_dap_params()
|
||||
|
||||
return s, fit
|
||||
# return s, fit
|
||||
return s
|
||||
|
||||
# # Some basic fit
|
||||
# dkey = datasource.full_name
|
||||
|
||||
Reference in New Issue
Block a user