Reference#
Device Classes#
- class SECoPDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
- class SECoPNodeDevice(sec_node_uri: str = '', name: str = '', loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.base.SECoPDevice- async connect(mock=False, timeout=DEFAULT_TIMEOUT, force_reconnect=False)#
- descriptiveDataChange(module, description)#
- nodeStateChange(online, state)#
called when the state of the connection changes
‘online’ is True when connected or reconnecting, False when disconnected or connecting ‘state’ is the connection state as a string
- class SECoPCommunicatorDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
- class SECoPReadableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.base.SECoPDevice,bluesky.protocols.Triggerable,bluesky.protocols.SubscribableStandard readable SECoP device, corresponding to a SECoP module with the interface class “Readable”
Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node
module_name (str) – Name of the SEC Node module that is represented by this device
- async wait_for_idle()#
asynchronously waits until module is IDLE again. this is helpful, for running commands that are not done immediately
- observe_status_change(monitored_status_code: int)#
Plan stub: block until the module’s status code differs from
monitored_status_code.
- trigger() ophyd_async.core.AsyncStatus#
- subscribe_reading(function: ophyd_async.core._utils.Callback[dict[str, bluesky.protocols.Reading]]) None#
Subscribe to updates in the reading. Only supported for an atomic (non-composite) ‘value’ parameter.
- subscribe = None#
- class SECoPAcquisitionDevice(*args, **kwargs)#
Bases:
secop_ophyd.devices.acquisition.control._AcquisitionControl[secop_ophyd.devices.acquisition.channel.AcquisitionGoal | None],secop_ophyd.devices.acquisition.channel.SECoPAcquisitionChannelDeviceSECoP device for a module with the interface class “Acquisition”: a data acquisition with a single channel, in one module. The legacy interface class “Triggerable” maps here too.
It runs like a SECoPAcquisitionControllerDevice whose only channel is the module itself:
trigger()runs one cycle, andread()then gives ‘value’ (and the result of ‘get_data’).prepare()takes an AcquisitionGoal (or None), andcollect_pages()hands over one stream, named after the device.Initialization
- class SECoPAcquisitionControllerDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.acquisition.control._AcquisitionControl[collections.abc.Mapping[str,secop_ophyd.devices.acquisition.channel.AcquisitionGoal]| None],secop_ophyd.devices.base.SECoPDeviceSECoP device for a module with the interface class “AcquisitionController”: the control of a data acquisition whose measured quantities are separate “AcquisitionChannel” modules.
The channels listed in the module property ‘acquisition_channels’ are child devices of the controller, named by their role there (
control.tfor the role “t”), and are no module devices of the node.channelsmaps each role to its channel device.trigger()runs one cycle, andread()then gives the result of every channel.prepare()takes the goals of the channels by role ({"t": AcquisitionGoal(goal=10, enable=True)}) or None, andcollect_pages()hands over one stream per channel, named after the channel. See _AcquisitionControl for the details of a cycle.Initialization
- wait_for_idle = None#
- property channels: dict[str, secop_ophyd.devices.acquisition.channel.SECoPAcquisitionChannelDevice]#
The channel devices by role.
- class SECoPAcquisitionChannelDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.readable.SECoPReadableDeviceSECoP device for a module with the interface class “AcquisitionChannel”: one measured quantity of a data acquisition, whose cycles its SECoPAcquisitionControllerDevice runs. A channel listed by a controller is a child device of that controller, named by its role.
read()gives its ‘value’, and the result of ‘get_data’ if the module has that command. While its controller flies, the channel buffers every update of ‘value’ (unless it has ‘get_data’), for the controller’scollect_pages().SECoPAcquisitionDevice is a controller and a channel in one module.
Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node
module_name (str) – Name of the SEC Node module that is represented by this device
- async read() dict[str, bluesky.protocols.Reading]#
The readings of the module, and the result of ‘get_data’ if the module has that command.
- async describe() dict[str, bluesky.protocols.DataKey]#
- class AcquisitionGoal#
When an acquisition channel ends a cycle: the value given to SECoPAcquisitionDevice.prepare.
- Parameters:
goal – written to the ‘goal’ parameter: the cycle ends when ‘value’ reaches it. None leaves ‘goal’ unchanged.
enable – written to the ‘goal_enable’ parameter: whether the goal ends the cycle at all. None leaves ‘goal_enable’ unchanged. A module with a ‘goal’ but no ‘goal_enable’ always has its goal active.
- class SECoPWritableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.writable.SECoPWritableBase,bluesky.protocols.Locatable[secop_ophyd.devices.writable.T],bluesky.protocols.Checkable[secop_ophyd.devices.writable.T],typing.Generic[secop_ophyd.devices.writable.T]Settable SECoP device, corresponding to a SECoP module with the interface class “Writable”: a module with a ‘target’ but without a ‘stop’ command.
set()writes ‘target’ and waits until the module is not BUSY. For a module whose value follows the target at once that is immediately; a Writable that needs time to reach its target reports BUSY meanwhile. The module must report BUSY by the time it answers the target write, orset()ends at once: SECoP has no other sign that a move has started.locate()returns the setpoint (‘target’) and readback (‘value’).‘target’ and ‘value’ may be of any SECoP datatype. For a struct or tuple, the position is one value in
set()andlocate(), but several data keys inread()anddescribe(), because an event can only hold scalars and arrays:set()takes the whole target: a dict for a struct, a tuple for a tuple.locate()returns setpoint and readback in the same form.read()has one key per member, from the read-only Signalstarget_<member>andvalue_<member>(_0,_1, … for a tuple).locate()["readback"]["x"]is the value ofvalue_x.
set()is the only way to change a struct/tuple target: there is no writable ‘target’ Signal for it. An atomic ‘target’ is also aSignalRW, whoseset()only writes the parameter, without waiting.The type parameter is the type of the target, e.g.
float, or aTypedDictin a generated device class.Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node
module_name (str) – Name of the SEC Node module that is represented by this device
- async check_value(value: secop_ophyd.devices.writable.T) None#
Check that
valueis a valid target, without moving. In mock mode there is no node description to check against, so every value passes.
- async set(value: secop_ophyd.devices.writable.T, timeout: float | None = None) None#
Set the target and wait until the module is not BUSY.
- async locate() bluesky.protocols.Location[secop_ophyd.devices.writable.T]#
Return the current setpoint (‘target’) and readback (‘value’).
- class SECoPMoveableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.drivable.SECoPDrivableBase,ophyd_async.core.StandardMovable[ophyd_async.core.SignalDatatypeT]Standard movable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and ‘value’ are atomic (scalar or array). A Drivable with a struct/tuple ‘target’ or ‘value’ is a SECoPCompositeMoveableDevice.
Initialization
Initialize SECoPMovableDevice
- Parameters:
secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node
module_name (str) – ame of the SEC Node module that is represented by this device
- movable_logic() ophyd_async.core.MovableLogic#
- class SECoPCompositeMoveableDevice(sri: str = '', name: str = '', connector: secop_ophyd.devices.connector.SECoPDeviceConnector | None = None, loglevel=logging.INFO, logdir: str | None = None)#
Bases:
secop_ophyd.devices.drivable.SECoPDrivableBase,secop_ophyd.devices.writable.SECoPWritableDevice[secop_ophyd.devices.writable.T],bluesky.protocols.StoppableMovable SECoP device, corresponding to a SECoP module with the interface class “Drivable” whose ‘target’ and/or ‘value’ is a struct or tuple.
Behaves like SECoPWritableDevice for a struct/tuple, and can be stopped:
set()takes the whole target as a dict or tuple and is the only way to change it,locate()returns setpoint and readback in the same form, andread()has one data key per member. A move reports no progress updates.Initialization
Initializes the SECoPReadableDevice
- Parameters:
secclient (AsyncSecopClient) – SECoP client providing communication to the SEC Node
module_name (str) – Name of the SEC Node module that is represented by this device
- async set(value: secop_ophyd.devices.writable.T, timeout: float | None = None) None#
Move to the given target and wait until the module has left BUSY.