id3c.utils.flyscan_repair#
Repair tool: add /entry/flyscan_data to an existing master file.
A flyscan master file is missing /entry/flyscan_data when the
area-detector file was not reachable at run end (most commonly the
image-files symlink next to the master was missing or mis-shaped).
Once the symlink is fixed, this tool recomputes the per-frame pairing
and writes the group, producing the same on-disk layout the live plan
would have written.
Console script (see pyproject.toml):
id3c-flyscan-repair MASTER.hdf [--external-file PATH] [--dry-run]
The run is identified by the uid stored in the master file at
/entry/entry_identifier; the catalog is read from
id3c.startup.cat. The area-detector file is located from the
master’s existing /entry/images external link, or composed from
the ad_file_path / ad_file_name start-document metadata.
Attributes#
Functions#
|
Return the run uid stored in the master file, or None. |
|
Return the area-detector file path resolvable from the master. |
|
Recompute and write |
|
Console-script entry point. |
Module Contents#
- id3c.utils.flyscan_repair.read_run_uid(master_file)[source]#
Return the run uid stored in the master file, or None.
- id3c.utils.flyscan_repair.resolve_external_file(master_file)[source]#
Return the area-detector file path resolvable from the master.
Prefers the existing
/entry/imagesexternal-link target (resolved relative to the master’s directory through the image-files symlink). Falls back to composing the IOC path from thead_file_path/ad_file_namestart metadata. ReturnsNoneif neither is available.
- id3c.utils.flyscan_repair.repair_master_file(master_file, *, external_file=None, dry_run=False)[source]#
Recompute and write
/entry/flyscan_dataintomaster_file.Returns a summary dict. Raises on unrecoverable conditions (no uid, no AD file, AD file not openable, 0 paired frames) so the CLI can report a non-zero exit.