diff options
author | Thomas White <taw@physics.org> | 2017-05-13 12:04:47 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-06-21 14:26:02 +0200 |
commit | 38c560f7fc99383883890d746e74bd774a0309c7 (patch) | |
tree | 14deff6aab9832f8bcd00e90c28180e2d39d08a9 /src/process_image.c | |
parent | 5e9137947df9330308e1f66fa4a0701481ba6e06 (diff) |
indexamajig: Add --min-peaks (basic hitfinder functionality)
Diffstat (limited to 'src/process_image.c')
-rw-r--r-- | src/process_image.c | 12 |
1 files changed, 12 insertions, 0 deletions
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, |