Skip to content

Improve SumIntensitiesFilter docstrings to enhance user-facing explan…#3142

Draft
ashleymeigh2 wants to merge 1 commit into
mainfrom
improve-SumIntensitiesFilter-docstrings-for-user
Draft

Improve SumIntensitiesFilter docstrings to enhance user-facing explan…#3142
ashleymeigh2 wants to merge 1 commit into
mainfrom
improve-SumIntensitiesFilter-docstrings-for-user

Conversation

@ashleymeigh2
Copy link
Copy Markdown
Collaborator

…ations

Issue Closes #

Description

Improve and standardise docstrings for SumIntensitiesFilter to better support user-facing documentation and in-application guidance. These changes improve readability for developers and enhance downstream user documentation (e.g. tooltips, generated docs).

Developer Testing

  • I have verified unit tests pass locally: python -m pytest -vs
  • ...

Acceptance Criteria and Reviewer Testing

  • Unit tests pass locally: python -m pytest -vs
  • ...

Documentation and Additional Notes

@coveralls
Copy link
Copy Markdown

Coverage Status

coverage: 67.998%. remained the same — improve-SumIntensitiesFilter-docstrings-for-user into main

@JackEAllen
Copy link
Copy Markdown
Collaborator

Does this PR link to an Issue? Maybe #3074 ?

@JackEAllen JackEAllen requested review from JackEAllen May 6, 2026 13:18
@JackEAllen JackEAllen self-assigned this May 6, 2026
Copy link
Copy Markdown
Collaborator

@JackEAllen JackEAllen left a comment

Choose a reason for hiding this comment

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

Thank you for cleaning up after me and adding an improved docstring for the API docs. Looks good! Just a few suggestions

Comment on lines +33 to +34
- Projection angles are not required but, if present, are checked for
consistency and may trigger a warning if mismatched.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Projection angles are not required but, if present, are checked for
consistency and may trigger a warning if mismatched.
- Projection angles are not required. If present, projections are sorted into angle order on load
(see :func:`loader.load <mantidimaging.core.io.loader.loader.load>`).
If matched angles between stacks to be summed together differ, a warning is raised.

"""
Validate stacks and sum their intensities in-place.
:param images: Primary ImageStack to be modified.
:param secondary_stack: Secondary ImageStack whose values are added.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
:param secondary_stack: Secondary ImageStack whose values are added.
:param secondary_stack: Secondary ImageStack whose values are added to the primary stack

Validate stacks and sum their intensities in-place.
:param images: Primary ImageStack to be modified.
:param secondary_stack: Secondary ImageStack whose values are added.
:param progress: Progress reporting object (unused).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

NIPICK (Entirely optional): As this is user facing, may be handy to provide context explaining why Progress is not used.

Suggested change
:param progress: Progress reporting object (unused).
:param progress: Progress reporting object (unused - no meaningful progress updates to report as operation runs as a single vectorised operation).

@JackEAllen JackEAllen marked this pull request as draft May 7, 2026 08:31
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