BUG: flyscan master file missing /entry/flyscan_data/ group#14
Merged
Conversation
The per-frame timestamp/UID datasets are read from the wrong HDF5 path, so /entry/flyscan_data is never written and the master file is left with only the lossy CA-monitor frame mapping. All 3-ID-C area detectors write NDAttributes under the NXdetector group at /entry/instrument/detector/NDAttributes/, not /entry/instrument/ NDAttributes/. Correct the default dataset paths in the AD-file pairing, expected-frame-count, and repair helpers; update the synthetic test fixtures to the same layout; and document the NeXus layout invariant in AGENTS.md. Also make the "flyscan_data NOT written" outcomes conspicuous: promote the four affected log records from WARNING to ERROR and wrap each message in a banner, since the terse console handler shows only the level's first letter and the warning was easily missed amid INFO chatter.
Coverage Report for CI Build 28132554098Coverage increased (+0.01%) to 64.764%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A flyscan finished but its master file had no
/entry/flyscan_data/group, leaving only the lossy CA-monitor frame mapping (e.g. 14 frames
mapped where 21 were expected). The session log showed:
Root cause
The AD-file pairing reads per-frame
NDArrayTimeStamp/NDArrayUniqueIdfrom
/entry/instrument/NDAttributes/..., but all 3-ID-C area detectorswrite NDAttributes one group level deeper, inside the
NXdetectorgroup:/entry/instrument/detector/NDAttributes/.... TheKeyErroraborted thepairing, so
write_flyscan_datanever ran and the group +/entry@defaultwere never written. The detector file itself was complete (25 valid
frames with timestamps/UIDs) — only the lookup path was wrong.
This single bug explains both user complaints: the AD-file pairing exists
specifically to bypass the known CA-monitor coalescing loss, so when it
aborted, only the degraded CA mapping remained.
Changes
/entry/instrument/detector/...in three helpers:
pair_frames_to_positions_from_ad_file,_expected_frame_count, and_ad_frame_count.detector/layout.AGENTS.md.WARNING -> ERROR and wrap each message in a banner. The console handler
is intentionally terse (shows only the level's first letter), so the
original warning was easily overlooked amid INFO chatter.
Verification
Full test suite passes (
119 passed). Off-network host, so no live EPICSexercised.
Not addressed here
The detector over-acquired (25 frames vs 21 expected) during
deceleration. Separate behavior; did not cause the missing group.