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

Wrong math for Debye Waller Factor in x-Ray class #148

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jpudell
Copy link

@jpudell jpudell commented Nov 21, 2023

Wrong math in ref/trans factors for Debye Waller Factor: Units cell Class requires de_wal_fac in units of m^2. The math in get_atom_reflection/trasmission_factor, requires the unit of m instead of m^2. Also the comment section shows different equations as used in the function.

Wrong math in ref/trans factors for Debye Waller Factor: Units cell Class requires de_wal_fac in units of m^2. The math in get_atom_reflection/trasmission_factor, requires the unit of m instead of m^2. Also the comment section shows different equations as used in the function.
@dschick
Copy link
Owner

dschick commented Nov 21, 2023

Hi @jpudell

many thanks for revising the code and math!

However, I think the code in the Xray class is correct, but the unit of the dbf in the UnitCell class should be changed from to m?

Could you also point explicitly to the difference between docstring and code equations?
I might not see it after so long time

@jpudell
Copy link
Author

jpudell commented Nov 21, 2023

Hi dschick,

both is possible. In the literature it is more common to use the < u >^2 for the Debye Waller instead of < u >. In the Matlab version < u >^2 is used, so I suggest to also use it here.

The doc string was correct for the < u > version. (I mixed up / and ...) and corrected it for the < u >^2 version.

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