ophyd_async.epics.adcore#

Core components of the areaDetector software.

https://github.com/areaDetector/ADCore

Package Contents#

Classes#

ADBaseDataType

Some members should exist in the Backend, and there should be no extras.

ADBaseColorMode

Some members should exist in the Backend, and there should be no extras.

NDArrayBaseIO

Class responsible for passing detector data from drivers to pluglins.

ADImageMode

All members should exist in the Backend, but there may be extras.

ADState

Default set of states of an AreaDetector driver.

ADBaseIO

Base class from which areaDetector drivers are derived.

NDPluginBaseIO

Base class from which plugins are derived.

NDROIIO

Plugin for taking a region of an NDArray.

NDStatsIO

Plugin for computing statistics from an image or ROI within an image.

NDROIStatNIO

Defines the parameters for a single ROI used for statistics calculation.

NDROIStatIO

Plugin for calculating basic statistics for multiple ROIs.

NDCBFlushOnSoftTrgMode

All members should exist in the Backend, and there will be no extras.

NDCircularBuffIO

Plugin for flow control of arrays based on NDAttributes.

ADFileWriteMode

All members should exist in the Backend, and there will be no extras.

NDFileIO

Base class from which file writing drivers are derived.

NDPluginFileIO

Base class from which file plugins are derived.

ADCompression

All members should exist in the Backend, and there will be no extras.

NDFileHDF5IO

Plugin for storing data in HDF5 file format.

ADContAcqTriggerLogic

Logic for configuring detector triggering modes.

ADArmLogic

Abstract base class for detector arming and disarming logic.

ADContAcqArmLogic

Abstract base class for detector arming and disarming logic.

NDArrayDescription

PluginSignalDataLogic

Abstract base class for detector data logic and handling.

ADHDFDataLogic

Data logic for AreaDetector HDF5 writer plugin.

ADMultipartDataLogic

Data logic for multipart AreaDetector file writers (e.g. JPEG, TIFF).

ADWriterType

Create a collection of name/value pairs.

AreaDetector

Detector base class for step and fly scanning detectors.

ContAcqDetector

Create an ADSimDetector AreaDetector instance.

NDAttributeDataType

Create a collection of name/value pairs.

NDAttributePvDbrType

Create a collection of name/value pairs.

NDAttributePv

NDAttributeParam

Functions#

prepare_exposures

ndattributes_to_xml

Convert a set of NDAttribute params to XML.

setup_ndattributes

setup_ndstats_sum

Set up nd stats sum nd attribute for a detector.

API#

class ophyd_async.epics.adcore.ADBaseDataType[source]#

Bases: ophyd_async.core.SupersetEnum

Some members should exist in the Backend, and there should be no extras.

INT8#

‘Int8’

UINT8#

‘UInt8’

INT16#

‘Int16’

UINT16#

‘UInt16’

INT32#

‘Int32’

UINT32#

‘UInt32’

INT64#

‘Int64’

UINT64#

‘UInt64’

FLOAT32#

‘Float32’

FLOAT64#

‘Float64’

UNDEFINED = <Multiline-String>#
class ophyd_async.epics.adcore.ADBaseColorMode[source]#

Bases: ophyd_async.core.SupersetEnum

Some members should exist in the Backend, and there should be no extras.

MONO#

‘Mono’

BAYER#

‘Bayer’

RGB1#

‘RGB1’

RGB2#

‘RGB2’

RGB3#

‘RGB3’

YUV444#

‘YUV444’

YUV422#

‘YUV422’

YUV421#

‘YUV421’

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

Bases: ophyd_async.epics.core.EpicsDevice

Class responsible for passing detector data from drivers to pluglins.

This mirrors the interface provided by ADCore/db/NDArrayBase.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDArray.html

port_name: Annotated[SignalR[str], PvSuffix('PortName_RBV')]#

None

unique_id: Annotated[SignalR[int], PvSuffix('UniqueId_RBV')]#

