-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First dcm commit * Add basic dcm device for i24
- Loading branch information
1 parent
a5b3fc5
commit e4c3d5a
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from ophyd_async.core import StandardReadable | ||
from ophyd_async.epics.motion import Motor | ||
from ophyd_async.epics.signal import epics_signal_r | ||
|
||
|
||
class DCM(StandardReadable): | ||
""" | ||
A double crystal monocromator device, used to select the beam energy. | ||
""" | ||
|
||
def __init__(self, prefix: str, name: str = "") -> None: | ||
with self.add_children_as_readables(): | ||
# Motors | ||
self.bragg_in_degrees = Motor(prefix + "-MO-DCM-01:BRAGG") | ||
self.x_translation_in_mm = Motor(prefix + "-MO-DCM-01:X") | ||
self.offset_in_mm = Motor(prefix + "-MO-DCM-01:OFFSET") | ||
self.gap_in_mm = Motor(prefix + "-MO-DCM-01:GAP") | ||
self.energy_in_kev = Motor(prefix + "-MO-DCM-01:ENERGY") | ||
self.xtal1_roll = Motor(prefix + "-MO-DCM-01:XTAL1:ROLL") | ||
self.xtal2_roll = Motor(prefix + "-MO-DCM-01:XTAL2:ROLL") | ||
self.xtal2_pitch = Motor(prefix + "-MO-DCM-01:XTAL2:PITCH") | ||
|
||
# Wavelength is calculated in epics from the energy | ||
self.wavelength_in_a = epics_signal_r(float, prefix + "-MO-DCM-01:LAMBDA") | ||
|
||
# Temperatures | ||
self.xtal1_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-1") | ||
self.xtal1_heater_temp = epics_signal_r( | ||
float, prefix + "-DI-DCM-01:PT100-2" | ||
) | ||
self.xtal2_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-4") | ||
self.xtal2_heater_temp = epics_signal_r( | ||
float, prefix + "-DI-DCM-01:PT100-5" | ||
) | ||
|
||
self.roll_plate_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-3") | ||
self.pitch_plate_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-6") | ||
self.backplate_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-7") | ||
self.b1_plate_temp = epics_signal_r(float, prefix + "-DI-DCM-01:PT100-7") | ||
self.gap_temp = epics_signal_r(float, prefix + "-DI-DCM-01:TC-1") | ||
|
||
super().__init__(name) |