Repair a flyscan master file missing /entry/flyscan_data#

A flyscan NeXus master file (*.hdf) holds its primary product in the /entry/flyscan_data group: the in-scan image substack plus the per-frame motor positions. That group is written at run end only when the area-detector image file is reachable from the master file’s directory through the image-files symlink ({detector}_files, e.g. eiger2_files).

If the symlink was missing or mis-shaped at run end, the master will have /entry/images (the external link) but no /entry/flyscan_data, and a WARNING will be in the run log. Once the symlink is fixed, recover the group with the repair tool.

Step 2 – run the repair tool#

id3c-flyscan-repair /path/to/your/run/20260618-...-S00024-....hdf

The tool:

  1. reads the run uid from the master’s /entry/entry_identifier;

  2. locates the area-detector file from the master’s /entry/images external link (or, if absent, composes it from the ad_file_path / ad_file_name start metadata);

  3. recomputes the per-frame pairing from the authoritative area-detector file; and

  4. writes /entry/flyscan_data (replacing any existing copy) and sets /entry@default = "flyscan_data".

Preview without writing#

id3c-flyscan-repair --dry-run /path/to/.../master.hdf

Point at a specific area-detector file#

If the master cannot resolve the area-detector path (or you want to override it), pass it explicitly:

id3c-flyscan-repair --external-file /net/.../XRDS4_..._000001.h5 \
    /path/to/.../master.hdf

Add -v for INFO-level logging.

When repair is not possible#

The tool exits non-zero and explains the cause if:

  • the master has no run uid (/entry/entry_identifier);

  • the area-detector file cannot be located or does not resolve (most often the symlink from Step 1 is still wrong);

  • the area-detector file is not openable; or

  • pairing produces zero in-scan frames.

The repair reads only the area-detector file (the lossless, authoritative per-frame source). It never falls back to a lossy source, so a repaired /entry/flyscan_data is always the full-count result.