aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-30 16:27:18 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:51 +0100
commit5bd5b1dbd1a82ab67eb30b0a435c1728ae0905bf (patch)
tree78ce895ac0f5c9a02c5e90a79e0a9c2aa04ca333
parentd4f4991dfd12c8beba670fede3573a9061fbbb37 (diff)
Alter format of reflection list, and include number of counts
-rw-r--r--src/reflections.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/reflections.c b/src/reflections.c
index fdbe86a8..1177c612 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -50,7 +50,8 @@ void write_reflections(const char *filename, unsigned int *counts,
fprintf(fh, "angle %5.3f deg\n", rad2deg(alpha));
fprintf(fh, "scale 10\n");
} else {
- fprintf(fh, " h k l I phase(I) sigma(I) 1/d / nm^-1\n");
+ fprintf(fh, " h k l I phase sigma(I) "
+ " 1/d(nm^-1) counts\n");
}
for ( h=-INDMAX; h<INDMAX; h++ ) {
@@ -73,9 +74,9 @@ void write_reflections(const char *filename, unsigned int *counts,
if ( phases != NULL ) {
double p;
p = lookup_intensity(phases, h, k, l);
- snprintf(ph, 31, "%f", p);
+ snprintf(ph, 31, "%8.6f", p);
} else {
- strncpy(ph, "-", 31);
+ strncpy(ph, " -", 31);
}
if ( cell != NULL ) {
@@ -85,8 +86,8 @@ void write_reflections(const char *filename, unsigned int *counts,
}
/* h, k, l, I, sigma(I), s */
- fprintf(fh, "%3i %3i %3i %10.2f %s %10.2f %10.2f\n",
- h, k, l, intensity, ph, 0.0, s/1.0e9);
+ fprintf(fh, "%3i %3i %3i %10.2f %s %10.2f %10.2f %7i\n",
+ h, k, l, intensity, ph, 0.0, s/1.0e9, N);
}
}