aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-06-27 15:14:50 +0200
committerThomas White <taw@physics.org>2017-06-27 15:14:50 +0200
commit8672f2857f18841576dc54b9a64e25837730cddd (patch)
treec8882ede8c1a9dfdfecce967bee86fb79e3f7476
parent5bb6d2e69535498a2e4aaf41c51c7566cd15a170 (diff)
indexamajig: Add --no-non-hits-in-stream
-rw-r--r--doc/man/indexamajig.110
-rw-r--r--src/indexamajig.c4
-rw-r--r--src/process_image.c8
-rw-r--r--src/process_image.h1
4 files changed, 22 insertions, 1 deletions
diff --git a/doc/man/indexamajig.1 b/doc/man/indexamajig.1
index 5855c866..eaf812d6 100644
--- a/doc/man/indexamajig.1
+++ b/doc/man/indexamajig.1
@@ -233,6 +233,16 @@ these. The defaults are probably not appropriate for your situation.
The default is \fB--int-radius=4,5,7\fR.
.PD 0
+.IP \fB--min-peaks=\fIn\fR
+.PD
+Do not try to index frames with fewer than \fIn\fR peaks. These frames will still be described in the output stream. To exclude them, use \fB--no-non-hits-in-stream\fR.
+
+.PD 0
+.IP \fB--no-non-hits-in-stream\fR
+.PD
+Completely exclude 'non-hit' frames in the stream. When this option is given, frames with fewer than the number of peaks given to \fB--min-peaks\fR will not have chunks written to the stream at all.
+
+.PD 0
.IP \fB--basename\fR
.PD
Remove the directory parts of the filenames taken from the input file. If \fB--prefix\fR or \fB-x\fR is also given, the directory parts of the filename will be removed \fIbefore\fR adding the prefix.
diff --git a/src/indexamajig.c b/src/indexamajig.c
index fec7fc39..ce87fde6 100644
--- a/src/indexamajig.c
+++ b/src/indexamajig.c
@@ -160,6 +160,8 @@ static void show_help(const char *s)
" validity.\n"
" --no-peaks-in-stream Do not record peak search results in the stream.\n"
" --no-refls-in-stream Do not record integrated reflections in the stream.\n"
+" --no-non-hits-in-stream Do not include non-hit frames in the stream.\n"
+" (see --min-peaks)\n"
" --int-diag=<cond> Show debugging information about reflections.\n"
" --no-refine Skip the prediction refinement step.\n"
" --profile Show timing data for performance monitoring.\n"
@@ -257,6 +259,7 @@ int main(int argc, char *argv[])
iargs.no_revalidate = 0;
iargs.stream_peaks = 1;
iargs.stream_refls = 1;
+ iargs.stream_nonhits = 1;
iargs.int_diag = INTDIAG_NONE;
iargs.copyme = new_imagefile_field_list();
iargs.min_peaks = 0;
@@ -295,6 +298,7 @@ int main(int argc, char *argv[])
{"basename", 0, &config_basename, 1},
{"no-peaks-in-stream", 0, &iargs.stream_peaks, 0},
{"no-refls-in-stream", 0, &iargs.stream_refls, 0},
+ {"no-non-hits-in-stream", 0, &iargs.stream_nonhits, 0},
{"integrate-saturated",0, &integrate_saturated, 1},
{"no-use-saturated", 0, &iargs.use_saturated, 0},
{"no-revalidate", 0, &iargs.no_revalidate, 1},
diff --git a/src/process_image.c b/src/process_image.c
index f735cb00..498b3398 100644
--- a/src/process_image.c
+++ b/src/process_image.c
@@ -257,7 +257,12 @@ void process_image(const struct index_args *iargs, struct pattern_args *pargs,
return;
}
free(rn);
- goto streamwrite;
+
+ if ( iargs->stream_nonhits ) {
+ goto streamwrite;
+ } else {
+ goto out;
+ }
}
/* Index the pattern */
@@ -323,6 +328,7 @@ streamwrite:
get_event_string(image.event));
}
+out:
/* Count crystals which are still good */
time_accounts_set(taccs, TACC_TOTALS);
sb_shared->pings[cookie]++;
diff --git a/src/process_image.h b/src/process_image.h
index a668f1ba..ec51c188 100644
--- a/src/process_image.h
+++ b/src/process_image.h
@@ -87,6 +87,7 @@ struct index_args
int no_revalidate;
int stream_peaks;
int stream_refls;
+ int stream_nonhits;
IntegrationMethod int_meth;
IntDiag int_diag;
signed int int_diag_h;