Skip to content

Resolve "Nexus writer: save user metadata at the start"

Closes #3390 (closed)

Saving the metadata BEFORE the data has the following consequences:

  1. Name collisions can crash the scan writing:
DEMO_SESSION [1]: loopscan(1, 0.1, scan_info={"instrument":{"diode1":{"data":[10,20]}}})                                      
!!! === RuntimeError: Nexus writer is in FAULT state (Unable to create link (name already exists)) === !!! ( for more details type cmd 'last_error()' )
  1. Detector data can be modified:
DEMO_SESSION [1]: loopscan(1, 0.1, scan_info={"instrument":{"diode1":{"signal":[10,20]}}})
         Out [1]: Scan(number=2, name=loopscan, path=/tmp/scans/inhouse/id002211/id00/20221101/sample/sample_0010/sample_0010.h5)

The diode1 data will be [10, 20] instead of whatever is measured.

Anyway, I think these are corner cases and should not prevent this feature to be implemented.

Edited by Wout De Nolf

Merge request reports