From 38c560f7fc99383883890d746e74bd774a0309c7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 13 May 2017 12:04:47 +0200 Subject: indexamajig: Add --min-peaks (basic hitfinder functionality) --- src/process_image.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/process_image.c') diff --git a/src/process_image.c b/src/process_image.c index d3177d82..f735cb00 100644 --- a/src/process_image.c +++ b/src/process_image.c @@ -249,6 +249,17 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, image.bw = 0.00000001; } + if ( image_feature_count(image.features) < iargs->min_peaks ) { + r = chdir(rn); + if ( r ) { + ERROR("Failed to chdir: %s\n", strerror(errno)); + imagefile_close(imfile); + return; + } + free(rn); + goto streamwrite; + } + /* Index the pattern */ time_accounts_set(taccs, TACC_INDEXING); index_pattern_2(&image, iargs->ipriv, &sb_shared->pings[cookie]); @@ -292,6 +303,7 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs, iargs->int_diag_k, iargs->int_diag_l, &sb_shared->term_lock); +streamwrite: time_accounts_set(taccs, TACC_WRITESTREAM); sb_shared->pings[cookie]++; ret = write_chunk(st, &image, imfile, -- cgit v1.2.3