From 042f9ca307bda09e35769f9eaa87da44877e34e5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 18 Sep 2023 16:41:47 +0200 Subject: pred_residual: Remove vestigial conversion to metres We want the residual in pixels, as described in the comment for EXC_WEIGHT. This routine is only used for displaying the total residuals, not for the real minimisation maths. However, we need to be clear. --- libcrystfel/src/predict-refine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c index 320eccee..55ecfa9d 100644 --- a/libcrystfel/src/predict-refine.c +++ b/libcrystfel/src/predict-refine.c @@ -769,8 +769,8 @@ static double pred_residual(struct reflpeak *rps, int n, struct detgeom *det, res_ss = 0.0; for ( i=0; ipanels[rps[i].peak->pn].pixel_pitch*fs_dev(&rps[i], det), 2.0); - res_ss += pow(det->panels[rps[i].peak->pn].pixel_pitch*ss_dev(&rps[i], det), 2.0); + res_fs += pow(fs_dev(&rps[i], det), 2.0); + res_ss += pow(ss_dev(&rps[i], det), 2.0); } if ( pres_r != NULL ) *pres_r = res_r; -- cgit v1.2.3