aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-09-07 11:13:09 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:56 +0100
commitfbb24f228ef9a59db897829d08396872f6435131 (patch)
treea22b9487d843cf1c06bfac639bcbb5affcaaadb4 /src/peaks.c
parent58149b59cd8d1ec119b4c99a9923c52be982ab75 (diff)
indexamajig: Get peak threshold on command line
Diffstat (limited to 'src/peaks.c')
-rw-r--r--src/peaks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/peaks.c b/src/peaks.c
index 56a79a05..7630f965 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -266,7 +266,7 @@ int integrate_peak(struct image *image, int xp, int yp,
}
-void search_peaks(struct image *image)
+void search_peaks(struct image *image, float threshold)
{
int x, y, width, height;
float *data;
@@ -305,7 +305,7 @@ void search_peaks(struct image *image)
int r;
/* Overall threshold */
- if ( data[x+width*y] < 50 ) continue;
+ if ( data[x+width*y] < threshold ) continue;
/* Get gradients */
dx1 = data[x+width*y] - data[(x+1)+width*y];