Note

Ophyd async is included on a provisional basis until the v1.0 release and may change API on minor release numbers before then

ophyd_async.core.StandardDetector#

class ophyd_async.core.StandardDetector(controller: DetectorControl, writer: DetectorWriter, config_sigs: Sequence[AsyncReadable] = (), name: str = '')[source]#

Bases: Device, Stageable, AsyncConfigurable, AsyncReadable, Triggerable, Preparable, Flyable, Collectable, WritesStreamAssets, Generic[T]

Useful detector base class for step and fly scanning detectors. Aggregates controller and writer logic together.

Constructor

Args:

controller: Logic for arming and disarming the detector writer: Logic for making the detector write persistent data config_sigs: Signals to read when describe and read configuration are called. Defaults to (). name: Device name. Defaults to “”.

Methods

children

collect_asset_docs

complete

connect

Connect self and all child Devices.

describe

describe_collect

describe_configuration

get_index

kickoff

prepare

read

read_configuration

set_name

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

stage

trigger

unstage

Attributes

controller

log

name

Return the name of the Device

parent

The parent Device if it exists

writer

property controller: DetectorControl#
property writer: DetectorWriter#
stage() None[source]#
unstage() None[source]#
async read_configuration() Dict[str, Reading][source]#
async describe_configuration() Dict[str, DataKey][source]#
async read() Dict[str, Reading][source]#
async describe() Dict[str, DataKey][source]#
trigger() None[source]#
prepare(value: T) AsyncStatus[source]#
kickoff()[source]#
complete()[source]#
async describe_collect() Dict[str, DataKey][source]#
async collect_asset_docs(index: int | None = None) AsyncIterator[Tuple[Literal['stream_resource'], StreamResource] | Tuple[Literal['stream_datum'], StreamDatum]][source]#
async get_index() int[source]#
children() Iterator[Tuple[str, Device]]#
async connect(mock: bool = False, timeout: float = 10.0, force_reconnect: bool = False)#

Connect self and all child Devices.

Contains a timeout that gets propagated to child.connect methods.

Parameters:
  • mock – If True then use MockSignalBackend for all Signals

  • timeout – Time to wait before failing with a TimeoutError.

property log#
property name: str#

Return the name of the Device

parent: Device | None = None#

The parent Device if it exists

set_name(name: str)#

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

Parameters:

name – New name to set