Skip to content
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

refactored roi_ranges out of the model #2454

Merged
merged 5 commits into from
Jan 21, 2025

Conversation

ashleymeigh2
Copy link
Collaborator

@ashleymeigh2 ashleymeigh2 commented Jan 10, 2025

Issue

Closes #2297

Description

roi_range removed from model
refactored presenter to no longer use roi_range from model

Testing

Updated unit tests to verify correct renaming behavior and proper exceptions for invalid operations.
Manually tested renaming ROIs in the UI to ensure changes are reflected correctly.

@coveralls
Copy link

coveralls commented Jan 10, 2025

Coverage Status

coverage: 73.6% (-0.02%) from 73.622%
when pulling c319ca7 on 2297_remove_range_from_model
into 3f099d2 on main.

@samtygier-stfc samtygier-stfc self-assigned this Jan 20, 2025
Copy link
Collaborator

@samtygier-stfc samtygier-stfc left a comment

Choose a reason for hiding this comment

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

Looking good. There is one test that is no longer needed.

@samtygier-stfc
Copy link
Collaborator

When I do a 2D binned RITS export I get

2025-01-20 15:47:41,181 [mantidimaging.gui.dialogs.async_task.task:L53] ERROR: Failed to execute task: SpectrumViewerWindowModel.save_rits_images() missing 1 required positional argument: 'roi'
Traceback (most recent call last):
  File "/home/sam/git/mantidimaging/mantidimaging/gui/dialogs/async_task/task.py", line 50, in run
    self.result = call_with_known_parameters(self.task_function, **self.kwargs)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/git/mantidimaging/mantidimaging/core/utility/func_call.py", line 12, in call_with_known_parameters
    return func(**ka)
           ^^^^^^^^^^
TypeError: SpectrumViewerWindowModel.save_rits_images() missing 1 required positional argument: 'roi'

@samtygier-stfc
Copy link
Collaborator

Review task. Check that the binned export uses the ROI specified by the user. For example

image
Should output 4 files. This is currently broken on main, where it seems to be using the whole area and outputting thousands of files.

@ashleymeigh2 ashleymeigh2 self-assigned this Jan 21, 2025
Copy link
Collaborator

@samtygier-stfc samtygier-stfc left a comment

Choose a reason for hiding this comment

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

Looking good. RITS export modes are working

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Jan 21, 2025
Merged via the queue into main with commit 01d2c37 Jan 21, 2025
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 2297_remove_range_from_model branch January 21, 2025 17:05
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.

Remove _roi_ranges dict from SpectrumViewerWindowModel
4 participants