Fix exclusion ordering on lattice param change#936
Merged
Conversation
Previously, `tThSort` and `tThSortInv` would effectively cancel each other out, as long as the two theta ordering stayed constant (which is usually true for high symmetry systems). This issue would not be encountered by most users, since most users are dealing with high symmetry systems. In low symmetry systems, the two theta ordering can be more easily re-arranged on lattice parameter changes, so this would land the exclusions at incorrect indices. An example of this issue in the GUI: if you had a triclinic material and selected HKL `002`, then changed the `c` lattice parameter, the selected HKL could be changed to something else, like `-1 -1 2`. A simple test was added that reproduced the issue, and that also verifies that the issue is fixed. Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
68cfc76 to
06bf739
Compare
Collaborator
Author
|
Rebased on master to fix the packaging |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #936 +/- ##
=======================================
Coverage 72.61% 72.61%
=======================================
Files 142 142
Lines 21940 21940
=======================================
Hits 15932 15932
Misses 6008 6008 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
Author
|
This actually seemed to be a relatively important issue with calibrating, especially with low symmetry materials, because if you calibrated lattice parameters, you could end up with wrong exclusions selected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Previously,
tThSortandtThSortInvwould effectively cancel each other out, as long as the two theta ordering stayed constant (which is usually true for high symmetry systems). This issue would not be encountered by most users, since most users are dealing with high symmetry systems.In low symmetry systems, the two theta ordering can be more easily re-arranged on lattice parameter changes, so this would land the exclusions at incorrect indices.
An example of this issue in the GUI: if you had a triclinic material and selected HKL
002, then changed theclattice parameter, the selected HKL could be changed to something else, like-1 -1 2.A simple test was added that reproduced the issue, and that also verifies that the issue is fixed.
Affected Workflows
All
Documentation Changes
None