aboutsummaryrefslogtreecommitdiff
path: root/src/dirax.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-04 10:34:54 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-10-04 10:34:54 +0000
commite3a59f0de58d873837252d4decdd8f727392fad7 (patch)
treedf9dff6bfd8633065467492a2dc25c216041ce12 /src/dirax.c
parent6c4cc88d5248507a3ce9970e1ed8eca60b60952a (diff)
Tidy-up
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@153 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/dirax.c')
-rw-r--r--src/dirax.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dirax.c b/src/dirax.c
index 79ad808..aadc82d 100644
--- a/src/dirax.c
+++ b/src/dirax.c
@@ -52,6 +52,11 @@ static void dirax_parseline(const char *line, ControlContext *ctx) {
printf("DX: DirAx: %s\n", copy);
free(copy);
+ if ( strstr(line, "reflections from file") ) {
+ displaywindow_error("DirAx can't understand this data.", ctx->dw);
+ return;
+ }
+
/* Is this the first line of a unit cell specification? */
rf = 0; i = 0;
while ( (i<strlen(line)) && ((line[i] == 'R') || (line[i] == 'D') || (line[i] == ' ')) ) {
@@ -361,9 +366,14 @@ void dirax_invoke(ControlContext *ctx) {
}
fprintf(fh, "%f\n", 0.5); /* Lie about the wavelength. DirAx can't handle the truth. */
ref = ctx->reflectionlist->reflections;
+ int i=0;
while ( ref ) {
- fprintf(fh, "%f %f %f %f\n", ref->x/1e10, ref->y/1e10, ref->z/1e10, ref->intensity);
+ fprintf(fh, "%10f %10f %10f %8f\n", ref->x/1e10, ref->y/1e10, ref->z/1e10, ref->intensity);
ref = ref->next;
+ i++;
+ if ( i==14 ) {
+ printf("%10f %10f %10f %8f\n", ref->x/1e10, ref->y/1e10, ref->z/1e10, ref->intensity);
+ }
}
fclose(fh);