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

Apply ShutterCount Normalisation Correction when ShutterCounts Available #2214

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

JackEAllen
Copy link
Collaborator

@JackEAllen JackEAllen commented Jun 3, 2024

Issue

Closes #2095

Description

Add a description of the changes made.

  • Load ShutterCount Files into Spectrum Viewer if available.
  • Only apply ShutterCount correction if bool propagated from view (currently not fully integrated)
  • Apply ShutterCount correction to normalisation using only first value, but written such that more values can be used later on should requirements change.

Testing

Describe the tests that were used to verify your changes.

  • Manually tested through hard coding normalise parameter in get_spectrum to True and adding log statements
  • Visual inspection of how spectrum differed based on whether ShutterCount correction has been applied or not.
  • Unit tests pass

Acceptance Criteria

How should the reviewer test your changes?

  • Unit tests pass
  • Through adding additional logs and viewing spectrum, hard coding get_spectrum normalise param to "True" applies ShutterCount correction

Documentation

How have you changed the documentation to reflect your changes? All changes should be noted in the appropriate file in docs/release_notes

docs/release_notes/next/feature-2095-apply_shuttercounts_normalisation

@JackEAllen JackEAllen changed the title Apply Shuttercount Normalisation Correction when shutterCounts Available Apply ShutterCount Normalisation Correction when ShutterCounts Available Jun 3, 2024
@coveralls
Copy link

coveralls commented Jun 3, 2024

Coverage Status

coverage: 73.019% (+0.06%) from 72.96%
when pulling 10749f1 on 2095_shuttercount_correction
into 86644da on main.

@JackEAllen JackEAllen self-assigned this Jun 5, 2024
@JackEAllen JackEAllen force-pushed the 2095_shuttercount_correction branch from 2646d79 to 60feb2f Compare June 5, 2024 10:45
@JackEAllen JackEAllen force-pushed the 2095_shuttercount_correction branch 3 times, most recently from 9bb53e4 to 7bbb210 Compare June 13, 2024 11:29
@JackEAllen JackEAllen force-pushed the 2095_shuttercount_correction branch 2 times, most recently from 4dadb02 to a2f2b7a Compare June 13, 2024 16:22
@JackEAllen JackEAllen marked this pull request as ready for review June 13, 2024 16:39
mantidimaging/gui/windows/spectrum_viewer/model.py Outdated Show resolved Hide resolved
mantidimaging/gui/windows/spectrum_viewer/model.py Outdated Show resolved Hide resolved
mantidimaging/gui/windows/spectrum_viewer/model.py Outdated Show resolved Hide resolved
mantidimaging/gui/windows/spectrum_viewer/model.py Outdated Show resolved Hide resolved
@JackEAllen JackEAllen force-pushed the 2095_shuttercount_correction branch 2 times, most recently from cf04793 to c30f808 Compare June 19, 2024 09:09
@JackEAllen JackEAllen force-pushed the 2095_shuttercount_correction branch from c30f808 to 10749f1 Compare June 19, 2024 11:07
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.

Code looks good. I have tested with a few extra print statements to see the normalisation happening.

@samtygier-stfc samtygier-stfc added this pull request to the merge queue Jun 19, 2024
Merged via the queue into main with commit b866326 Jun 19, 2024
8 checks passed
@samtygier-stfc samtygier-stfc deleted the 2095_shuttercount_correction branch June 19, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants