ophyd_async.epics.demo#

Demo EPICS Devices for the tutorial.

Package Contents#

Classes#

DemoMotor

A demo movable that moves based on velocity.

DemoStage

A simulated sample stage with X and Y movables.

EnergyMode

Energy mode for DemoPointDetectorChannel.

DemoPointDetectorChannel

A channel for DemoPointDetector with int value based on X and Y Motors.

DemoPointDetector

A demo detector that produces a point values based on X and Y motors.

Functions#

start_ioc_subprocess

Start an IOC subprocess for sample stage and sensor.

API#

class ophyd_async.epics.demo.DemoMotor(prefix: str, with_pvi: bool = False, name: str = '')[source]#

Bases: ophyd_async.epics.core.EpicsDevice, ophyd_async.core.StandardReadable, ophyd_async.core.StandardMovable

A demo movable that moves based on velocity.

readback: Annotated[SignalR[float], PvSuffix('Readback'), HINTED_SIGNAL]#

None

velocity: Annotated[SignalRW[float], PvSuffix('Velocity'), CONFIG_SIGNAL]#

None

setpoint: Annotated[SignalRW[float], PvSuffix('Setpoint')]#

None

stop_: Annotated[TriggerableCommand, PvSuffix('~Stop.PROC')]#

None

movable_logic() MovableLogic#

The logic object that describes how this device moves.

This is intentionally public so that mock helpers (e.g. InstantMovableMock) and subclasses can access the setpoint and readback signals directly. Subclasses must implement this as a @cached_property that returns a MovableLogic instance.

class ophyd_async.epics.demo.DemoStage(prefix: str, name='')[source]#

Bases: ophyd_async.core.StandardReadable

A simulated sample stage with X and Y movables.

class ophyd_async.epics.demo.EnergyMode[source]#

Bases: ophyd_async.core.StrictEnum

Energy mode for DemoPointDetectorChannel.

LOW#

‘Low Energy’

Low energy mode

HIGH#

‘High Energy’

High energy mode

class ophyd_async.epics.demo.DemoPointDetectorChannel(name: str = '', connector: DeviceConnector | None = None)[source]#

Bases: ophyd_async.core.StandardReadable, ophyd_async.epics.core.EpicsDevice

A channel for DemoPointDetector with int value based on X and Y Motors.

value: Annotated[SignalR[int], PvSuffix('Value'), HINTED_UNCACHED_SIGNAL]#

None

mode: Annotated[SignalRW[EnergyMode], PvSuffix('Mode'), CONFIG_SIGNAL]#

None

class ophyd_async.epics.demo.DemoPointDetector(prefix: str, num_channels: int = 3, name: str = '')[source]#

Bases: ophyd_async.core.StandardReadable, ophyd_async.epics.core.EpicsDevice, bluesky.protocols.Triggerable

A demo detector that produces a point values based on X and Y motors.

acquire_time: Annotated[SignalRW[float], PvSuffix('AcquireTime'), CONFIG_SIGNAL]#

None

start: Annotated[TriggerableCommand, PvSuffix('~Start.PROC')]#

None

acquiring: Annotated[SignalR[bool], PvSuffix('Acquiring')]#

None

reset: Annotated[TriggerableCommand, PvSuffix('~Reset.PROC')]#

None

async trigger()[source]#
ophyd_async.epics.demo.start_ioc_subprocess(prefix: str, num_channels: int) TestingIOC[source]#

Start an IOC subprocess for sample stage and sensor.

Parameters:
  • prefix – The prefix for the IOC PVs.

  • num_channels – The number of point detector channels to create.