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

Add magnetic structure factor correction #145

Merged
merged 7 commits into from
Jan 6, 2025

Conversation

rosswhitfield
Copy link
Member

@rosswhitfield rosswhitfield commented Dec 18, 2024

Short description of the changes:

Ref: 8609: Add Magnetic structure factor correction to Shiver

The MagneticFormFactorCorrectionMD algorithm was only just added to mantid so you will need the mantid nightly version >6.11.20241216.1838 for this to work. This also means a new version of matplotlib and move to numpy 2.0.

I also fixed the codecov reporting which hasn't updated in 11 months so the diff is probably not accurate.

The "Magnetic structure factor" correction should now be enables.

You should be able to select which ion to use.
2024-12-18-111249_343x159_scrot

The workspace name should be appened with "_MSF"

2024-12-18-111301_363x150_scrot

If you plot them you can see the difference.

MSF:-5 88 0,K,0 5 88,-5 88 0,0,L 5 88,_-23 74 DeltaE 23 75

Long description of the changes:

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

References

@rosswhitfield rosswhitfield force-pushed the magnetic_form_factor_correction branch from 832904f to 6cdaa3a Compare December 18, 2024 23:31
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 74.72527% with 23 lines in your changes missing coverage. Please review.

Project coverage is 82.29%. Comparing base (a9297e4) to head (6cdaa3a).
Report is 24 commits behind head on next.

Files with missing lines Patch % Lines
src/shiver/models/corrections.py 69.11% 21 Missing ⚠️
src/shiver/presenters/histogram.py 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #145      +/-   ##
==========================================
- Coverage   82.30%   82.29%   -0.02%     
==========================================
  Files          39       39              
  Lines        6048     6195     +147     
==========================================
+ Hits         4978     5098     +120     
- Misses       1070     1097      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rosswhitfield rosswhitfield marked this pull request as ready for review December 18, 2024 23:38
@rosswhitfield rosswhitfield merged commit f490bdd into next Jan 6, 2025
5 of 6 checks passed
@rosswhitfield rosswhitfield deleted the magnetic_form_factor_correction branch January 6, 2025 21:32
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.

2 participants