diff options
author | Thomas White <taw@physics.org> | 2012-05-21 15:52:06 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-05-21 15:52:06 +0200 |
commit | 934e9aeee2232692f289ef0faef2280017617d80 (patch) | |
tree | af2afda4dc60a02396395a174f67de8a2f5eaeb9 /libcrystfel/src/peaks.c | |
parent | 4aa325f2d840d8a2d0eeaff3d0c72bab39b51b5e (diff) |
ADU limit in peak integration
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r-- | libcrystfel/src/peaks.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 78a68185..91a8c949 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -211,6 +211,9 @@ static int integrate_peak(struct image *image, int cfs, int css, val = image->data[idx]; + /* Veto peak if it contains saturation in bg region */ + if ( val > p->max_adu ) return 1; + bg_tot += val; bg_tot_sq += pow(val, 2.0); bg_counts++; @@ -259,6 +262,9 @@ static int integrate_peak(struct image *image, int cfs, int css, val = image->data[idx] - bg_mean; + /* Veto peak if it contains saturation */ + if ( val > p->max_adu ) return 1; + pk_counts++; pk_total += val; |