Skip to content

Commit ad1213b

Browse files
Update i09 branch id device names (#1968)
* Update i09 branch id device names * Update i09-1 to use iundulator * Updated more devices * update i branch names * fix
1 parent 338505a commit ad1213b

2 files changed

Lines changed: 24 additions & 25 deletions

File tree

src/dodal/beamlines/i09_1_shared.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,34 @@ def dcm() -> DoubleCrystalMonochromatorWithDSpacing[
3535

3636

3737
@devices.factory()
38-
def undulator() -> UndulatorInMm:
38+
def iid() -> UndulatorInMm:
3939
return UndulatorInMm(prefix=f"{I_PREFIX.insertion_prefix}-MO-SERVC-01:")
4040

4141

4242
@devices.factory()
43-
def harmonics() -> UndulatorOrder:
43+
def ienergy_order() -> UndulatorOrder:
4444
return UndulatorOrder()
4545

4646

4747
@devices.factory()
48-
def hu_id_energy(
49-
harmonics: UndulatorOrder, undulator: UndulatorInMm
48+
def iidenergy(
49+
ienergy_order: UndulatorOrder, iid: UndulatorInMm
5050
) -> HardInsertionDeviceEnergy:
5151
return HardInsertionDeviceEnergy(
52-
undulator_order=harmonics,
53-
undulator=undulator,
52+
undulator_order=ienergy_order,
53+
undulator=iid,
5454
lut={}, # ToDo https://github.com/DiamondLightSource/sm-bluesky/issues/239
5555
gap_to_energy_func=calculate_energy_i09_hu,
5656
energy_to_gap_func=calculate_gap_i09_hu,
5757
)
5858

5959

6060
@devices.factory()
61-
def hu_energy(
62-
dcm: DoubleCrystalMonochromatorWithDSpacing, hu_id_energy: HardInsertionDeviceEnergy
61+
def ienergy(
62+
dcm: DoubleCrystalMonochromatorWithDSpacing,
63+
iidenergy: HardInsertionDeviceEnergy,
6364
) -> HardEnergy:
6465
return HardEnergy(
6566
dcm=dcm,
66-
undulator_energy=hu_id_energy,
67+
undulator_energy=iidenergy,
6768
)

src/dodal/beamlines/i09_2_shared.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def pgm() -> PlaneGratingMonochromator:
5151

5252

5353
@devices.factory()
54-
def jid_gap() -> UndulatorGap:
54+
def jgap() -> UndulatorGap:
5555
return UndulatorGap(prefix=f"{J_PREFIX.insertion_prefix}-MO-SERVC-01:")
5656

5757

5858
@devices.factory()
59-
def jid_phase() -> UndulatorPhaseAxes:
59+
def jphase() -> UndulatorPhaseAxes:
6060
return UndulatorPhaseAxes(
6161
prefix=f"{J_PREFIX.insertion_prefix}-MO-SERVC-01:",
6262
top_outer="PUO",
@@ -67,15 +67,13 @@ def jid_phase() -> UndulatorPhaseAxes:
6767

6868

6969
@devices.factory()
70-
def jid(
71-
jid_gap: UndulatorGap, jid_phase: UndulatorPhaseAxes
72-
) -> Apple2[UndulatorPhaseAxes]:
70+
def jid(jgap: UndulatorGap, jphase: UndulatorPhaseAxes) -> Apple2[UndulatorPhaseAxes]:
7371
"""I09 soft x-ray insertion device."""
74-
return Apple2[UndulatorPhaseAxes](id_gap=jid_gap, id_phase=jid_phase)
72+
return Apple2[UndulatorPhaseAxes](id_gap=jgap, id_phase=jphase)
7573

7674

7775
@devices.factory()
78-
def jid_controller(
76+
def jidcontroller(
7977
jid: Apple2[UndulatorPhaseAxes],
8078
) -> Apple2EnforceLHMoveController[UndulatorPhaseAxes]:
8179
"""J09 insertion device controller."""
@@ -96,22 +94,22 @@ def jid_controller(
9694

9795

9896
@devices.factory()
99-
def jid_energy(
100-
jid_controller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
97+
def jidenergy(
98+
jidcontroller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
10199
) -> InsertionDeviceEnergy:
102-
return InsertionDeviceEnergy(id_controller=jid_controller)
100+
return InsertionDeviceEnergy(id_controller=jidcontroller)
103101

104102

105103
@devices.factory()
106-
def jid_polarisation(
107-
jid_controller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
104+
def jpolarisation(
105+
jidcontroller: Apple2EnforceLHMoveController[UndulatorPhaseAxes],
108106
) -> InsertionDevicePolarisation:
109-
return InsertionDevicePolarisation(id_controller=jid_controller)
107+
return InsertionDevicePolarisation(id_controller=jidcontroller)
110108

111109

112110
@devices.factory()
113-
def energy_jid(
114-
jid_energy: InsertionDeviceEnergy, pgm: PlaneGratingMonochromator
111+
def jenergy(
112+
jidenergy: InsertionDeviceEnergy, pgm: PlaneGratingMonochromator
115113
) -> BeamEnergy:
116114
"""Beam energy."""
117-
return BeamEnergy(id_energy=jid_energy, mono=pgm.energy)
115+
return BeamEnergy(id_energy=jidenergy, mono=pgm.energy)

0 commit comments

Comments
 (0)