None

nd_attributes_file: Annotated[SignalRW[str], PvSuffix('NDAttributesFile')]#

None

acquire: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('Acquire'), EpicsOptions(wait=non_zero)]#

None

array_size_x: Annotated[SignalR[int], PvSuffix('ArraySizeX_RBV')]#

None

array_size_y: Annotated[SignalR[int], PvSuffix('ArraySizeY_RBV')]#

None

array_size_z: Annotated[SignalR[int], PvSuffix('ArraySizeZ_RBV')]#

None

array_size0: Annotated[SignalR[int], PvSuffix('ArraySize0_RBV')]#

None

array_size1: Annotated[SignalR[int], PvSuffix('ArraySize1_RBV')]#

None

array_size2: Annotated[SignalR[int], PvSuffix('ArraySize2_RBV')]#

None

color_mode: Annotated[SignalR[ADBaseColorMode], PvSuffix('ColorMode_RBV')]#

None

data_type: Annotated[SignalR[ADBaseDataType], PvSuffix('DataType_RBV')]#

None

array_counter: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('ArrayCounter')]#

None

wait_for_plugins: Annotated[SignalRW[bool], PvSuffix('WaitForPlugins')]#

None

ad_core_version: Annotated[SignalR[str], PvSuffix('ADCoreVersion_RBV')]#

None

driver_version: Annotated[SignalR[str], PvSuffix('DriverVersion_RBV')]#

None

manufacturer: Annotated[SignalR[str], PvSuffix('Manufacturer_RBV')]#

None

model: Annotated[SignalR[str], PvSuffix('Model_RBV')]#

None

serial_number: Annotated[SignalR[str], PvSuffix('SerialNumber_RBV')]#

None

sdk_version: Annotated[SignalR[str], PvSuffix('SDKVersion_RBV')]#

None

firmware_version: Annotated[SignalR[str], PvSuffix('FirmwareVersion_RBV')]#

None

class ophyd_async.epics.adcore.ADImageMode[source]#

Bases: ophyd_async.core.SubsetEnum

All members should exist in the Backend, but there may be extras.

SINGLE#

‘Single’

MULTIPLE#

‘Multiple’

CONTINUOUS#

‘Continuous’

class ophyd_async.epics.adcore.ADState[source]#

Bases: ophyd_async.core.StrictEnum

Default set of states of an AreaDetector driver.

See definition in ADApp/ADSrc/ADDriver.h in https://github.com/areaDetector/ADCore.

IDLE#

‘Idle’

ACQUIRE#

‘Acquire’

READOUT#

‘Readout’

CORRECT#

‘Correct’

SAVING#

‘Saving’

ABORTING#

‘Aborting’

ERROR#

‘Error’

WAITING#

‘Waiting’

INITIALIZING#

‘Initializing’

DISCONNECTED#

‘Disconnected’

ABORTED#

‘Aborted’

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

Bases: ophyd_async.epics.adcore._io.NDArrayBaseIO

Base class from which areaDetector drivers are derived.

This mirrors the interface provided by ADCore/db/ADBase.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/ADDriver.html

acquire_time: Annotated[SignalRW[float], ophyd_async.epics.core.PvSuffix.rbv('AcquireTime')]#

None

acquire_period: Annotated[SignalRW[float], ophyd_async.epics.core.PvSuffix.rbv('AcquirePeriod')]#

None

num_images: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('NumImages')]#

None

image_mode: Annotated[SignalRW[ADImageMode], ophyd_async.epics.core.PvSuffix.rbv('ImageMode')]#

None

detector_state: Annotated[SignalR[ADState], PvSuffix('DetectorState_RBV')]#

None

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

Bases: ophyd_async.epics.adcore._io.NDArrayBaseIO

Base class from which plugins are derived.

This mirrors the interface provided by ADCore/db/NDPluginBase.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginDriver.html

