bec_lib.scans.Scans#

class Scans(parent)[source]#

Bases: object

Scans is a class for available scans in BEC

Methods

get_arg_type

translate type string into python type

prepare_scan_request

Prepare scan request message with given scan arguments

scan_export

Context manager / decorator for exporting scans

Attributes

dataset_id_on_hold

Context manager / decorator for setting the dataset id on hold

hide_report

Context manager / decorator for hiding the report

scan_def

Context manager / decorator for defining new scans

scan_group

Context manager / decorator for defining scan groups

property dataset_id_on_hold#

Context manager / decorator for setting the dataset id on hold

static get_arg_type(in_type: str)[source]#

translate type string into python type

property hide_report#

Context manager / decorator for hiding the report

static prepare_scan_request(scan_name: str, scan_info: dict, *args, **kwargs) ScanQueueMessage[source]#

Prepare scan request message with given scan arguments

Parameters:
  • scan_name (str) – scan name (matching a scan name on the scan server)

  • scan_info (dict) – dictionary describing the scan (e.g. doc string, required kwargs etc.)

Raises:
  • TypeError – Raised if not all required keyword arguments have been specified.

  • TypeError – Raised if the number of args do fit into the required bundling pattern.

  • TypeError – Raised if an argument is not of the required type as specified in scan_info.

Returns:

scan request message

Return type:

messages.ScanQueueMessage

property scan_def#

Context manager / decorator for defining new scans

scan_export(output_file: str)[source]#

Context manager / decorator for exporting scans

property scan_group#

Context manager / decorator for defining scan groups