From 2501aedda111feaf139f9d8e94c4ab36926e93e3 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 13 Jul 2023 15:20:10 +0200 Subject: Rotation centre coordinates need to be in metres (not pixels) --- libcrystfel/src/predict-refine.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index d5838e06..4a228dc1 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -283,12 +283,12 @@ int fs_ss_gradient_panel(int param, Reflection *refl, UnitCell *cell, } -/* Returns dfs_refl/dP and fss_refl/dP, where P = any parameter - * fs_refl is the fast scan position of refl in panel 'p', +/* Returns the gradient of fs_dev and ss_dev w.r.t. any parameter. + * cx,cy,cz are the rotation axis coordinates (only 2 in use at any time) * in metres (not pixels) */ int fs_ss_gradient(int param, Reflection *refl, UnitCell *cell, struct detgeom_panel *p, gsl_matrix *Minv, - double cx, double cy, double cz, + double cxm, double cym, double czm, float *fsg, float *ssg) { signed int h, k, l; @@ -351,7 +351,10 @@ int fs_ss_gradient(int param, Reflection *refl, UnitCell *cell, } else { return fs_ss_gradient_panel(param, refl, cell, p, Minv, fs, ss, mu, t, - cx, cy, cz, fsg, ssg); + cxm/p->pixel_pitch, + cym/p->pixel_pitch, + czm/p->pixel_pitch, + fsg, ssg); } } -- cgit v1.2.3