Skip to content

Scan: Multi layer sequence + retry

Valentin Valls requested to merge retry-sequence into master

This PR is an attempt to solve tomo/ebs-tomo#96

Closes #4007 (closed)

It provides a new ScanSequence which is a real scan, so can be used with default scan features

  • Add presets
  • Set watchdogs
  • Create and then run a sequence later
  • So we can add a sequence to another sequence
def runner(context: SequenceContext):
    context.emit("my_channel", [1])
    s = loopscan(10, 0.1, run=False)
    context.add_and_run(s)
    context.emit("my_channel", [2, 3])

ch = AcquisitionChannel("my_channel", numpy.float32, ())

scan = ScanSequence(runner=runner, channels=[ch])

scan.add_preset(...)

scan.set_watchdog_callback(...)

scan.run()

The main difference with the implementation of bliss.scanning.group is that the grouping master is responsible of running the user function describing the sequence. This simplifies a lot the implementation.

In the user point of view, the API is not the same, and do not allow to add scans which was already started.

Edited by Valentin Valls

Merge request reports