Improve Axis Detector Handling with Flexible tag Support#104
Merged
ambarb merged 12 commits intoNSLS-II-CSX:masterfrom Aug 25, 2025
Merged
Improve Axis Detector Handling with Flexible tag Support#104ambarb merged 12 commits intoNSLS-II-CSX:masterfrom
ambarb merged 12 commits intoNSLS-II-CSX:masterfrom
Conversation
… 'src' from Ruff checks
…d some potential issues
…ors_tag_inIssue100. This is to merge samll fixed to this branch.
Contributor
Author
|
Hi @ambarb @maffettone, I've implemented flexible tag support for Axis Detector Handling. Please review it. |
ambarb
requested changes
Jul 10, 2025
Member
ambarb
left a comment
There was a problem hiding this comment.
docstring nitpicks and one small change related to the new strategy of not relying on a dictionary to add "_image"
ambarb
approved these changes
Jul 11, 2025
Member
|
@nisarnk can you confirm you |
Contributor
Author
Yes, I tried with a couple of detector tags |
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.
This PR addresses issue #100 by improving how axis detectors are handled in the image processing pipeline. Specifically:
Introduces a mapping (detectors[tag]) to resolve user-friendly detector tags (e.g., "axis1", "axis_cont") to internal image keys (e.g., "axis1_image").
Adds validation for unknown or missing tag values, with clear error messages.
Avoids redundant or ambiguous uses of tag by introducing a tag_mapped variable for internal use.
Lays the groundwork for automating tag detection in the future when tag=None.
These changes provide a unified and robust mechanism to handle the diverse requirements of multiple axis detectors while maintaining backward compatibility and improving code readability.