aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-03-03 19:13:47 +0100
committerThomas White <taw@physics.org>2014-03-03 19:13:47 +0100
commitb6d43aa2f25aa4ba8414d609cf352bc99ea2707d (patch)
tree444a2efed105cee86e66719d1ed79c9014b863f3 /libcrystfel
parentbd25e167efdbaf1ee62b080b7623ee56fc1a76e8 (diff)
Test for brightest pixel after checking for closer reciprocal lattice point
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++;