-
Notifications
You must be signed in to change notification settings - Fork 895
Fix typo in equation that computes interplanar angels #2780
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
base: master
Are you sure you want to change the base?
Conversation
Thanks @EurusWei, much appreciated for catching this! Can you suggest a good test for this function, e.g. a known input and output? |
Hi Horton, Has this catch been confirmed to be true? I am comparing the diffraction patterns (DPs) generated before and after the fix to those on the MaterialsProject website. I found the code before the fix generated DPs matched the MaterialsProject, instead of after the fix. Based on symmetry I am sure the equation should be fixed, but I don't know why the above phenomenon happens (not what I expected). Do you know how the MaterialsProject website generates their DPs? |
Yes, I do -- the MP website uses the We, at Materials Project, are likely switching to use functionality from py4DSTEM in future, and this is being worked on by @sezelt (and is looking really nice!) but right now, all functionality is unmodified from pymatgen. |
I see, that makes sense. Since I don't have much background in this field, I cannot tell which DP is more accurate, before or after the fix. What about this: I will give you some examples that I find having discrepancies in DPs before and after the fix, together with my calculation results, and your group can help identify if this fix makes sense. After that you can either add some tests or directly merge the fix. |
3c23114
to
36e289c
Compare
d725325
to
dca98be
Compare
e3fbc67
to
41e6d99
Compare
Summary
In the function get_interplnar_angle of module analysis/diffraction/tem.py, there are some typos about the angels and index.
Todo (if any)
N/A
Checklist
Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request title.
Before a pull request can be merged, the following items must be checked:
mypy path/to/file.py
to type check your code.Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most errors prior to submitting the PR. We highly recommended installing
pre-commit
hooks. Simply Runin the repo's root directory. Afterwards linters will run before every commit and abort if any issues pop up.