aboutsummaryrefslogtreecommitdiff
path: root/src/post-refinement.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-02-27 15:14:26 +0100
committerThomas White <taw@physics.org>2018-02-27 17:12:42 +0100
commit1ebf2772e92a4f9344f9dca456abf8c30be731d2 (patch)
tree88bfd466928befb51b818736b1e41e0e5e1623f1 /src/post-refinement.c
parent5a8c9a183d2412c7bfda942dda56b2561bc67edb (diff)
Write spectra and grid scans after every iteration, and also before the first and at end
Also, do it in parallel.
Diffstat (limited to 'src/post-refinement.c')
-rw-r--r--src/post-refinement.c8
1 files changed, 5 insertions, 3 deletions
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);