aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2021-09-07 16:27:21 +0200
committerThomas White <taw@physics.org>2021-09-07 16:27:21 +0200
commita947825bd07f11c6fa6e5e762dcfa9e852458ce5 (patch)
tree7f09e4efbcfc575bbded1cfec2c832ecaa949827
parentd5e19996fbed1a48112c6b6b569eb06fc7616c6b (diff)
fom_select_reflection_pairs: Keep zeroed intensities in dataset
Note the re-ordering of tasks, and the removal of 'continue'.
-rw-r--r--libcrystfel/src/fom.c27
1 files changed, 13 insertions, 14 deletions
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);