aboutsummaryrefslogtreecommitdiff
path: root/src/reflections.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-06-10 20:07:36 -0700
committerThomas White <taw@bitwiz.org.uk>2010-06-10 20:07:36 -0700
commit8da20816630b540a1a65be3f02159d44c7574a7c (patch)
tree84a8b3821b6fc306a7f505e76d8d08e13c08a434 /src/reflections.c
parent8b54a98a5e644e1b81f3d68ef49e37112d3e3e2d (diff)
render_hkl: Also do 2D
Diffstat (limited to 'src/reflections.c')
-rw-r--r--src/reflections.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/reflections.c b/src/reflections.c
index 4b48c38f..90406bee 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -115,14 +115,18 @@ double *read_reflections(const char *filename, unsigned int *counts,
char line[1024];
signed int h, k, l;
float intensity, ph;
+ char phs[1024];
int r;
rval = fgets(line, 1023, fh);
- r = sscanf(line, "%i %i %i %f %f", &h, &k, &l, &intensity, &ph);
+ r = sscanf(line, "%i %i %i %f %s", &h, &k, &l, &intensity, phs);
if ( r != 5 ) continue;
set_intensity(ref, h, k, l, intensity);
- if ( phases != NULL ) set_phase(phases, h, k, l, ph);
+ if ( phases != NULL ) {
+ ph = atof(phs);
+ set_phase(phases, h, k, l, ph);
+ }
if ( counts != NULL ) set_count(counts, h, k, l, 1);
} while ( rval != NULL );