nd_array_port: Annotated[SignalRW[str], ophyd_async.epics.core.PvSuffix.rbv('NDArrayPort')]#

None

enable_callbacks: Annotated[SignalRW[EnableDisable], ophyd_async.epics.core.PvSuffix.rbv('EnableCallbacks')]#

None

nd_array_address: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('NDArrayAddress')]#

None

queue_size: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('QueueSize')]#

None

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

Bases: ophyd_async.epics.adcore._io.NDPluginBaseIO

Plugin for taking a region of an NDArray.

This mirrors the interface provided by ADCore/db/NDROI.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginROI.html

size_x: Annotated[SignalR[int], ophyd_async.epics.core.PvSuffix.rbv('SizeX')]#

None

size_y: Annotated[SignalR[int], ophyd_async.epics.core.PvSuffix.rbv('SizeY')]#

None

size_z: Annotated[SignalR[int], ophyd_async.epics.core.PvSuffix.rbv('SizeZ')]#

None

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

Bases: ophyd_async.epics.adcore._io.NDPluginBaseIO

Plugin for computing statistics from an image or ROI within an image.

This mirrors the interface provided by ADCore/db/NDStats.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginStats.html

compute_statistics: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('ComputeStatistics')]#

None

bgd_width: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('BgdWidth')]#

None

total: Annotated[SignalR[float], ophyd_async.epics.core.PvSuffix.rbv('Total')]#

None

compute_centroid: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('ComputeCentroid')]#

None

centroid_threshold: Annotated[SignalRW[float], ophyd_async.epics.core.PvSuffix.rbv('CentroidThreshold')]#

None

compute_profiles: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('ComputeProfiles')]#

None

profile_size_x: Annotated[SignalR[int], ophyd_async.epics.core.PvSuffix.rbv('ProfileSizeX')]#

None

profile_size_y: Annotated[SignalR[int], ophyd_async.epics.core.PvSuffix.rbv('ProfileSizeY')]#

None

cursor_x: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('CursorX')]#

None

cursor_y: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('CursorY')]#

None

compute_histogram: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('ComputeHistogram')]#

None

hist_size: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('HistSize')]#

None

hist_min: Annotated[SignalRW[float], ophyd_async.epics.core.PvSuffix.rbv('HistMin')]#

None

hist_max: Annotated[SignalRW[float], ophyd_async.epics.core.PvSuffix.rbv('HistMax')]#

None

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

Bases: ophyd_async.epics.core.EpicsDevice

Defines the parameters for a single ROI used for statistics calculation.

Each instance represents a single ROI, with attributes for its position (min_x, min_y) and size (size_x, size_y), as well as a name and use status.

This mirrors the interface provided by ADCore/db/NDROIStatN.template. See definition in ADApp/pluginSrc/NDPluginROIStat.h in https://github.com/areaDetector/ADCore.

Attributes: name: The name of the ROI. use: Flag indicating whether the ROI is used. min_x: The start X-coordinate of the ROI. min_y: The start Y-coordinate of the ROI. size_x: The width of the ROI. size_y: The height of the ROI. min_value: Minimum count value in the ROI. max_value: Maximum count value in the ROI. mean_value: Mean counts value in the ROI. total: Total counts in the ROI.

name_: Annotated[SignalRW[str], PvSuffix('Name')]#

None

use: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('Use')]#

None

min_x: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('MinX')]#

None

min_y: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('MinY')]#

None

size_x: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('SizeX')]#

None

size_y: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('SizeY')]#

None

min_value: Annotated[SignalR[float], PvSuffix('MinValue_RBV')]#

None

max_value: Annotated[SignalR[float], PvSuffix('MaxValue_RBV')]#

None

mean_value: Annotated[SignalR[float], PvSuffix('MeanValue_RBV')]#

None

total: Annotated[SignalR[float], PvSuffix('Total_RBV')]#

None

class ophyd_async.epics.adcore.NDROIStatIO(prefix, num_channels=8, with_pvi=False, name='')[source]#

