From e3cea2344b21dba055dee5c172113cf82ec57cbd Mon Sep 17 00:00:00 2001 From: Thomas White Date: Fri, 4 Dec 2009 17:17:32 +0100 Subject: Allow -e 0, analyse after all patterns --- src/process_hkl.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/process_hkl.c') diff --git a/src/process_hkl.c b/src/process_hkl.c index 3789c94f..c7a1a2a1 100644 --- a/src/process_hkl.c +++ b/src/process_hkl.c @@ -45,7 +45,8 @@ static void show_help(const char *s) " The default is to use the mean value from all\n" " measurements.\n" " -e, --output-every= Analyse figures of merit after every n patterns\n" -" (default: 1000).\n" +" Default: 1000. A value of zero means to do the\n" +" analysis only after reading all the patterns.\n" " -r, --rvsq Output lists of R vs |q| (\"Luzzatti plots\") when\n" " analysing figures of merit.\n" " --stop-after= Stop after processing n patterns (zero means\n" @@ -239,11 +240,6 @@ int main(int argc, char *argv[]) return 1; } - if ( config_every <= 0 ) { - ERROR("Invalid value for --output-every.\n"); - return 1; - } - mol = load_molecule(); get_reflections_cached(mol, eV_to_J(2.0e3)); @@ -277,7 +273,7 @@ int main(int argc, char *argv[]) continue; } - if ( n_patterns % config_every == 0 ) { + if (config_every && (n_patterns % config_every == 0)) { process_reflections(ref, trueref, counts, n_patterns, mol->cell, config_rvsq, @@ -308,6 +304,9 @@ int main(int argc, char *argv[]) fclose(fh); + process_reflections(ref, trueref, counts, n_patterns, mol->cell, + config_rvsq, config_zoneaxis); + write_reflections("results/reflections.hkl", counts, ref, 0, NULL); STATUS("There were %u patterns.\n", n_patterns); -- cgit v1.2.3