Skip to content

Avg clean up#203

Open
jellybean2004 wants to merge 3 commits intomasterfrom
avg_clean_up
Open

Avg clean up#203
jellybean2004 wants to merge 3 commits intomasterfrom
avg_clean_up

Conversation

@jellybean2004
Copy link
Copy Markdown
Member

Lint and properly type hint averaging.py for future work.

codescene-delta-analysis[bot]

This comment was marked as outdated.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.typing usage 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.

Comment thread sasdata/data_util/averaging.py Outdated

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>
Copy link
Copy Markdown

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

@krzywon krzywon left a comment

Choose a reason for hiding this comment

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

This all looks reasonable. I would suggest you look at a couple of the Copilot suggestions

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.

3 participants