Bases: ophyd_async.epics.adcore._io.NDPluginBaseIO

Plugin for calculating basic statistics for multiple ROIs.

Each ROI is implemented as an instance of NDROIStatNIO, and the collection of ROIs is held as a DeviceVector.

This mirrors the interface provided by ADCore/db/NDROIStat.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginROIStat.html

class ophyd_async.epics.adcore.NDCBFlushOnSoftTrgMode[source]#

Bases: ophyd_async.core.StrictEnum

All members should exist in the Backend, and there will be no extras.

ON_NEW_IMAGE#

‘OnNewImage’

IMMEDIATELY#

‘Immediately’

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

Bases: ophyd_async.epics.adcore._io.NDPluginBaseIO

Plugin for flow control of arrays based on NDAttributes.

This mirrors the interface provided by ADCore/db/NDCircularBuff.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginCircularBuff.html

pre_count: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('PreCount')]#

None

post_count: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('PostCount')]#

None

preset_trigger_count: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('PresetTriggerCount')]#

None

trigger: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('Trigger'), EpicsOptions(wait=non_zero)]#

None

capture: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('Capture'), EpicsOptions(wait=non_zero)]#

None

flush_on_soft_trg: Annotated[SignalRW[NDCBFlushOnSoftTrgMode], ophyd_async.epics.core.PvSuffix.rbv('FlushOnSoftTrg')]#

None

class ophyd_async.epics.adcore.ADFileWriteMode[source]#

Bases: ophyd_async.core.StrictEnum

All members should exist in the Backend, and there will be no extras.

SINGLE#

‘Single’

CAPTURE#

‘Capture’

STREAM#

‘Stream’

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

Bases: ophyd_async.epics.adcore._io.NDArrayBaseIO

Base class from which file writing drivers are derived.

This mirrors the interface provided by ADCore/ADApp/Db/NDFile.template. It does not include any plugin-related fields, for that see NDFilePluginIO.

file_path: Annotated[SignalRW[str], ophyd_async.epics.core.PvSuffix.rbv('FilePath')]#

None

file_name: Annotated[SignalRW[str], ophyd_async.epics.core.PvSuffix.rbv('FileName')]#

None

file_path_exists: Annotated[SignalR[bool], PvSuffix('FilePathExists_RBV')]#

None

file_template: Annotated[SignalRW[str], ophyd_async.epics.core.PvSuffix.rbv('FileTemplate')]#

None

full_file_name: Annotated[SignalR[str], PvSuffix('FullFileName_RBV')]#

None

file_number: Annotated[SignalRW[int], PvSuffix('FileNumber')]#

None

auto_increment: Annotated[SignalRW[bool], PvSuffix('AutoIncrement')]#

None

file_write_mode: Annotated[SignalRW[ADFileWriteMode], ophyd_async.epics.core.PvSuffix.rbv('FileWriteMode')]#

None

num_capture: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('NumCapture')]#

None

num_captured: Annotated[SignalR[int], PvSuffix('NumCaptured_RBV')]#

None

capture: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('Capture'), EpicsOptions(wait=non_zero)]#

None

array_size0: Annotated[SignalR[int], PvSuffix('ArraySize0')]#

None

array_size1: Annotated[SignalR[int], PvSuffix('ArraySize1')]#

None

create_directory: Annotated[SignalRW[int], PvSuffix('CreateDirectory')]#

None

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

Bases: ophyd_async.epics.adcore._io.NDPluginBaseIO, ophyd_async.epics.adcore._io.NDFileIO

Base class from which file plugins are derived.

This mirrors the interface provided by ADCore/db/NDFile.template when added to NDPluginBase.template See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDPluginFile.html

class ophyd_async.epics.adcore.ADCompression[source]#

Bases: ophyd_async.core.StrictEnum

All members should exist in the Backend, and there will be no extras.

NONE#

‘None’

NBIT#

