diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-01-26 14:08:01 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:12 +0100 |
commit | 0358ad008302c93675089f0265a68e6e1997da93 (patch) | |
tree | 670d482ac40ee3868b77139e331da540e7c2ddab | |
parent | 329134c42a76339438e4189e2cde05895e17ab62 (diff) |
indexamajig: Remove "--check-sanity" option
Why wouldn't you want sane results?
-rw-r--r-- | src/index.c | 13 | ||||
-rw-r--r-- | src/indexamajig.c | 24 |
2 files changed, 12 insertions, 25 deletions
diff --git a/src/index.c b/src/index.c index 23a8016a..e3926c8e 100644 --- a/src/index.c +++ b/src/index.c @@ -200,12 +200,19 @@ void index_pattern(struct image *image, UnitCell *cell, IndexingMethod *indm, break; } - image->indexed_cell = new_cell; - if ( new_cell != NULL ) { - STATUS("Matched on attempt %i.\n", i); + /* No cell? Move on to the next method */ + if ( new_cell == NULL ) { + goto done; + } + + /* Sanity check */ + if ( !peak_sanity_check(image, new_cell, 0, 0.1) ) { + STATUS("Failed peak sanity check.\n"); goto done; } + image->indexed_cell = new_cell; + } /* Move on to the next indexing method */ diff --git a/src/indexamajig.c b/src/indexamajig.c index 774cfde4..411a1b63 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -60,7 +60,6 @@ struct static_index_args int config_gpu; int config_simulate; int config_polar; - int config_sanity; int config_satcorr; int config_closer; float threshold; @@ -92,7 +91,6 @@ struct index_args /* "Output" */ int indexable; - int sane; }; @@ -104,7 +102,6 @@ struct queue_args struct static_index_args static_args; int n_indexable; - int n_sane; char *use_this_one_instead; }; @@ -169,8 +166,6 @@ static void show_help(const char *s) " reduce : full cell reduction.\n" " compare : match by at most changing the order of\n" " the indices.\n" -" --check-sanity Check that indexed locations approximately correspond\n" -" with detected peaks.\n" " --filter-cm Perform common-mode noise subtraction on images\n" " before proceeding. Intensities will be extracted\n" " from the image as it is after this processing.\n" @@ -334,7 +329,6 @@ static void process_image(void *pp, int cookie) STATUS("Processing '%s'\n", image.filename); - pargs->sane = 0; pargs->indexable = 0; hdfile = hdfile_open(filename); @@ -399,15 +393,6 @@ static void process_image(void *pp, int cookie) if ( image.indexed_cell == NULL ) goto done; pargs->indexable = 1; - /* Sanity check */ - if ( pargs->static_args.config_sanity - && !peak_sanity_check(&image, image.indexed_cell, 0, 0.1) ) { - STATUS("Failed peak sanity check.\n"); - goto done; - } else { - pargs->sane = 1; - } - /* Measure intensities if requested */ if ( config_nearbragg ) { output_intensities(&image, image.indexed_cell, @@ -493,7 +478,6 @@ static void finalise_image(void *qp, void *pp) struct index_args *pargs = pp; qargs->n_indexable += pargs->indexable; - qargs->n_sane += pargs->sane; free(pargs->filename); free(pargs); @@ -520,7 +504,6 @@ int main(int argc, char *argv[]) int config_verbose = 0; int config_alternate = 0; int config_polar = 1; - int config_sanity = 0; int config_satcorr = 1; int config_checkprefix = 1; int config_closer = 1; @@ -579,7 +562,6 @@ int main(int argc, char *argv[]) {"pdb", 1, NULL, 'p'}, {"prefix", 1, NULL, 'x'}, {"unpolarized", 0, &config_polar, 0}, - {"check-sanity", 0, &config_sanity, 1}, {"no-sat-corr", 0, &config_satcorr, 0}, {"sat-corr", 0, &config_satcorr, 1}, /* Compat */ {"threshold", 1, NULL, 't'}, @@ -875,7 +857,6 @@ int main(int argc, char *argv[]) qargs.static_args.config_gpu = config_gpu; qargs.static_args.config_simulate = config_simulate; qargs.static_args.config_polar = config_polar; - qargs.static_args.config_sanity = config_sanity; qargs.static_args.config_satcorr = config_satcorr; qargs.static_args.config_closer = config_closer; qargs.static_args.cellr = cellr; @@ -897,7 +878,6 @@ int main(int argc, char *argv[]) qargs.fh = fh; qargs.prefix = prefix; qargs.n_indexable = 0; - qargs.n_sane = 0; n_images = run_threads(nthreads, process_image, get_image, finalise_image, &qargs, 0); @@ -911,8 +891,8 @@ int main(int argc, char *argv[]) if ( fh != stdout ) fclose(fh); free(sym); - STATUS("There were %i images. %i could be indexed, of which %i" - " looked sane.\n", n_images, qargs.n_indexable, qargs.n_sane); + STATUS("There were %i images, of which %i could be indexed.\n", + n_images, qargs.n_indexable); if ( gctx != NULL ) { cleanup_gpu(gctx); |