Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

feat: added context manager for scan export

wakonig_k requested to merge scan_export_cm into master


Add decorator to be able to export multiple scans into single csv file.

Example usage:

  1. direct usages
from bec_lib.utils import scan_to_csv
s = scans.line_scan(...)
scan_to_csv(s, "export.csv")

or for multiple scans

s = scans.line_scan(...)
s2 = scans.grid_scan(...)
scan_to_csv([s,s2], export.csv)
  1. context manager
with scans.scan_export("export.csv"):

Note, using the context manager will only create one output for all executed scans

Related Issues

Type of Change

  • introduces decorator for scan definition
  • bugfix for bec_lib.utils.scan_to_dictdue to new data structure ( see #161 (closed))

Potential side effects


Screenshots / GIFs (if applicable)

image image

Additional Comments

merge blocked by #161 (closed)

Definition of Done

  • fix scan_to_dict function
  • add tests for scan_report structure
  • Test context manager usage for multiple scans
  • Add screenshot of example usage
  • Documentation is up-to-date.
Edited by appel_c

Merge request reports