‘N-bit’

SZIP#

‘szip’

ZLIB#

‘zlib’

BLOSC#

‘Blosc’

BSLZ4#

‘BSLZ4’

LZ4#

‘LZ4’

JPEG#

‘JPEG’

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

Bases: ophyd_async.epics.adcore._io.NDPluginFileIO

Plugin for storing data in HDF5 file format.

This mirrors the interface provided by ADCore/db/NDFileHDF5.template. See HTML docs at https://areadetector.github.io/areaDetector/ADCore/NDFileHDF5.html

position_mode: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('PositionMode')]#

None

compression: Annotated[SignalRW[ADCompression], ophyd_async.epics.core.PvSuffix.rbv('Compression')]#

None

num_extra_dims: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('NumExtraDims')]#

None

swmr_mode: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('SWMRMode')]#

None

flush_now: Annotated[SignalRW[bool], PvSuffix('FlushNow')]#

None

xml_file_name: Annotated[SignalRW[str], ophyd_async.epics.core.PvSuffix.rbv('XMLFileName')]#

None

num_frames_chunks: Annotated[SignalRW[int], ophyd_async.epics.core.PvSuffix.rbv('NumFramesChunks')]#

None

chunk_size_auto: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('ChunkSizeAuto')]#

None

lazy_open: Annotated[SignalRW[bool], ophyd_async.epics.core.PvSuffix.rbv('LazyOpen')]#

None

async ophyd_async.epics.adcore.prepare_exposures(driver: ADBaseIO, num: int, livetime: float = 0.0, deadtime: float = 0.0)[source]#
class ophyd_async.epics.adcore.ADContAcqTriggerLogic(driver: ADBaseIO, cb_plugin: NDCircularBuffIO)[source]#

Bases: ophyd_async.core.DetectorTriggerLogic

Logic for configuring detector triggering modes.

This class defines the interface for detector trigger configuration, handling both internal and external triggering modes. Implementations should provide detector-specific logic for preparing the detector to operate in different trigger modes and manage exposure parameters.

The class manages:

  • Configuration signals that should appear in detector metadata

  • Deadtime calculations based on detector configuration

  • Preparation for internal (self-triggered) exposures

  • Preparation for external edge-triggered exposures

  • Preparation for external level-triggered exposures

  • Multi-exposure collection batching

Subclasses must implement the appropriate prepare_* method for any trigger mode the detector supports, get_deadtime if it supports external triggering, and config_sigs if the deadtime would vary according to detector parameters.

async prepare_internal(num: int, livetime: float, deadtime: float)[source]#

Prepare the detector to take internally triggered exposures.

Parameters:
  • num – the number of exposures to take

  • livetime – how long the exposure should be, 0 means what is currently set

  • deadtime – how long between exposures, 0 means the shortest possible

class ophyd_async.epics.adcore.ADArmLogic(driver: ADBaseIO, driver_armed_signal: SignalR[bool] | None = None)[source]#

Bases: ophyd_async.core.DetectorArmLogic

Abstract base class for detector arming and disarming logic.

Implementations must provide methods to arm the detector, wait for it to become idle, and disarm it. This interface allows for detector-specific behavior during the arm/disarm lifecycle.

async arm()[source]#

Arm the detector, waiting until it is armed.

async wait_for_idle()[source]#

Wait for the detector to be disarmed or idle.

async disarm()[source]#

Disarm the detector, return detector to an idle state.

class ophyd_async.epics.adcore.ADContAcqArmLogic(driver: ADBaseIO, cb_plugin: NDCircularBuffIO)[source]#

Bases: ophyd_async.core.DetectorArmLogic

Abstract base class for detector arming and disarming logic.

Implementations must provide methods to arm the detector, wait for it to become idle, and disarm it. This interface allows for detector-specific behavior during the arm/disarm lifecycle.

async arm()[source]#

Arm the detector, waiting until it is armed.

async wait_for_idle()[source]#

