aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-03-08 15:24:56 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:18 +0100
commit5d916db27e826138312d59c9777a224e8f30771f (patch)
treecf508caf980ef174608b7035b9bf2c84f40d1ee2 /src/peaks.c
parent89fd8dbe41ab7796811cf280fef2f3c79c5a1d40 (diff)
Throw out detected peaks in bad regions
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/peaks.c b/src/peaks.c
index d7e202ee..65bf01fb 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -47,14 +47,6 @@
#define PEAK_WINDOW_SIZE (10)
-static int in_streak(int x, int y)
-{
- if ( (y>512) && (y<600) && (abs(x-489)<15) ) return 1;
- if ( (y>600) && (abs(x-480)<25) ) return 1;
- return 0;
-}
-
-
static int is_hot_pixel(struct image *image, int x, int y)
{
int dx, dy;
@@ -386,6 +378,11 @@ 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) ) {