Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove duplicate Laue spots from simulator
This issue arose from #509, due to somewhat complex details. In short, the old `gvecToDetectorXY()` would filter out g-vectors going the wrong way (they would result in `nan`), but `gvecToDetectorXYArray()` would not. The new `gvec_to_xy()` has behavior matching `gvecToDetectorXYArray()`. But that means that places where `gvecToDetectorXY()` used to be used, we need to verify that the function does not receive g-vectors going the wrong way. Looking through the code, however, I only found one place where `gvecToDetectorXY()` used to receive g-vectors going the wrong way. It was the Laue overlay simulator, which would compute g-vectors from symmetrical HKLs (which is why it would have duplicate g-vectors going the wrong way). All other cases where `gvecToDetectorXY()` was called would be after the g-vectors were computed from `anglesToGvec()`, which I believe should always produce g-vectors going in the correct direction. As such, we only need to filter out wrong-direction g-vectors in the Laue simulator. Fixes: HEXRD/hexrdgui#1412 Signed-off-by: Patrick Avery <[email protected]>
- Loading branch information