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')

ophyd.epics_motor.EpicsMotor([prefix, kind, ...])

An EPICS motor record, wrapped in a Positioner

ophyd.epics_motor.MotorBundle([prefix, ...])

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:


channel naming




scaler_channels_chan2, scaler_channels_chan3


EPICS scaler record channel name fields

I0, diode


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')

ophyd.scaler.EpicsScaler(*args, **kwargs)

SynApps Scaler Record interface


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')

ophyd.scaler.ScalerCH([prefix, kind, ...])

EpicsMCA and EpicsDXP#

EPICS MCA records and DXP-based devices are also supported, through the EpicsMCA and EpicsDXP devices.

ophyd.mca.EpicsMCARecord(*args, **kwargs)

SynApps MCA Record interface

ophyd.mca.EpicsDXP([prefix, kind, ...])

All high-level DXP parameters for each channel