Wait for the detector to be disarmed or idle.

async disarm()[source]#

Disarm the detector, return detector to an idle state.

class ophyd_async.epics.adcore.NDArrayDescription[source]#
shape_signals: Sequence[SignalR[int]]#

None

data_type_signal: SignalR[ADBaseDataType]#

None

color_mode_signal: SignalR[ADBaseColorMode]#

None

class ophyd_async.epics.adcore.PluginSignalDataLogic[source]#

Bases: ophyd_async.core.DetectorDataLogic

Abstract base class for detector data logic and handling.

Implementations must implement either prepare_unbounded for data sources that work with step scans as well as flyscans, or prepare_single for those that only work with step scans.

driver: ADBaseIO#

None

signal: SignalR#

None

hinted: bool#

True

async prepare_single(detector_name: str) SignalDataProvider[source]#

Provider can only work for a single event.

get_hinted_fields(detector_name: str) Sequence[str][source]#

Return the hinted streams.

class ophyd_async.epics.adcore.ADHDFDataLogic[source]#

Bases: ophyd_async.core.DetectorDataLogic

Data logic for AreaDetector HDF5 writer plugin.

Parameters:
  • shape_signals – Signals that provide the shape of the NDArray.

  • data_type_signal – Signal that provides the data type of the NDArray.

  • path_provider – Callable that provides path information for file writing.

  • driver – The AreaDetector driver instance.

  • writer – The NDFileHDFIO plugin instance.

  • plugins – Additional NDPluginBaseIO instances to extract NDAttributes from.

  • datakey_suffix – Suffix to append to the data key for the main dataset

description: NDArrayDescription#

None

path_provider: PathProvider#

None

driver: ADBaseIO#

None

writer: NDFileHDF5IO#

None

plugins: Sequence[NDPluginBaseIO]#

()

datakey_suffix: str = <Multiline-String>#
async prepare_unbounded(detector_name: str) StreamableDataProvider[source]#

Provider can work for an unbounded number of collections.

async stop() None[source]#

Stop taking data.

get_hinted_fields(detector_name: str) Sequence[str][source]#

Return the hinted streams.

class ophyd_async.epics.adcore.ADMultipartDataLogic[source]#

Bases: ophyd_async.core.DetectorDataLogic

Data logic for multipart AreaDetector file writers (e.g. JPEG, TIFF).

Parameters:
  • shape_signals – Signals that provide the shape of the NDArray.

  • data_type_signal – Signal that provides the data type of the NDArray.

  • path_provider – Callable that provides path information for file writing.

  • writer – The NDFilePluginIO instance.

  • extension – File extension for the written files (e.g. “.jpg”, “.tiff”).

  • mimetype – Mimetype for the written files (e.g. “multipart/related;type=image/jpeg”).

  • datakey_suffix – Suffix to append to the data key for the main dataset

description: NDArrayDescription#

None

path_provider: PathProvider#

None

writer: NDPluginFileIO#

None

extension: str#

None

mimetype: str#

None

datakey_suffix: str = <Multiline-String>#
async prepare_unbounded(detector_name: str) StreamableDataProvider[source]#

Provider can work for an unbounded number of collections.

async stop() None[source]#

Stop taking data.

get_hinted_fields(detector_name: str) Sequence[str][source]#

Return the hinted streams.

class ophyd_async.epics.adcore.ADWriterType(*args, **kwds)[source]#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum): … RED = 1 … BLUE = 2 … GREEN = 3

Access them by:

  • attribute access::

Color.RED <Color.RED: 1>

  • value lookup:

Color(1) <Color.RED: 1>

  • name lookup:

Color[‘RED’] <Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

len(Color) 3

list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

HDF#

‘HDF’

JPEG#

‘JPEG’

TIFF#

‘TIFF’

