-
Notifications
You must be signed in to change notification settings - Fork 2
Description
The notebook https://github.com/mlexchange/react_gui_multimodal/blob/main/backend/comparing_with_pyFAI_equations_GISAXS.ipynb shows a study comparing the q matrices we are getting for GISAXS from pyFAI against the manual calculations of these matrices.
The horizontal and beam components (parallel directions) for the manual calculations match the pyFAI's parallel components. However, there is a discrepancy for the vertical component.
When investigating the equations in the pyFAI source code https://github.com/silx-kit/pyFAI/blob/main/src/pyFAI/units.py, it is found that the authors of the pyFAI library calculate the scattering matrices in what they call "lab reference frame" (q_lab) and then transform it to the "sample reference frame". Upon investigating their equations, this is what they are:
the
After doing the multiplication, this is the result:
These are not the equations used in the manual calculations (equation (1) in https://journals.iucr.org/m/issues/2015/01/00/ed5003/ed5003.pdf)
There are two questions to be answered here:
-
What makes the discrepancies between the vertical components?
-
If the equations are different, how is it even possible to get a match for the horizontal and beam components?