Open stan-dot opened 3 months ago
from @iain-hall 's notes:
Beamline script : /dls_sw/i18/scripts/beamlinestuff/I18Scans/Create_deg_Lookuptabledcm.py
Old version of beamline script in GDA : scripts/create_lookuptable_deg.py
Procedure is as follows :
Adjust undulator gap to using current lookup table for initial Bragg angle
Scan across desired range of Bragg angles, for each angle :
Scan undulator gap (current gap value ± small range) and measure on d7bdiode (Diode PV is BL18I-DI-PHDGN-07:B:DIODE:I)
Find undulator gap that gives peak d7bdiode value (fit gaussian curve, store peak position).
Fit quadratic curve to the set of Bragg angle - undulator gap values. These values are used to generate the lookup table of undulator gap vs. Bragg angle.
Scan is currently done by GDA using Jython; quadratic curve fit is done using IDL.
Undulator gap scans are are carried out at each harmonic.
Beamline staff manually update the lookup table - copy-pasting updated section (i.e. values for a range of bragg angles) into text file to replace old values.
the deployment part is done
will need to re-do the deployment part for the new release
regardless of the lookup tables, which are more complicated, it should be possible to do this part on the Tuesday machine day.
update - the gridscan is not in relation to the table, but in relation to the dcm. possibly useful for the pinhole alignment?
24.09 testing update - the table device fails to load into the /devices
blueapi endpoint
troubleshooting with dodal connect
dodal connect i18
Attempting connection to i18 (using dodal.beamlines.i18)
5 devices connected:
dcm
diodad7bdiode
hfm
synchrotron
Traceback (most recent call last):
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/bin/dodal", line 8, in <module>
sys.exit(main())
^^^^^^
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/xma12127/projects/beamlines/i18-bluesky/.venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/scratch/xma12127/projects/forks/dodal/src/dodal/cli.py", line 71, in connect
raise NotConnected(exceptions)
ophyd_async.core._utils.NotConnected:
raster_stage: NotConnected:
coros: NotConnected:
x: NotConnected:
motor_egu: NotConnected: ca://BL18I-MO-SIM-01:M1.EGU
velocity: NotConnected: ca://BL18I-MO-SIM-01:M1.VELO
user_readback: NotConnected: ca://BL18I-MO-SIM-01:M1.RBV
user_setpoint: NotConnected: ca://BL18I-MO-SIM-01:M1.VAL
max_velocity: NotConnected: ca://BL18I-MO-SIM-01:M1.VMAX
acceleration_time: NotConnected: ca://BL18I-MO-SIM-01:M1.ACCL
precision: NotConnected: ca://BL18I-MO-SIM-01:M1.PREC
deadband: NotConnected: ca://BL18I-MO-SIM-01:M1.RDBD
motor_done_move: NotConnected: ca://BL18I-MO-SIM-01:M1.DMOV
low_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M1.LLM
high_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M1.HLM
motor_stop: NotConnected: ca://BL18I-MO-SIM-01:M1.STOP
y: NotConnected:
motor_egu: NotConnected: ca://BL18I-MO-SIM-01:M2.EGU
velocity: NotConnected: ca://BL18I-MO-SIM-01:M2.VELO
user_readback: NotConnected: ca://BL18I-MO-SIM-01:M2.RBV
user_setpoint: NotConnected: ca://BL18I-MO-SIM-01:M2.VAL
max_velocity: NotConnected: ca://BL18I-MO-SIM-01:M2.VMAX
acceleration_time: NotConnected: ca://BL18I-MO-SIM-01:M2.ACCL
precision: NotConnected: ca://BL18I-MO-SIM-01:M2.PREC
deadband: NotConnected: ca://BL18I-MO-SIM-01:M2.RDBD
motor_done_move: NotConnected: ca://BL18I-MO-SIM-01:M2.DMOV
low_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M2.LLM
high_limit_travel: NotConnected: ca://BL18I-MO-SIM-01:M2.HLM
motor_stop: NotConnected: ca://BL18I-MO-SIM-01:M2.STOP
undulator: TypeError: Undulator.__init__() missing 1 required positional argument: 'id_gap_lookup_table_path'
table
was simply missing the line for super().__init__(name=name)
everything is connecting now
need to call the scan from api with a scanspec string that describes the grid trajectory.
need to supply the diode device