From 8d564b40cd0f38022a1325e5dc9c8caaa4303f20 Mon Sep 17 00:00:00 2001 From: Jose Borreguero <borreguero@gmail.com> Date: Wed, 24 Mar 2021 14:19:47 -0400 Subject: [PATCH] Refs #30887 requires sign flip! Signed-off-by: Jose Borreguero <borreguero@gmail.com> --- Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py b/Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py index 94e8edb4b9e..62453bc4be8 100644 --- a/Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py +++ b/Framework/PythonInterface/plugins/algorithms/SaveHKLCW.py @@ -80,7 +80,7 @@ class SaveHKLCW(PythonAlgorithm): R = p.getGoniometerMatrix() RU = np.dot(R, U) ki = ki_n * (2 * np.pi / p.getWavelength()) - kf_n = ki + p.getQLabFrame() # direction of scattered wavevector + kf_n = ki - p.getQLabFrame() # direction of scattered wavevector kf_n = kf_n * (1. / kf_n.norm()) dir_cos_1 = np.dot(RU.T, -ki_n) # notice ki direction is reversed dir_cos_2 = np.dot(RU.T, kf_n) -- GitLab