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 WK_scattering_factors.py #704

Merged

Conversation

ZacharyVarley
Copy link
Contributor

Presumed typo changed the cut-off for WEKO argument from the correct value 0.1 to the incorrect value 1.0. This returns the value to 0.1 to match WK's F77 implementation ported to F90 by MDG:

https://github.com/EMsoft-org/EMsoftOO/blob/develop/Source/EMsoftOOLib/mod_others.f90#L191

"IF (ARGU .LT. .1) THEN"

0.1 shows no artifacts in the real part (plot from my private PyTorch repo):
wk_scatter_with_0 1_no_artifacts

and 1.0 shows clear artifacts in the real part (plot from my private PyTorch repo)
wk_scatter_with_1 0_artifacts

Typo changed the cut-off for WEKO argument from the correct value 0.1 to the incorrect value 1.0. This returns the value to 0.1 to match WK's F77 implementation ported to F90 by MDG:

https://github.com/EMsoft-org/EMsoftOO/blob/develop/Source/EMsoftOOLib/mod_others.f90#L191

"IF (ARGU .LT. .1) THEN"
Copy link
Member

@sezelt sezelt left a comment

Choose a reason for hiding this comment

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

Another very good catch–thank you!

@sezelt sezelt merged commit a68396b into py4dstem:dev Jan 23, 2025
6 checks passed
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