aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/integration.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index bcd0a88b..ed2348ac 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -878,12 +878,6 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat)
if ( sat != NULL ) *sat = 1;
}
- if ( (bx->bm[p+ic->w*q] != BM_IG)
- && (bx->bm[p+ic->w*q] != BM_BH)
- && (boxi(ic, bx, p, q) > bx->peak) ) {
- bx->peak = boxi(ic, bx, p, q);
- }
-
/* Ignore if this pixel is closer to the next reciprocal lattice
* point */
dv = get_q_for_panel(bx->p, fs, ss, NULL, ic->k);
@@ -897,6 +891,12 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat)
bx->bm[p+ic->w*q] = BM_BH;
}
+ if ( (bx->bm[p+ic->w*q] != BM_IG)
+ && (bx->bm[p+ic->w*q] != BM_BH)
+ && (boxi(ic, bx, p, q) > bx->peak) ) {
+ bx->peak = boxi(ic, bx, p, q);
+ }
+
if ( bx->bm[p+ic->w*q] == BM_PK ) n_pk++;
if ( bx->bm[p+ic->w*q] == BM_BG ) n_bg++;