From a947825bd07f11c6fa6e5e762dcfa9e852458ce5 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 7 Sep 2021 16:27:21 +0200 Subject: fom_select_reflection_pairs: Keep zeroed intensities in dataset Note the re-ordering of tasks, and the removal of 'continue'. --- libcrystfel/src/fom.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'libcrystfel/src') diff --git a/libcrystfel/src/fom.c b/libcrystfel/src/fom.c index d27023ae..e0149e6e 100644 --- a/libcrystfel/src/fom.c +++ b/libcrystfel/src/fom.c @@ -1190,20 +1190,6 @@ struct fom_rejections fom_select_reflection_pairs(RefList *list1, RefList *list2 continue; } - if ( zero_negs ) { - int d = 0; - if ( val1 < 0.0 ) { - val1 = 0.0; - d = 1; - } - if ( val2 < 0.0 ) { - val2 = 0.0; - d = 1; - } - if ( d ) rej.negative_zeroed++; - continue; - } - if ( rmin_fix > 0.0 ) { double res = 2.0*resolution(cell, h, k, l); if ( res < rmin_fix ) { @@ -1220,6 +1206,19 @@ struct fom_rejections fom_select_reflection_pairs(RefList *list1, RefList *list2 } } + if ( zero_negs ) { + int d = 0; + if ( val1 < 0.0 ) { + val1 = 0.0; + d = 1; + } + if ( val2 < 0.0 ) { + val2 = 0.0; + d = 1; + } + if ( d ) rej.negative_zeroed++; + } + refl1_acc = add_refl(list1_acc, h, k, l); copy_data(refl1_acc, refl1); set_intensity(refl1_acc, val1); -- cgit v1.2.3