aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-09-18 16:41:47 +0200
committerThomas White <taw@physics.org>2023-09-18 16:42:27 +0200
commit042f9ca307bda09e35769f9eaa87da44877e34e5 (patch)
treeb2b43641c148f6291869c243e6b285d650723ca3 /libcrystfel
parent5231f5b78093da778e37172fe78103acbbd27c1f (diff)
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.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/predict-refine.c4
1 files changed, 2 insertions, 2 deletions
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; i<n; i++ ) {
res_r += EXC_WEIGHT * rps[i].Ih * pow(r_dev(&rps[i]), 2.0);
- res_fs += pow(det->panels[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;