From 92d2ae92312fcb6537f6a3b4672a83d0b326dec9 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 9 Mar 2011 12:09:40 +0100 Subject: Move bad region check to integrate_peak() --- src/peaks.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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) ) { -- cgit v1.2.3