aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/peaks.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r--libcrystfel/src/peaks.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 369a543f..0f5d96a6 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -507,12 +507,10 @@ static void search_peaks_in_panel(struct image *image, float threshold,
&f_fs, &f_ss, &intensity, &sigma,
ir_inn, ir_mid, ir_out, NULL, &saturated);
- if ( saturated ) {
- image->num_saturated_peaks++;
- if ( !use_saturated ) {
- nrej_sat++;
- continue;
- }
+ if ( r ) {
+ /* Bad region - don't detect peak */
+ nrej_fail++;
+ continue;
}
/* It is possible for the centroid to fall outside the image */
@@ -534,10 +532,12 @@ static void search_peaks_in_panel(struct image *image, float threshold,
continue;
}
- if ( r ) {
- /* Bad region - don't detect peak */
- nrej_fail++;
- continue;
+ if ( saturated ) {
+ image->num_saturated_peaks++;
+ if ( !use_saturated ) {
+ nrej_sat++;
+ continue;
+ }
}
/* Add using "better" coordinates */