bec_lib.devicemanager.DeviceContainer#
- class DeviceContainer(*args, **kwargs)[source]#
Bases:
dict
Methods
get a list of all synchronous 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
get a list of all continuous devices
Describe all devices associated with the DeviceManager Returns:
Remove all devices from the device manager
Create a new dictionary with keys from iterable and values set to value.
Return the value for key if key is in the dictionary, else default.
Get a list of all devices with the specified tags :param tags: List of tags :type tags: list
get a list of all devices that should receive a software trigger detectors
get a list of all enabled primary devices
get a list of all on request devices
If the key is not found, return the default if given; otherwise, raise a KeyError.
Remove and return a (key, value) pair as a 2-tuple.
get all devices with the specified readout proprity
Insert key with a value of default if key is not in the dictionary.
print all devices
returns a list of used tags in the current config
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]
Get the current position of one or more devices.
Attributes
get a list of disabled 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 #
- property disabled_devices: list#
get a list of disabled devices
- property enabled_devices: list#
get a list of enabled devices
- 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.
- 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'))