aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2012-10-02 12:02:25 +0200
committerThomas White <taw@physics.org>2012-10-02 12:03:26 +0200
commit94de111a041638dc70751a8ab050ed7f63bf64dc (patch)
tree718283f433d28b8eb7b28adb53fff3c569b52c81
parentb9af6d806e147560aa943ce2c1f17034b2ddd462 (diff)
Fix the other exit condition from integrate_peak()
This REALLY fixes a significant data quality regression introduced by f668e3b3 (21st June 2012)
-rw-r--r--libcrystfel/src/peaks.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c
index 8d488fea..973dd523 100644
--- a/libcrystfel/src/peaks.c
+++ b/libcrystfel/src/peaks.c
@@ -263,10 +263,12 @@ static int integrate_peak(struct image *image, int cfs, int css,
if ( dfs*dfs + dss*dss < mid_lim_sq ) continue;
/* Strayed off one panel? */
- if ( p_cfs+dfs >= p_w ) continue;
- if ( p_css+dss >= p_h ) continue;
- if ( p_cfs+dfs < 0 ) continue;
- if ( p_css+dss < 0 ) continue;
+ if ( (p_cfs+dfs >= p_w) || (p_css+dss >= p_h)
+ || (p_cfs+dfs < 0 ) || (p_css+dss < 0) )
+ {
+ free(bgPkMask);
+ return 1;
+ };
/* Check if there is a peak in the background region */
if ( bgPkMask[(p_cfs+dfs) + p_w*(p_css+dss)] ) continue;