bec_lib.devicemanager.DeviceContainer#

class DeviceContainer(*args, **kwargs)[source]#

Bases: dict

Methods

async_devices

get a list of all synchronous devices

baseline_devices

Get a list of all enabled baseline devices :param scan_motors: list of scan motors :type scan_motors: list :param readout_priority: readout priority :type readout_priority: dict

clear

continuous_devices

get a list of all continuous devices

copy

describe

Describe all devices associated with the DeviceManager Returns:

flush

Remove all devices from the device manager

fromkeys

Create a new dictionary with keys from iterable and values set to value.

get

Return the value for key if key is in the dictionary, else default.

get_devices_with_tags

Get a list of all devices with the specified tags :param tags: List of tags :type tags: list

get_software_triggered_devices

get a list of all devices that should receive a software trigger detectors

items

keys

monitored_devices

get a list of all enabled primary devices

on_request_devices

get a list of all on request devices

pop

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem

Remove and return a (key, value) pair as a 2-tuple.

readout_priority

get all devices with the specified readout proprity

setdefault

Insert key with a value of default if key is not in the dictionary.

show_all

print all devices

show_tags

returns a list of used tags in the current config

update

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values

wm

Get the current position of one or more devices.

Attributes

disabled_devices

get a list of disabled devices

enabled_devices

get a list of enabled devices

async_devices(readout_priority: dict | None = None) list[source]#

get a list of all synchronous devices

baseline_devices(scan_motors: list | None = None, readout_priority: dict | None = None) list[source]#

Get a list of all enabled baseline devices :param scan_motors: list of scan motors :type scan_motors: list :param readout_priority: readout priority :type readout_priority: dict

Returns:

list of baseline devices

Return type:

list

clear() None.  Remove all items from D.#
continuous_devices(readout_priority: dict | None = None) list[source]#

get a list of all continuous devices

copy() a shallow copy of D#
describe() list[source]#

Describe all devices associated with the DeviceManager Returns:

property disabled_devices: list#

get a list of disabled devices

property enabled_devices: list#

get a list of enabled devices

flush() None[source]#

Remove all devices from the device manager

fromkeys(value=None, /)#

Create a new dictionary with keys from iterable and values set to value.

get(key, default=None, /)#

Return the value for key if key is in the dictionary, else default.

get_devices_with_tags(tags: list) list[source]#

Get a list of all devices with the specified tags :param tags: List of tags :type tags: list

Returns:

List of devices with the specified tags

Return type:

list

get_software_triggered_devices() list[source]#

get a list of all devices that should receive a software trigger detectors

items() a set-like object providing a view on D's items#
keys() a set-like object providing a view on D's keys#
monitored_devices(scan_motors: list | None = None, readout_priority: dict | None = None) list[source]#

get a list of all enabled primary devices

on_request_devices(readout_priority: dict | None = None) list[source]#

get a list of all on request devices

pop(k[, d]) v, remove specified key and return the corresponding value.#

If the key is not found, return the default if given; otherwise, raise a KeyError.

popitem()#

Remove and return a (key, value) pair as a 2-tuple.

Pairs are returned in LIFO (last-in, first-out) order. Raises KeyError if the dict is empty.

readout_priority(readout_priority: ReadoutPriority) list[source]#

get all devices with the specified readout proprity

Parameters:

readout_priority (str) – Readout priority (e.g. on_request, baseline, monitored, async, continuous)

Returns:

List of devices that belong to the specified acquisition readoutPriority

Return type:

list

setdefault(key, default=None, /)#

Insert key with a value of default if key is not in the dictionary.

Return the value for key if key is in the dictionary, else default.

show_all(console: Console | None = None) None[source]#

print all devices

show_tags() list[source]#

returns a list of used tags in the current config

update([E, ]**F) None.  Update D from dict/iterable E and F.#

If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values() an object providing a view on D's values#
wm(device_names: list[str | DeviceBase | None] | None = None, *args)[source]#

Get the current position of one or more devices.

Parameters:

device_names (list) – List of device names or Device objects

Examples

>>> dev.wm()
>>> dev.wm('sam*')
>>> dev.wm('samx')
>>> dev.wm(['samx', 'samy'])
>>> dev.wm(dev.monitored_devices())
>>> dev.wm(dev.get_devices_with_tags('user motors'))