DiamondLightSource / dodal

Ophyd devices and other utils that could be used across DLS beamlines
Apache License 2.0
2 stars 8 forks source link

Create an ophyd device for Applet2 undulator #724

Open Relm-Arrowny opened 1 month ago

Relm-Arrowny commented 1 month ago

I17 will be using the same type of ID as I10, I21 and I06. This issue is to create an ophyd_async device to control this type of ID. This type of ID has 4 extra degrees of freedom beside the gap, each bank of magnet can move independently to each other. To produce different polarisation as well as energy.

User expected to be able to set energy and polarisation states: PC, NC, LH, LV and LA. With LA there will also be a polarisation angle associated with this state. These polarisation states are achieved by moving the ID motors into its correct position using a lookup table, each polarisation has their own look up table, therefore changing polarisation is effectively changing look up table. Also worth noting that, motors movement should be together. E.g. set point is put to epics pv but nothing should move until all axis is set and they should be move together,

Acceptance Criteria

Create an applet2 id device that can move all the id's motors. similar to undulator Must connect all required PV. Passes tests.

Ref:

/dls_sw/work/R3.14.12.7/ioc/BL10I/BL10I-CS-GATE-01/5064/P/gateway.pvlist /dls_sw/work/R3.14.12.7/ioc/BL21I/BL21I-CS-GATE-01/5064/P/gateway.pvlist

/dls_sw/work/R3.14.12.7/support/insertionDevice/db/IDGapSoftMotor.template /dls_sw/work/R3.14.12.7/support/insertionDevice/db/IDPhaseSoftMotor.template /dls_sw/work/R3.14.12.7/support/insertionDevice/db/IDGapVelocityControl.template

GDA implementation: /dc/dls_sw/i10/software/gda/workspace_git/gda-diamond.git/configurations/i10-shared/scripts/calibrations/mode_polarisation_energy_instances.py /calibrations/energy_polarisation_class.py lookup tables: /i10-shared/lookupTables/IDEnergy2GapCalibrations.csv /i10-shared/lookupTables/IDEnergy2PhaseCalibrations.csv

Relm-Arrowny commented 1 month ago

@DominicOram @stan-dot I saw the id issue on i18 and wondering if you two have any tips and comment on this? Especially, I want to make sure no such device already exist and any advice on best/standard way to implement the extra lookup table/ x-ray polarisation would be much appreciated.

stan-dot commented 1 month ago

@Relm-Arrowny for me this link is broken:



which i18 id issue? 
Relm-Arrowny commented 1 month ago

this Saw you two discussing undulator and thought I ask :p.

DominicOram commented 1 month ago

You may be able to re-use https://github.com/DiamondLightSource/dodal/pull/721 but it depends on the exact logic. Is it that:

Or is it that:

If it's the first I think you can reuse the existing undulator quite a bit, if it's the second I would write an ABC that they share so that we can use them interchangeably but otherwise have two separate devices.