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

Resizable tof spectrum viewer #2026

Merged
merged 6 commits into from
Feb 6, 2024

Conversation

MikeSullivan7
Copy link
Collaborator

Issue

Closes #2025.

Description

In the SpectrumWidget for the Spectrum Viewer, the image view and the spectrum plot have been separated into two separate widgets as this allows us to use a QSplitter to resize them in a comfortable way. The splitter is configured so that initially the image takes up 70% of the window and the spectrum plot takes 30%, but this can be easily configured. The SpectrumWidget class now creates instances of the SpectrumPlotWidget and SpectrumProjectionWidget. This refactoring required the unit tests to be modified.

image

image

Testing

Check make check still passes properly.

Acceptance Criteria

Open some data in the Spectrum Viewer and see if the ToF plot can be easily resized and viewed. Make sure that the rest of the Spectrum Viewer still works as intended.

Documentation

Will be added to release notes.

@coveralls
Copy link

coveralls commented Jan 31, 2024

Coverage Status

coverage: 75.464% (-0.2%) from 75.681%
when pulling e796f42 on 2025_Resizable_Tof_Spectrum_Viewer
into 82f5fcb on main.

@@ -41,6 +41,8 @@ class SpectrumViewerWindowView(BaseMainWindowView):
bin_size_spinBox: QSpinBox
bin_step_spinBox: QSpinBox

spectrumWidget: SpectrumWidget
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the local name be in snake_case
spectrum_widget: SpectrumWidget

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done!

@samtygier-stfc
Copy link
Collaborator

Looks good. Just needs a release note

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.

Works well. Thanks

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Feb 6, 2024
Merged via the queue into main with commit 9611a8d Feb 6, 2024
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 2025_Resizable_Tof_Spectrum_Viewer branch February 6, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resizable ToF Spectrum plot in Spectrum Viewer
3 participants