aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2014-08-14 14:13:19 +0200
committerThomas White <taw@physics.org>2014-08-14 14:13:19 +0200
commitaa442d971b02f3ca2c8ae0dae416cf65ff2fdd65 (patch)
tree240c4937dd2ebbb9af00837e7be7fc84d5cc5018 /libcrystfel
parente2335528269bf688d724248d3771cd3cee6558de (diff)
Apply overlap mask to BM_IG pixels as well
... because everything except BM_BH is used for centering.
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/integration.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index ec8bf05d..357ab7af 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -875,16 +875,27 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat)
/* If this is a background pixel, it shouldn't contain any
* pixels which are in the peak region of ANY reflection */
- if ( (ic->masks != NULL) && (bx->bm[p+ic->w*q] == BM_BG)
- && (ic->masks[bx->pn][fs + bx->p->w*ss] > 0) ) {
- bx->bm[p+ic->w*q] = BM_BH;
- }
+ if ( ic->masks != NULL ) {
- /* If this is a peak pixel, it shouldn't contain any pixels
- * which are in the peak region of more than one reflection */
- if ( (ic->masks != NULL) && (bx->bm[p+ic->w*q] == BM_PK)
- && (ic->masks[bx->pn][fs + bx->p->w*ss] > 1) ) {
- bx->bm[p+ic->w*q] = BM_BH;
+ switch ( bx->bm[p+ic->w*q] ) {
+
+ case BM_BG:
+ case BM_IG:
+ if ( ic->masks[bx->pn][fs + bx->p->w*ss] > 0 ) {
+ bx->bm[p+ic->w*q] = BM_BH;
+ }
+ break;
+
+ case BM_PK:
+ if ( ic->masks[bx->pn][fs + bx->p->w*ss] > 1 ) {
+ bx->bm[p+ic->w*q] = BM_BH;
+ }
+ break;
+
+ case BM_BH:
+ break;
+
+ }
}
if ( (bx->bm[p+ic->w*q] != BM_IG)