diff options
author | Thomas White <taw@physics.org> | 2017-09-08 11:41:51 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-09-15 14:31:01 +0200 |
commit | 60c48f3876b0d3c30bf729ce691dbd3f56665c4c (patch) | |
tree | 44868373d7053924a3de614568cdc148e01de61e /src/indexamajig.c | |
parent | 3f1c6a1fbc241721aafeb9e1e6c0cbdb1eb810b5 (diff) |
Simplify indexing options
mosflm-cell-nolatt-multi-refine-bad-retry.... it's all getting a bit
too much. This commit removes all the options from the indexing methods
except for the prior information flags (cell/nocell and latt/nolatt).
All the other options are now given at the top level with new
indexamajig options, e.g. --no-multi and --no-retry. They are applied
to all the methods, with no option to (say) use retry for one method and
not for another.
This also makes the "peak alignment test" default to OFF, and
multi-lattice indexing ON. I think that the prediction refinement does
a good enough job of checking the validity of indexing solutions,
allowing us to turn off the alignment check which filters out most
multi-lattice solutions.
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index a79234d3..44b91338 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -227,8 +227,13 @@ int main(int argc, char *argv[]) struct beam_params beam; int have_push_res = 0; int len; - int no_refine = 0; char *command_line_peak_path = NULL; + int if_refine = 1; + int if_comb = 1; + int if_axes = 1; + int if_peaks = 0; + int if_multi = 1; + int if_retry = 1; /* Defaults */ iargs.cell = NULL; @@ -312,9 +317,14 @@ int main(int argc, char *argv[]) {"no-use-saturated", 0, &iargs.use_saturated, 0}, {"no-revalidate", 0, &iargs.no_revalidate, 1}, {"check-hdf5-snr", 0, &iargs.check_hdf5_snr, 1}, - {"no-refine", 0, &no_refine, 1}, {"profile", 0, &iargs.profile, 1}, {"no-half-pixel-shift",0, &iargs.half_pixel_shift, 0}, + {"no-refine", 0, &if_refine, 0}, + {"no-cell-combinations",0,&if_comb, 0}, + {"no-check-cell", 0, &if_axes, 0}, + {"check-peaks", 0, &if_peaks, 1}, + {"no-retry", 0, &if_retry, 0}, + {"no-multi", 0, &if_multi, 0}, /* Long-only options which don't actually do anything */ {"no-sat-corr", 0, &iargs.satcorr, 0}, @@ -856,8 +866,30 @@ int main(int argc, char *argv[]) } else { + IndexingFlags flags = 0; + + if ( if_axes ) { + flags |= INDEXING_CHECK_CELL_AXES; + } + if ( if_comb ) { + flags |= INDEXING_CHECK_CELL_COMBINATIONS; + flags &= ~INDEXING_CHECK_CELL_AXES; /* Not needed */ + } + if ( if_refine ) { + flags |= INDEXING_REFINE; + } + if ( if_peaks ) { + flags |= INDEXING_CHECK_PEAKS; + } + if ( if_multi ) { + flags |= INDEXING_MULTI; + } + if ( if_retry ) { + flags |= INDEXING_RETRY; + } + iargs.ipriv = setup_indexing(indm_str, iargs.cell, iargs.det, - iargs.tols, no_refine, + iargs.tols, flags, iargs.felix_options, &iargs.taketwo_opts); if ( iargs.ipriv == NULL ) { |