aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-06-28 02:52:20 -0700
committerThomas White <taw@physics.org>2013-06-28 02:52:20 -0700
commit0852a8ea1b4dad00f789093bba9123014670f5ef (patch)
treea40170a03d7857db872f7ebd768044d03970152e /libcrystfel
parent8a2f534166d35c72f78d7567f2a2f519213fa77c (diff)
Don't check max_adu during gradient search if --use-saturated is given
Diffstat (limited to 'libcrystfel')
-rw-r--r--libcrystfel/src/peaks.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 90ab8385..369a543f 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -436,7 +436,9 @@ static void search_peaks_in_panel(struct image *image, float threshold,
if ( data[fs+stride*ss] < threshold ) continue;
/* Immediate rejection of pixels above max_adu */
- if ( data[fs+stride*ss] > p->max_adu ) continue;
+ if ( !use_saturated && (data[fs+stride*ss] > p->max_adu) ) {
+ continue;
+ }
/* Get gradients */
dx1 = data[fs+stride*ss] - data[(fs+1)+stride*ss];