class ophyd_async.epics.adcore.AreaDetector(driver: ADBaseIOT, arm_logic: DetectorArmLogic | None = None, trigger_logic: DetectorTriggerLogic | None = None, path_provider: PathProvider | None = None, writer_type: ADWriterType | None = ADWriterType.HDF, prefix: str = '', writer_suffix: str | None = None, plugins: Mapping[str, NDPluginBaseIO] | None = None, config_sigs: Sequence[SignalR] = (), name: str = '')[source]#

Bases: ophyd_async.core.StandardDetector, typing.Generic[ophyd_async.epics.adcore._io.ADBaseIOT]

Detector base class for step and fly scanning detectors.

Aggregates trigger, arm, reading or stream logic together.

get_plugin(name: str, plugin_type: type[NDPluginBaseIOT] = NDPluginBaseIO) NDPluginBaseIOT[source]#
class ophyd_async.epics.adcore.ContAcqDetector(prefix: str, path_provider: PathProvider | None = None, driver_suffix='cam1:', cb_suffix='CB1:', writer_type: ADWriterType | None = ADWriterType.HDF, writer_suffix: str | None = None, plugins: dict[str, NDPluginBaseIO] | None = None, config_sigs: Sequence[SignalR] = (), name: str = '')[source]#

Bases: ophyd_async.epics.adcore._detector.AreaDetector[ophyd_async.epics.adcore._io.ADBaseIO]

Create an ADSimDetector AreaDetector instance.

Parameters:
  • prefix – EPICS PV prefix for the detector

  • path_provider – Provider for file paths during acquisition

  • driver_suffix – Suffix for the driver PV, defaults to “cam1:”

  • writer_type – Type of file writer (HDF or TIFF)

  • writer_suffix – Suffix for the writer PV

  • plugins – Additional areaDetector plugins to include

  • config_sigs – Additional signals to include in configuration

  • name – Name for the detector device

class ophyd_async.epics.adcore.NDAttributeDataType(*args, **kwds)[source]#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum): … RED = 1 … BLUE = 2 … GREEN = 3

Access them by:

  • attribute access::

Color.RED <Color.RED: 1>

  • value lookup:

Color(1) <Color.RED: 1>

  • name lookup:

Color[‘RED’] <Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

len(Color) 3

list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

INT#

None

INT64#

None

DOUBLE#

None

STRING#

‘S40’

class ophyd_async.epics.adcore.NDAttributePvDbrType(*args, **kwds)[source]#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

class Color(Enum): … RED = 1 … BLUE = 2 … GREEN = 3

Access them by:

  • attribute access::

Color.RED <Color.RED: 1>

  • value lookup:

Color(1) <Color.RED: 1>

  • name lookup:

Color[‘RED’] <Color.RED: 1>

Enumerations can be iterated over, and know how many members they have:

len(Color) 3

list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

DBR_SHORT#

None

DBR_ENUM#

None

DBR_INT#

None

DBR_LONG#

None

DBR_FLOAT#

None

DBR_DOUBLE#

None

DBR_STRING#

‘S40’

DBR_CHAR#

None

class ophyd_async.epics.adcore.NDAttributePv[source]#
name: str#

None

signal: SignalR#

None

dbrtype: NDAttributePvDbrType#

None

description: str = <Multiline-String>#
class ophyd_async.epics.adcore.NDAttributeParam[source]#
name: str#

None

param: str#

None

datatype: NDAttributeDataType#

None

addr: int#

0

description: str = <Multiline-String>#
ophyd_async.epics.adcore.ndattributes_to_xml(ndattributes: Sequence[NDAttributeParam | NDAttributePv]) str[source]#

Convert a set of NDAttribute params to XML.

ophyd_async.epics.adcore.setup_ndattributes(device: NDArrayBaseIO, ndattributes: Sequence[NDAttributeParam | NDAttributePv])[source]#
ophyd_async.epics.adcore.setup_ndstats_sum(detector: AreaDetector, stats_name: str = 'stats')[source]#

Set up nd stats sum nd attribute for a detector.