Devices with Built-in Support¶
These devices have ready-made classes in Python. To configure them, the user need only provide a PV prefix and a name.
EPICS motor¶
The EPICS motor record
is supported by the EpicsMotor
Device in ophyd
:
from ophyd import EpicsMotor
# the two-theta motor
tth = EpicsMotor('XF:28IDC-ES:1{Dif:1-Ax:2ThI}Mtr', name='tth')
Creating ‘bundles’ of motors is very common so we also have a helper
class that tweaks the default behavior of read_attrs
,
configuration_attrs
, and hints
This must be sub-classed (like Device
) to be useful.
from ophyd import MotorBundle, EpicsMotor
from ophyd import Component as Cpt
class StageXY(MotorBundle):
x = Cpt(EpicsMotor, ':X')
y = Cpt(EpicsMotor, ':Y')
stage = StageXY('STAGE_PV', name='stage')
|
An EPICS motor record, wrapped in a |
|
Sub-class this to device a bundle of motors |
EPICS Scaler¶
The EPICS scaler
record (1) is supported by two alternative
ophyd
Devices. (You need only choose one of these two.) An important
difference between the EpicsScaler and the ScalerCH
Devices is in how each channel’s name is represented, as summarized
in the next table:
class |
channel naming |
examples |
---|---|---|
numbered |
|
|
EPICS scaler record channel name fields |
|
- 1(1,2,3)
EPICS
scaler
documentation: https://htmlpreview.github.io/?https://github.com/epics-modules/scaler/blob/master/documentation/scalerRecord.html
EpicsScaler¶
Create an EpicsScaler
object to control an EPICS scaler
record (1).
from ophyd import EpicsScaler
scaler = EpicsScaler('XF:28IDC-ES:1{Sclr:1}', name='scaler')
|
SynApps Scaler Record interface |
ScalerCH¶
Create a ScalerCH
object to control an EPICS scaler
record (1).
from ophyd.scaler import ScalerCH
scaler = ScalerCH('XF:28IDC-ES:1{Sclr:1}', name='scaler')
|
EpicsMCA and EpicsDXP¶
EPICS MCA records and
DXP-based devices are also supported, through the EpicsMCA
and EpicsDXP
devices.
|
SynApps MCA Record interface |
|
All high-level DXP parameters for each channel |