diff options
author | Thomas White <taw@physics.org> | 2011-03-09 12:09:40 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:19 +0100 |
commit | 92d2ae92312fcb6537f6a3b4672a83d0b326dec9 (patch) | |
tree | f38cad97c8f4e131d3dc4170cc95295f264bdc7f | |
parent | b6aa8d3c03fde89f8b89f0d60f7892c6fc421128 (diff) |
Move bad region check to integrate_peak()
-rw-r--r-- | src/peaks.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/peaks.c b/src/peaks.c index 729ad6db..a683545b 100644 --- a/src/peaks.c +++ b/src/peaks.c @@ -231,6 +231,10 @@ int integrate_peak(struct image *image, int xp, int yp, *intensity = total; } + if ( in_bad_region(image->det, *xc, *yc) ) { + return 1; + } + if ( pbg != NULL ) { *pbg = (noise / noise_counts); } @@ -353,11 +357,6 @@ static void search_peaks_in_panel(struct image *image, float threshold, continue; } - if ( in_bad_region(image->det, f_fs, f_ss) ) { - nrej_bad++; - continue; - } - /* It is possible for the centroid to fall outside the image */ if ( (f_fs < p->min_fs) || (f_fs > p->max_fs) || (f_ss < p->min_ss) || (f_ss > p->max_ss) ) { |