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

Support for grazing-incidence exit angles and polar angle #2380

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

EdgarGF93
Copy link
Collaborator

@EdgarGF93 EdgarGF93 commented Jan 17, 2025

The units called previously exit angles should be "scattering_angles" in the classic way, because they don't depend on incident and tilt angles. Rotations are applied to q units.
Now, the unit called "exit angle" is used in the grazing-incidence community for the scattering angle with the origin in the horizon of the thin film, now dependant on the incident and tilt angles
The "exit_angles" support is especially useful for SAXS experiments

@EdgarGF93
Copy link
Collaborator Author

EdgarGF93 commented Jan 17, 2025

image

In the first image, while incident_angle=0.0, the exit angle is 0.0 in q=0, which is also the horizon
In the second image, at iangle=0.2 rad, the exit angle is 0.0 in the horizon, the direct beam is at -iangle (-0.2 rad) and the reflected beam (at Bragg condition) is at 0.2 rad

This example is just for visualize the difference, if the images are integrated using the angle units, there is no missing wedge

@EdgarGF93 EdgarGF93 added the work in progress Don't review label Jan 17, 2025
@EdgarGF93 EdgarGF93 changed the title correction exit and scattering angles Support for grazing-incidence exit angles Jan 17, 2025
@EdgarGF93
Copy link
Collaborator Author

In a real example, we would integrate using the angle units:

%matplotlib widget
incident_angle = 0.0
tilt_angle = 0.0
res2d_0 = fi.integrate2d_grazing_incidence(data=arr, 
                                           unit_ip="scattering_angle_horz", unit_oop="exit_angle", 
                                           incident_angle=incident_angle, tilt_angle=tilt_angle,
                                          )

incident_angle = 0.2
tilt_angle = 0.0
res2d_1 = fi.integrate2d_grazing_incidence(data=arr, 
                                           unit_ip="scattering_angle_horz", unit_oop="exit_angle", 
                                           incident_angle=incident_angle, tilt_angle=tilt_angle,
                                          )

fig, axes = subplots(ncols=2)
plot2d(res2d_0, ax=axes[0])
plot2d(res2d_1, ax=axes[1])

image

@EdgarGF93 EdgarGF93 changed the title Support for grazing-incidence exit angles Support for grazing-incidence exit angles and polar angle Jan 17, 2025
@EdgarGF93
Copy link
Collaborator Author

EdgarGF93 commented Jan 20, 2025

All these images will be generated in the tutorial notebook:

If we dont specify the units (so it will use qip_nm-1 and qoop_nm-1):

for so in range(1,9):
    ax_ = ax.ravel()[so-1]
    res = fi.integrate2d_grazing_incidence(data=data, sample_orientation=so,
                                       # unit_ip="qtot_nm^-1",
                                       # unit_oop="chigi_deg",
                                      )

image
We see that our "correct" sample orientation is 6 (or 7, it only switches the x sign)

for so in range(1,9):
    ax_ = ax.ravel()[so-1]
    res = fi.integrate2d_grazing_incidence(data=data, sample_orientation=so,
                                       unit_ip="qtot_nm^-1",
                                       unit_oop="chigi_deg",
                                      )

image

So in this case, if we choose the correct sample orientation, the polar angle 0 will be associated always to the vertical axis of the sample (fiber axis or thin film normal vector)

@EdgarGF93
Copy link
Collaborator Author

needs to fix #2389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
work in progress Don't review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant