Avg clean up#203
Open
jellybean2004 wants to merge 3 commits intomasterfrom
Open
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.
|
|
||
| super().__init__(r_range=r_range, phi_range=phi_range, center = center) | ||
| super().__init__(r_range=r_range, phi_range=phi_range, center=center) | ||
| print(nbins) |
Comment on lines
879
to
884
| 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 |
Comment on lines
+414
to
416
| def __call__(self, data2D: Data2D) -> Data1D: | ||
| """ | ||
| Apply the ring to the data set. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
krzywon
approved these changes
May 7, 2026
Collaborator
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
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.
Lint and properly type hint
averaging.pyfor future work.