diff options
author | Thomas White <taw@physics.org> | 2012-10-01 18:34:30 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-10-01 18:36:36 +0200 |
commit | b9af6d806e147560aa943ce2c1f17034b2ddd462 (patch) | |
tree | 4e03b68528ea309475f91ddfc887fd7263cdb7e3 /libcrystfel/src/peaks.c | |
parent | e66759e2af3e761915fa02d842e9e00673452741 (diff) |
Fix exit condition from integrate_peak()
This fixes a significant data quality regression introduced by f668e3b3 (21st June 2012)
Diffstat (limited to 'libcrystfel/src/peaks.c')
-rw-r--r-- | libcrystfel/src/peaks.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcrystfel/src/peaks.c b/libcrystfel/src/peaks.c index 418e7bde..8d488fea 100644 --- a/libcrystfel/src/peaks.c +++ b/libcrystfel/src/peaks.c @@ -330,10 +330,12 @@ static int integrate_peak(struct image *image, int cfs, int css, if ( dfs*dfs + dss*dss > 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; + }; idx = dfs+cfs+image->width*(dss+css); |