Skip to content

Enable raster flyer to save asset data#35

Open
vshekar wants to merge 2 commits intoNSLS-II-AMX:mainfrom
vshekar:add-raster-assets
Open

Enable raster flyer to save asset data#35
vshekar wants to merge 2 commits intoNSLS-II-AMX:mainfrom
vshekar:add-raster-assets

Conversation

@vshekar
Copy link
Copy Markdown
Contributor

@vshekar vshekar commented Mar 17, 2026

This pull request refactors the detector arming logic in both mxtools/flyer.py and mxtools/raster_flyer.py to centralize and simplify the configuration of detector parameters. The main changes involve moving repeated logic into a new private method, improving maintainability and consistency between classes, and cleaning up unused or redundant code.

Refactoring and centralization of detector arming logic:

  • Introduced a new _arm_detector method in MXFlyer to handle all detector arming and configuration, consolidating logic that was previously duplicated across methods. The detector_arm methods in both MXFlyer and RasterFlyer now delegate to this shared function, passing the appropriate parameters. [1] [2] [3] [4]

Code cleanup and removal of unused code:

  • Removed commented-out and unused methods such as the old collect_asset_docs implementation and the configure_detector method in RasterFlyer, as well as redundant imports. [1] [2] [3] [4]

These changes make the detector configuration process more robust and easier to maintain by reducing code duplication and clarifying the flow of parameter handling.

Copy link
Copy Markdown
Contributor

@JunAishima JunAishima left a comment

Choose a reason for hiding this comment

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

Looking good so far. please keep this PR updated with results of testing

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