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

Update gamma correction to use updated algorithm #131

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

GuiMacielPereira
Copy link
Collaborator

Mantid's algorithm for gamma correction was recently updated in to correct a bug where output workspaces would not preserve the order of the spectra.

Now that this is fixed, we can avoid using a for loop for the gamma correction algorithm.

Description of work:
Uncommented part of code that I had written in the past to be in place once the update went in.

To test:
Look at the code and make sure the analysis system tests passed.

Fixes #xxxx.

Mantid's algorithm for gamma correction was recently updated
to correct a bug where output workspaces would not preserve the
order of the spectra.

Now that this is fixed, we can avoid using a for loop for the gamma
correction algorithm.
@@ -995,24 +995,9 @@ def create_gamma_workspaces(self):
profiles = self.calcGammaCorrectionProfiles(self._mean_widths, self._mean_intensity_ratios)

# Approach below not currently suitable for current versions of Mantid, but will be in the future
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this comment still valid? The fix for VesuvioCalculateGammaBackground was merged end of 2023, so it should be available in current versions of Mantid.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I am talking about the comment "# Approach below not currently suitable for current versions of Mantid, but will be in the future".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yes I forgot to remove it, thanks for spotting it!

Copy link
Collaborator

@SilkeSchomann SilkeSchomann 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 and tests still pass. Since VesuvioCalculateGammaBackground is fixed now in Mantid, it makes sense to remove this workaround.

@GuiMacielPereira GuiMacielPereira merged commit d28eb30 into main Aug 30, 2024
1 check passed
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.

Change implementation of VesuvioCalculateGammaBackground
2 participants