Fix geometry script to resolve depends_on chains through NXlog nodes#696
Draft
SimonHeybrock wants to merge 1 commit intomainfrom
Draft
Fix geometry script to resolve depends_on chains through NXlog nodes#696SimonHeybrock wants to merge 1 commit intomainfrom
SimonHeybrock wants to merge 1 commit intomainfrom
Conversation
The geometry stripping script copies depends_on datasets from detectors and monitors but did not follow the full transformation chain. When a depends_on target is an NXlog group inside an NXpositioner (a streaming motor position that also acts as a transformation node), the script stripped the NXlog data, breaking the chain. This was discovered when generating a LOKI geometry file from a recent data file where loki_detector_0's depends_on points to detector_carriage/value (an NXlog with transformation_type=translation). The fix adds a post-processing pass that follows all depends_on chains in the output file and resolves missing nodes from the source. NXlog transformation nodes are converted to static datasets using their average_value. Prompt: Can you fix the script so we can generate a correct file? Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Summary
make_geometry_nexusto followdepends_onchains that pass through NXlog groups inside NXpositioner (streaming motor positions acting as transformation nodes)average_valueMotivation
When generating a LOKI geometry file from a recent data file,
loki_detector_0'sdepends_onchain passes throughdetector_carriage/value, an NXlog group withtransformation_type=translation. The script stripped this streaming data, leaving a broken chain that causedscippnexusto raise aUserWarningwhen loading detector geometry.Test plan
🤖 Generated with Claude Code