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 azimuth_range
in Diffraction2d.get_azimuthal_integral2d
#1060
base: main
Are you sure you want to change the base?
Conversation
@viljarjf Don't worry too much about the contributor order. It's good to add yourself as it helps us remember but we will adjust the list order once a new version is released. |
I added an example to show some different options. Since it uses |
@viljarjf Let's align this with pyxem standards. Let's force it here, document it, and then if people want to change the limits to get what they previously did, they can do that themselves. I don't think anyone is going to get frustrated with this as long as we are fixing bugs. |
When I looked into this earlier, I could not find where or how the direction of angle 0 was defined in the slicing code. As you implemented it, maybe you know @CSSFrancis? If not, we can simply subtract 90 degrees from the azimuthal range before passing it to |
What I implemented so far in this PR does not change or handle the relationship between the direction of angle 0 and cartesian space. I only ensure that the |
To be honest I didn't think about it too much. My work usually involves autocorrelation along theta, so the direction of 0 doesn't really matter. For orientation mapping it does and we should be consistant :) |
Add proper support for the
azimuth_range
-argument inDiffraction2d.get_azimuthal_integral2d
Checklist
What does this PR do? Please describe and/or link to an open issue.
Previously the only thing$X_L$ . Currently, the angle is measured along $-Y_L$ .$X_L$ .
azimuth_range
did was change the axis limis. Now, the argument is considered also when integrating.I added a test to ensure only the specified range is included in the final output.
With this, the angle along the azimuthal axis is consistent for any specified range, with angle 0 pointing downwards in the image.
This is not in line with Pyxem's standards, if the angle is measured along
This affects the new template matching code for the in-plane angle, which needs to be measured from
It can either be handled here, or in the template matching code specifically, as we need to convert from an index into the azimuthal axis (the current TM output) to an angle in degrees regardless.
I updated the contributors but I'm not sure where in the list I slot in..