aboutsummaryrefslogtreecommitdiff
path: root/src/reflections.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-08-11 17:14:30 +0200
committerThomas White <taw@physics.org>2012-02-22 15:26:55 +0100
commit7db02796202f8f36ddaa85a0f53633fab9acb274 (patch)
tree085963890e3c3409227a56778718b2ae10952982 /src/reflections.c
parent395da55d2e5f8a5a0a358e3c2ee49d366a6e1a41 (diff)
Placeholder sigma(I)
Diffstat (limited to 'src/reflections.c')
-rw-r--r--src/reflections.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/reflections.c b/src/reflections.c
index 0ab7a91e..9a1a2910 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -52,7 +52,7 @@ void write_reflections(const char *filename, ReflItemList *items,
h = it->h; k = it->k; l = it->l;
int N;
- double intensity, s;
+ double intensity, s, sigma;
char ph[32];
if ( counts ) {
@@ -77,9 +77,15 @@ void write_reflections(const char *filename, ReflItemList *items,
s = 0.0;
}
+ if ( intensity > 0.0 ) {
+ sigma = sqrt(intensity);
+ } else {
+ sigma = 0.0;
+ }
+
/* h, k, l, I, sigma(I), s */
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);
+ h, k, l, intensity, ph, sigma, s/1.0e9, N);
}
fclose(fh);