Avg clean up#203
Conversation
There was a problem hiding this comment.
Pull request overview
This PR focuses on linting and improving type hints in sasdata/data_util/averaging.py to make ROI averaging utilities easier to maintain and safer for future refactors.
Changes:
- Added
numpy.typingusage and updated ndarray return annotations. - Reformatted several class constructors/calls for readability and consistent typing.
- Tightened
__call__signatures across multiple ROI/averaging helper classes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return Data1D(x=phi_centers, y=intensity, dy=error) | ||
|
|
||
|
|
||
| ''' | ||
| """ | ||
| # Convert angular data back to the original phi range | ||
| phi_data += phi_offset | ||
| # In the old manipulations.py, we also had this shift to plot the data |
There was a problem hiding this comment.
Leaving this to be addressed when slicers get refactored.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
krzywon
left a comment
There was a problem hiding this comment.
This all looks reasonable. I would suggest you look at a couple of the Copilot suggestions
There was a problem hiding this comment.
No quality gates enabled for this code.
See analysis details in CodeScene
Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Lint and properly type hint
averaging.pyfor future work.