aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/man/indexamajig.12
-rw-r--r--libcrystfel/src/integration.c18
-rw-r--r--libcrystfel/src/integration.h3
-rw-r--r--src/indexamajig.c4
4 files changed, 19 insertions, 8 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 25bc1cd6..cb24e916 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -330,7 +330,7 @@ Do not record integrated reflections in the stream. The resulting output won't
.PD 0
.IP \fB--int-diag=\fIcondition\fR\fR
.PD
-Show detailed information about reflection integration when \fIcondition\fR is met. The \fIcondition\fR can be \fBall\fR, \fBnone\fR, a set of Miller indices separated by commas, \fBrandom\fR or \fBnegative\fR. \fBrandom\fR means to show information about a random 1% of the peaks. \fBnegative\fR means to show peaks with intensities which are negative my more than 3 sigma. The default is \fB--int-diag=none\fR.
+Show detailed information about reflection integration when \fIcondition\fR is met. The \fIcondition\fR can be \fBall\fR, \fBnone\fR, a set of Miller indices separated by commas, \fBrandom\fR, \fBimplausible\fR or \fBnegative\fR. \fBrandom\fR means to show information about a random 1% of the peaks. \fBnegative\fR means to show peaks with intensities which are negative my more than 3 sigma. \fBimplausible\fR means to show peaks with intensities which are negative my more than 5 sigma. The default is \fB--int-diag=none\fR.
.SH BUGS
ReAx indexing is experimental. It works very nicely for some people, and crashes for others. In a future version, it will be improved and fully supported.
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;
diff --git a/src/indexamajig.c b/src/indexamajig.c
index b769d303..7aeccd53 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -552,6 +552,10 @@ int main(int argc, char *argv[])
iargs.int_diag = INTDIAG_NEGATIVE;
}
+ if ( strcmp(int_diag, "implausible") == 0 ) {
+ iargs.int_diag = INTDIAG_IMPLAUSIBLE;
+ }
+
r = sscanf(int_diag, "%i,%i,%i", &h, &k, &l);
if ( r == 3 ) {
iargs.int_diag = INTDIAG_INDICES;