aboutsummaryrefslogtreecommitdiff
path: root/src/peaks.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-11-16 09:56:24 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:05 +0100
commit0567569d2f97a5c4aae54d6f8b27f0eeb7539b86 (patch)
tree473b9bf0e5129ac4cedffe775b6696a2de6821fa /src/peaks.c
parent5447d802f6c8baedf350c2fe002757b390e7c8da (diff)
indexamajig: Take minimum gradient 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 c75ffd21..2098f6ec 100644
--- a/src/peaks.c
+++ b/src/peaks.c
@@ -302,7 +302,7 @@ int integrate_peak(struct image *image, int xp, int yp,
}
-void search_peaks(struct image *image, float threshold)
+void search_peaks(struct image *image, float threshold, float min_gradient)
{
int x, y, width, height;
float *data;
@@ -364,7 +364,7 @@ void search_peaks(struct image *image, float threshold)
/* Calculate overall gradient */
grad = dxs + dys;
- if ( grad < 100000 ) continue;
+ if ( grad < min_gradient ) continue;
mask_x = x;
mask_y = y;