aboutsummaryrefslogtreecommitdiff
path: root/src/process_hkl.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2009-12-08 21:17:17 +0100
committerThomas White <taw@physics.org>2009-12-08 21:17:17 +0100
commit8d1254709ac940882ac5ac4dca4b600c79e8df77 (patch)
tree343d78d1b0925d5a3abf3c35302dc08c0bb5000f /src/process_hkl.c
parent95dc6b406ac63cc1a4393688f792fb567512105d (diff)
Output convergence.dat file (R vs n_patterns)
Diffstat (limited to 'src/process_hkl.c')
-rw-r--r--src/process_hkl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process_hkl.c b/src/process_hkl.c
index 3961046e..d4f2d6bf 100644
--- a/src/process_hkl.c
+++ b/src/process_hkl.c
@@ -139,6 +139,7 @@ static void process_reflections(double *ref, double *trueref,
int ctot = 0;
int nmeas = 0;
double R, scale;
+ FILE *fh;
for ( j=0; j<LIST_SIZE; j++ ) {
ctot += counts[j];
@@ -163,6 +164,10 @@ static void process_reflections(double *ref, double *trueref,
snprintf(name, 63, "results/ZA-%u.dat", n_patterns);
write_reflections(name, counts, ref, 1, cell);
}
+
+ fh = fopen("results/convergence.dat", "a");
+ fprintf(fh, "%u %5.2f %5.2f\n", n_patterns, R*100.0, mean_counts);
+ fclose(fh);
}