mirror of
https://github.com/bec-project/bec.git
synced 2026-06-02 00:08:31 +02:00
5.1 KiB
5.1 KiB
(developer.scans.scan_stubs)=
Scan stubs - the building blocks of a scan
In order to simplify the creation of new scans, BEC provides a set of scan stubs that can be used as building blocks for new scans. The scan stubs are located in bec_server/bec_server/scan_server/scan_stubs.py. The following scan stubs are available:
Device operations
set_and_waitSet a device to a value and wait for it to finish.read_and_waitRead a device and wait for it to finish.stageStage a device.unstageUnstage a device.kickoffKickoff a device. Usually only needed for fly scans.completeWait for a device to finish.get_req_statusCheck if a device request status matches the given RID and DIID.get_device_progressGet the progress of a device.pre_scanTrigger the pre_scan method of a device.baseline_readingTrigger the baseline readings.waitWait for an event to finish. Could be a trigger, a readout or a movement.readRead from a device.triggerTrigger a device.setSet a device to a value.rpcSend an RPC command to a device.send_rpc_and_waitSend an RPC command to a device and wait for it to finish.set_with_responseSet a device to a specific value and return the request ID. Use this method as an alternative tokickoffif the device does not supportkickoff.request_is_completedCheck if a request that was initiated withset_with_responseis completed.
Scan operations
open_scanOpen a scan.close_scanClose a scan.publish_data_as_readPublish data as read.open_scan_defOpen a scan definition.close_scan_defClose a scan definition.scan_report_instructionUpdate the scan report instruction.
More information on the scan stubs can be found in the API reference.