Skip to content

Save & share#

Load and save data through io, and push results into reports through reporting.

# Library access
io.list_scans()                       # scan IDs in the current project
io.load_scan(some_scan_id)            # load into state.signal/spectrum
io.save_state_as_scan("processed")    # save current data as a new scan

# File formats
io.export_spectrum("out.csv")         # format inferred from extension
io.import_scan("data.jdx")            # JCAMP-DX, Bruker, … into state

Group related scans together as they're saved:

with io.save_group("VT_study/run1"):
    device.execute(sequence)          # saved under VT_study/run1

Long loops can report progress, and you can embed your own values and figures in the generated report:

for temp in reporting.track_progress(range(280, 320, 5), desc="VT sweep"):
    device.set_temperature(temp, unit="K")
    device.execute(sequence, num_accum=8)

reporting.set_data("operator", "A. Researcher")   # shows as {{custom.operator}}
reporting.add_figure("trend", fig)                # embeds the figure