Skip to content

Improve Axis Detector Handling with Flexible tag Support#104

Merged
ambarb merged 12 commits intoNSLS-II-CSX:masterfrom
nisarnk:nisar_detectors_tag_inIssue100
Aug 25, 2025
Merged

Improve Axis Detector Handling with Flexible tag Support#104
ambarb merged 12 commits intoNSLS-II-CSX:masterfrom
nisarnk:nisar_detectors_tag_inIssue100

Conversation

@nisarnk
Copy link
Contributor

@nisarnk nisarnk commented Jul 4, 2025

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.

@nisarnk
Copy link
Contributor Author

nisarnk commented Jul 10, 2025

Hi @ambarb @maffettone, I've implemented flexible tag support for Axis Detector Handling. Please review it.

Copy link
Member

@ambarb ambarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docstring nitpicks and one small change related to the new strategy of not relying on a dictionary to add "_image"

@ambarb
Copy link
Member

ambarb commented Jul 22, 2025

@nisarnk can you confirm you get_axis_flatfield() , get_axis_images(), and get_axis_timestamps()with atleast 1 detector tag?

@nisarnk
Copy link
Contributor Author

nisarnk commented Jul 23, 2025

@nisarnk can you confirm you get_axis_flatfield() , get_axis_images(), and get_axis_timestamps()with atleast 1 detector tag?

Yes, I tried with a couple of detector tags

@ambarb ambarb merged commit a77cc7a into NSLS-II-CSX:master Aug 25, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments