-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute mon norm #2093
Compute mon norm #2093
Conversation
Currently no test case, because needs additional metadata. |
ba36d00
to
0ed71ec
Compare
def _divide_by_counts(data=None, counts=None): | ||
if counts.ndim == 1: | ||
counts = counts.reshape(1, 1, -1) | ||
data[:] = np.true_divide(data, counts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed as its not called any more.
# we can't really compute the preview as the image stack copy | ||
# passed in doesn't have the logfile in it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets keep this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, passes tests
Description
This pull request addresses the ongoing effort to standardize the execution of operations by transitioning from the partial function style to a structured compute_function approach. In this update, several operations have been refactored to adhere to the new standard. The modifications ensure a clearer separation between the setup and execution phases of each operation, improving the maintainability and readability of the codebase.
Changes made
Refactored multiple operations to implement the new compute_function approach.
Introduced static methods compute_function in each affected operation module to encapsulate the core logic for executing the operation on a per-slice basis.
Updated the calling code to use the compute_function method instead of the previous partial function style