Engine#
- class baecon.engine.abort#
Used to stop all threads with keyboard input
'abort'.
- baecon.engine.consecutive_measurement(scan_collection: dict, acquisition_devices: dict, data_queue: queue.Queue, abort: baecon.engine.engine.abort) None#
- Performs measurement in order of scans listed in scan_collection.
The scan underneath will finish before the scan above moves on to the next point.
- Parameters
scan_collection (dict) – Collection of scans for the measurement to perform
acquisition_devices (dict) – Devices for acquiring data
data_queue (queue.Queue) – Queue use to pass measurement to the data thread
abort (abort) – Exits measurement if
abort.flag == True
- baecon.engine.make_scan_list(scan_collection: dict) list#
- Builds a list of scans from the scan settings of each entry in the
scan collection.
- Parameters
scan_collection (dict) – Scan collection from
Measurement_Settings- Returns
List of scans to perform
- Return type
list
- baecon.engine.scan_recursion(scan_list: dict, acquisition_methods: dict, data_queue: queue.Queue, parameter_holder: dict, total_depth: int, present_depth: int, abort: baecon.engine.engine.abort) None#
- Peforms measurement scan with supplied.
At each parameter all acquisiton deivces will be called in the order they appear in acquisition_methods. The scan is performed recursively in the order the scans a listed in scan_list.
- Parameters
scan_list (dict) – Scans to perform.
acquisition_methods (dict) – Devices that will acquire data on each measurement
data_queue (queue.Queue) – Holder of data used to pass data from the measurement thread to the data thread.
parameter_holder (dict) – Current list of parameter settings. Used to keep track of recursion in data.
total_depth (int) – The total number of scans, i.e. how many nested loops are used in the scan.
present_depth (int) – Depth of current position in nested loops. Used to keep track of recursion.
abort (abort) – :py:class:abort used to break loop recursion.