aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/integration.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-12-05 13:35:56 -0800
committerThomas White <taw@physics.org>2015-12-05 13:47:36 -0800
commitf094e70fd60899579a8452c1c08121f25e0be885 (patch)
tree379f0a5ec91694c2a4df26a76e3dbe600bd6fdf3 /libcrystfel/src/integration.c
parent3fe4c04aacd623f76dcb35114a02b2b001900d4e (diff)
Add option for per-pixel saturation values
Diffstat (limited to 'libcrystfel/src/integration.c')
-rw-r--r--libcrystfel/src/integration.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libcrystfel/src/integration.c b/libcrystfel/src/integration.c
index 730a14ae..b3bee120 100644
--- a/libcrystfel/src/integration.c
+++ b/libcrystfel/src/integration.c
@@ -804,6 +804,7 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat)
double hd, kd, ld;
signed int h, k, l;
struct rvec dv;
+ float lsat;
fs = bx->cfs + p;
ss = bx->css + q;
@@ -844,9 +845,13 @@ static int check_box(struct intcontext *ic, struct peak_box *bx, int *sat)
}
}
+ /* Per-pixel saturation value */
+ lsat = ic->image->sat[bx->pn][fs + bx->p->w*ss];
if ( (bx->bm[p+ic->w*q] != BM_IG)
&& (bx->bm[p+ic->w*q] != BM_BH)
- && (boxi(ic, bx, p, q) > bx->p->max_adu) ) {
+ && ((boxi(ic, bx, p, q) > bx->p->max_adu)
+ || (boxi(ic, bx, p, q) > lsat)) )
+ {
if ( sat != NULL ) *sat = 1;
}