From 1ebf2772e92a4f9344f9dca456abf8c30be731d2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 27 Feb 2018 15:14:26 +0100 Subject: Write spectra and grid scans after every iteration, and also before the first and at end Also, do it in parallel. --- src/post-refinement.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/post-refinement.c') diff --git a/src/post-refinement.c b/src/post-refinement.c index 68f72bf2..b2fbb537 100644 --- a/src/post-refinement.c +++ b/src/post-refinement.c @@ -709,9 +709,6 @@ static void do_pr_refine(Crystal *cr, const RefList *full, char fn[64]; - write_gridscan(cr, full, cycle, serial); - write_specgraph(cr, full, cycle, serial); - snprintf(fn, 63, "pr-logs/crystal%i-cycle%i.log", serial, cycle); fh = fopen(fn, "w"); if ( fh != NULL ) { @@ -830,6 +827,11 @@ static void do_pr_refine(Crystal *cr, const RefList *full, ERROR("Bad refinement: crystal %i\n", serial); } + if ( write_logs ) { + write_gridscan(cr, full, cycle, serial); + write_specgraph(cr, full, cycle, serial); + } + gsl_multimin_fminimizer_free(min); gsl_vector_free(priv.initial); gsl_vector_free(priv.vals); -- cgit v1.2.3