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[SignalR] = (), name: str = '', writer_timeout: float = 10.0)[source]#

Bases: Device, Stageable, Configurable, Readable, Triggerable, WritesExternalAssets

Detector with useful default behaviour.

Must be supplied instances of classes that inherit from DetectorControl and DetectorData, to dictate how the detector will be controlled (i.e. arming and disarming) as well as how the detector data will be written (i.e. opening and closing the writer, and handling data writing indices).

NOTE: only for step-scans.

Parameters:
  • control – instance of class which inherits from DetectorControl

  • data – instance of class which inherits from DetectorData

  • name – detector name

Methods

check_config_sigs

Checks configuration signals are named and connected.

children

collect_asset_docs

Collect stream datum documents for all indices written.

connect

Connect self and all child Devices.

describe

describe_configuration

read

Read the detector

read_configuration

set_name

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

stage

Disarm the detector, stop filewriting, and open file for writing.

trigger

Arm the detector and wait for it to finish.

unstage

Stop data writing.

Attributes

controller

name

Return the name of the Device

parent

The parent Device if it exists

writer

async check_config_sigs()[source]#

Checks configuration signals are named and connected.

stage() None[source]#

Disarm the detector, stop filewriting, and open file for writing.

trigger() None[source]#

Arm the detector and wait for it to finish.

async read() Dict[str, Reading][source]#

Read the detector

async collect_asset_docs() AsyncIterator[Tuple[Literal['resource'], PartialResource] | Tuple[Literal['datum'], Datum] | Tuple[Literal['stream_resource'], StreamResource] | Tuple[Literal['stream_datum'], StreamDatum]][source]#

Collect stream datum documents for all indices written.

unstage() None[source]#

Stop data writing.

async connect(sim: bool = False, timeout: float = 10.0)#

Connect self and all child Devices.

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

Parameters:
  • sim – If True then connect in simulation mode.

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

property name: str#

Return the name of the Device

set_name(name: str)#

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

Parameters:

name – New name to set