aboutsummaryrefslogtreecommitdiff
path: root/src/process_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-12-04 17:17:32 +0100
committerThomas White <taw@physics.org>2009-12-04 17:17:32 +0100
commite3cea2344b21dba055dee5c172113cf82ec57cbd (patch)
treedbe3b6b6a22055a4a30944d3171efcd8e99411b2 /src/process_hkl.c
parent8ca26b134904a1d998a713e4215f1a50a5613678 (diff)
Allow -e 0, analyse after all patterns
Diffstat (limited to 'src/process_hkl.c')
-rw-r--r--src/process_hkl.c13
1 files changed, 6 insertions, 7 deletions
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=<n> 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=<n> 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);