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
NaN warnings activated in the Spectrum Viewer #2186
base: main
Are you sure you want to change the base?
Conversation
3174aa0
to
1806759
Compare
1806759
to
b01bc1b
Compare
@@ -113,12 +116,12 @@ class SpectrumWidget(QWidget): | |||
spectrum_plot_widget: SpectrumPlotWidget | |||
image_widget: SpectrumProjectionWidget | |||
|
|||
def __init__(self) -> None: | |||
def __init__(self, parent: MainWindowView) -> None: |
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.
Can we avoid calling this parent
here. It has a specific meaning in Qt, and caused issues before. I think best to call it main_window
.
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.
See #1989
The key bit is not passing it to the Qt widget constructor, but still best to call it main_window
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.
See comment
Issue
Closes #2185
Description
In the
SpectrumWidget
class, the MainWindow is now passed to theSpectrumProjectionWidget
and theBadDataOverlay
mixin class is used in theSpectrumProjectionWidget
. The warning icon now appears in the Spectrum viewer when a slice which has a NaN in it is shown on the averaged image (as the NaN will propagate). The warning icon retains the same functionality as in the Main Window where it can be clicked on to open the Operations Window such that NaN removal can be performed.Testing
make check
Acceptance Criteria
Documentation
Will add release note