aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-11-23 03:42:33 -0800
committerThomas White <taw@physics.org>2013-11-23 03:42:33 -0800
commitd1d8e9d2f7bdb13977181145519f71fa23c3cb73 (patch)
tree01162379aa5fd6c852529b7f221bee8c434d4d4f /libcrystfel
parenta3ba3943e966461d7f7f8f1c956159b5794e600e (diff)
indexamajig: Add --int-diag=implausible
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/integration.c18
-rw-r--r--libcrystfel/src/integration.h3
2 files changed, 14 insertions, 7 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 3111d345..83cf8d0e 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -1299,6 +1299,13 @@ static int get_int_diag(struct intcontext *ic, Reflection *refl)
return i < -3.0*sigi;
}
+ if ( ic->int_diag == INTDIAG_IMPLAUSIBLE ) {
+ double i, sigi;
+ i = get_intensity(refl);
+ sigi = get_esd_intensity(refl);
+ return i < -5.0*sigi;
+ }
+
if ( ic->int_diag == INTDIAG_INDICES ) {
signed int h, k, l;
get_indices(refl, &h, &k, &l);
@@ -1565,12 +1572,6 @@ static void integrate_rings_once(Reflection *refl, struct image *image,
sigma = sqrt(sig2_poisson + bx->m*sig2_bg);
- if ( intensity < -5.0*sigma ) {
- delete_box(ic, bx);
- ic->n_implausible++;
- return;
- }
-
/* Record intensity and set redundancy to 1 */
bx->intensity = intensity;
set_intensity(refl, intensity);
@@ -1587,6 +1588,11 @@ static void integrate_rings_once(Reflection *refl, struct image *image,
set_detector_pos(refl, 0.0, pfs, pss);
if ( get_int_diag(ic, refl) ) show_peak_box(ic, bx);
+
+ if ( intensity < -5.0*sigma ) {
+ ic->n_implausible++;
+ set_redundancy(refl, 0);
+ }
}
diff --git a/libcrystfel/src/integration.h b/libcrystfel/src/integration.h
index 38cb8163..ec674128 100644
--- a/libcrystfel/src/integration.h
+++ b/libcrystfel/src/integration.h
@@ -40,7 +40,8 @@ typedef enum {
INTDIAG_RANDOM,
INTDIAG_ALL,
INTDIAG_INDICES,
- INTDIAG_NEGATIVE
+ INTDIAG_NEGATIVE,
+ INTDIAG_IMPLAUSIBLE
} IntDiag;