-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add support for multiple x-ray sources #721
Conversation
This adds support for multiple x-ray sources to the instrument and powder calibration. This will be the base for all multi-xrs work going forward. Most instruments will not be using multiple x-ray sources, so a concept of an "active beam" is present so that software can assume there is only one beam. Properties like `instr.beam_energy` return the energy of the active beam. Another method was also added to easily switch between beam sources when needed. The `with_xray_source()` context manager can be used to temporarily switch the active beam to another beam, if some calculations that assume only one beam need to be performed with a different active beam. This results in significantly cleaner code than if we had to make all hexrd source code multi-beam aware. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This matches what we are using for 2XRS, and we were told by Saransh that this is more common. So we will make it the default. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
We need to find a good example to test this on. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This appears to be working well... Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
The panels on the instrument get updated regularly during calibration. We need to make sure that the panels in the tth_distortion are identical and also get updated. This adds logic to do so. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
This calibrates two powder overlays from separate x-ray sources simultaneously. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #721 +/- ##
==========================================
+ Coverage 37.26% 37.93% +0.66%
==========================================
Files 134 134
Lines 21826 21961 +135
==========================================
+ Hits 8134 8330 +196
+ Misses 13692 13631 -61
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing job. LGTM!
This adds support for multiple x-ray sources, which may have different beam vectors, energies, and distances.
This also adds support for calibrating to diffraction patterns from multiple x-ray sources, including for powder, Laue, and also structureless.