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, bluesky.protocols.Movable, bluesky.protocols.Stoppable

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

units: Annotated[SignalR[str], PvSuffix('~Readback.EGU'), CONFIG_SIGNAL]#

None

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

None

precision: Annotated[SignalR[int], PvSuffix('~Readback.PREC')]#

None

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

None

set_name(name: str, *, child_name_separator: str | None = None) None[source]#

Set self.name=name and each self.child.name=name+"-child".

Parameters:
  • name – New name to set.

  • child_name_separator – Use this as a separator instead of “-”. Use “_” instead to make the same names as the equivalent ophyd sync device.

async set(new_position: float, timeout: CalculatableTimeout = CALCULATE_TIMEOUT)[source]#
async stop(success=True)[source]#
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[SignalX, PvSuffix('~Start.PROC')]#

None

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

None

reset: Annotated[SignalX, 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.