aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2023-09-20 10:20:49 +0200
committerThomas White <taw@physics.org>2023-09-20 10:22:26 +0200
commit88dd3c5f067675ba2409adbb9961812f1600dbee (patch)
treeb7a3b973a03f88f608c6b888ffe28184eb35ee1b /libcrystfel
parenta7b033f6c8c840da2cc0760e5e5a60e1689a708b (diff)
Fix inappropriate use of r_dev
These should be get_exerr. Following 1ae9a4582, the r_dev values are no longer useful physical quantities, only a refinement target function. This was causing the last few Git versions to not predict any reflections at all!
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/predict-refine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libcrystfel/src/predict-refine.c b/libcrystfel/src/predict-refine.c
index ba1bb3ae..32d0f77b 100644
--- a/libcrystfel/src/predict-refine.c
+++ b/libcrystfel/src/predict-refine.c
@@ -366,7 +366,7 @@ static int cmpd2(const void *av, const void *bv)
a = (struct reflpeak *)av;
b = (struct reflpeak *)bv;
- if ( fabs(r_dev(a)) < fabs(r_dev(b)) ) return -1;
+ if ( fabs(get_exerr(a->refl)) < fabs(get_exerr(b->refl)) ) return -1;
return 1;
}
@@ -383,10 +383,10 @@ static int check_outlier_transition(struct reflpeak *rps, int n,
for ( i=1; i<n-1; i++ ) {
int j;
- double grad = fabs(r_dev(&rps[i])) / i;
+ double grad = fabs(get_exerr(rps[i].refl)) / i;
for ( j=i+1; j<n; j++ ) {
- if ( fabs(r_dev(&rps[j])) < 0.001e9+grad*j ) {
+ if ( fabs(get_exerr(rps[j].refl)) < 0.001e9+grad*j ) {
break;
}
}
@@ -576,7 +576,7 @@ int refine_radius(Crystal *cr, struct image *image)
qsort(rps, n_acc, sizeof(struct reflpeak), cmpd2);
n = (n_acc-1) - n_acc/50;
if ( n < 2 ) n = 2; /* n_acc is always >= 2 */
- crystal_set_profile_radius(cr, fabs(r_dev(&rps[n])));
+ crystal_set_profile_radius(cr, fabs(get_exerr(rps[n].refl)));
reflist_free(reflist);
free(rps);