Closed hk80s closed 4 years ago
There are two separate issues in your report:
F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E0*1e-6, 0, 0, 0, debyeWaller, 1.0)
the line should read
F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E0*1e-6, 0, 0, 0, 1.0, 1.0)
This will be fixed in the next version.Thank you for the comment!
Dear sir
thank you for your answers
I was going through your code and i found that only place where debye waller factor is used is the calculation of structure factor. If you insert 1 instead of debye waller factor in the calculation of structure factor then this factor become meaningless in your code.
I have checked the structure factor by hand calculation and it is ok at 0 angle.
At higher angle the atomic scattering factor changes and so the Fh should change but i think there is some problem in the understanding of the rel_angle term. According to the manual it should be in radians.
The code throws an error when q become negative.
q = 4 pi sin(theta/2)/lambda
and according to this the minimum should come when theta become 180 deg and it should become negative when theta become more than 360 deg.
However this angle changes for every element and the minimum comes around 300-400 deg which is around double of my expectation. I could not find any answer to this question.
I was going through your code and find that you have taken conjugates of the structure factors while calculating chi0 chih and chib i could not understand the reason behind this.
I could not move forward because i can not match the equations in the code with the available literature with me
can you give me some references to understand the calculation of
I will be really thankful
with best regards
himanshu singhal
On Sat, Apr 4, 2020 at 5:20 PM Ari-Pekka Honkanen notifications@github.com wrote:
There are two separate issues in your report:
- The peak position does not match the Bragg angle This is expected behaviour as PyTTE calculates the scan vectors relative to the kinematical Bragg angle, which does not take into account the refraction of X-rays at the vacuum-crystal boundary. The peak position can be corrected for refraction as presented in the attached document. This will be emphasised more in the documentation.
- _The peak position changes as a function of the Debye-Waller factor. The Debye-Waller factor is a function of the scattering vector q, and is supposed to be 1 for q = 0. However, in the current version (0.1.11), the user given DWF is also passed into calculation of F_0 and thus chi_0, which is incorrect. So instead of F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E01e-6, 0, 0, 0, debyeWaller, 1.0) the line should read F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E01e-6, 0, 0, 0, 1.0, 1.0) This will be fixed in the next version.
Thank you for the comment!
JupyterLab_debye_waller.pdf https://github.com/aripekka/pyTTE/files/4431244/JupyterLab_debye_waller.pdf
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aripekka/pyTTE/issues/6#issuecomment-609016822, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTQD3RGI2CNONW5DZL3HJDRK4NIVANCNFSM4LXJETQQ .
Dear sir
I think i have found the answer to not matching of diffraction peak with Bragg angle This is due to refraction of the x ray in the crystal due to refraction the angle inside the crystal is little changed the revised angle will be theta_dash = arccos(cos(theta)/(1-chi0)) after this correction the angle should come at Bragg peak
with best regards
himanshu singhal
On Wed, Apr 8, 2020 at 11:34 PM Himanshu Singhal hsinghal1@gmail.com wrote:
Dear sir
thank you for your answers
I was going through your code and i found that only place where debye waller factor is used is the calculation of structure factor. If you insert 1 instead of debye waller factor in the calculation of structure factor then this factor become meaningless in your code.
I have checked the structure factor by hand calculation and it is ok at 0 angle.
At higher angle the atomic scattering factor changes and so the Fh should change but i think there is some problem in the understanding of the rel_angle term. According to the manual it should be in radians.
The code throws an error when q become negative.
q = 4 pi sin(theta/2)/lambda
and according to this the minimum should come when theta become 180 deg and it should become negative when theta become more than 360 deg.
However this angle changes for every element and the minimum comes around 300-400 deg which is around double of my expectation. I could not find any answer to this question.
I was going through your code and find that you have taken conjugates of the structure factors while calculating chi0 chih and chib i could not understand the reason behind this.
I could not move forward because i can not match the equations in the code with the available literature with me
can you give me some references to understand the calculation of
COEFFICIENTS FOR TTE
I will be really thankful
with best regards
himanshu singhal
On Sat, Apr 4, 2020 at 5:20 PM Ari-Pekka Honkanen < notifications@github.com> wrote:
There are two separate issues in your report:
- The peak position does not match the Bragg angle This is expected behaviour as PyTTE calculates the scan vectors relative to the kinematical Bragg angle, which does not take into account the refraction of X-rays at the vacuum-crystal boundary. The peak position can be corrected for refraction as presented in the attached document. This will be emphasised more in the documentation.
- _The peak position changes as a function of the Debye-Waller factor. The Debye-Waller factor is a function of the scattering vector q, and is supposed to be 1 for q = 0. However, in the current version (0.1.11), the user given DWF is also passed into calculation of F_0 and thus chi_0, which is incorrect. So instead of F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E01e-6, 0, 0, 0, debyeWaller, 1.0) the line should read F0 = xraylib.Crystal_F_H_StructureFactor(crystal, E01e-6, 0, 0, 0, 1.0, 1.0) This will be fixed in the next version.
Thank you for the comment!
JupyterLab_debye_waller.pdf https://github.com/aripekka/pyTTE/files/4431244/JupyterLab_debye_waller.pdf
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aripekka/pyTTE/issues/6#issuecomment-609016822, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTQD3RGI2CNONW5DZL3HJDRK4NIVANCNFSM4LXJETQQ .
I have now checked the issues in this thread and made the changes to the v1.0_alpha branch as needed:
rel_angle
goes into calculation of q, where it multiplies the Bragg angle calculated from the crystal and scan parameters. Based on the source code and the given examples of xraylib, the value of rel_angle
is 1.0If there are no further comments on these matters, I'll close this thread in a couple of days.
Dear sir
Thank you for your help
With best regards
Himanshu
On Fri, 17 Apr 2020, 18:18 Ari-Pekka Honkanen, notifications@github.com wrote:
I have now checked the issues in this thread and made the changes to the v1.0_alpha branch as needed:
- Calculation of the structure factors is now fixed, the Debye-Waller factor should not change the position of the curve anymore.
- rel_angle goes into calculation of q, where it multiplies the Bragg angle calculated from the crystal and scan parameters. Based on the source code and the given examples of xraylib, the value of rel_angle is 1.0
- In the calculation of q, the possible scattering angles range from 0 deg (forward scattering) to 180 degrees (back scattering). Other values are not physically possible.
- Conjugates of chis are taken because there are two different conventions in defining the Fourier expansion: exp(kx) and exp(-kx). PyTTE uses the former and to my best understanding xraylib uses the latter. This is now explained in the docs.
- The refraction can be indeed corrected but the general correction is slightly more complicated than theta_dash = arccos(cos(theta)/(1-chi0)). These are presented in the docs and I'll add the possiblity for correction in the near future. By default PyTTE will use the uncorrected, kinematic Bragg angle as it has now.
If there are no further comments on these matters, I'll close this thread in a couple of days.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aripekka/pyTTE/issues/6#issuecomment-615225457, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTQD3SZG2SBWQDCMXH2QGTRNBF3LANCNFSM4LXJETQQ .
The peak position does not match the Bragg angle and it is keep on changing with the change in Debye Waller factor. If it is not a bug please provide citation.