diff options
author | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-11-30 12:28:38 +0000 |
---|---|---|
committer | taw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1> | 2007-11-30 12:28:38 +0000 |
commit | 627e71291eb879b77a97e1c429cfb8c6181f7179 (patch) | |
tree | 942584016c92652417f91c88cb53df6fb70bb040 /src | |
parent | 9fd9bf7adabd3760df1aac9b7d98a48b415bbc36 (diff) |
Fix output formatting
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@215 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src')
-rw-r--r-- | src/refine.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/refine.c b/src/refine.c index f9c7a32..6b6eefc 100644 --- a/src/refine.c +++ b/src/refine.c @@ -89,7 +89,7 @@ static ImageFeature *refine_fit_image(Basis *cell, ImageRecord *image, Reflectio /* Determine the difference vector */ dix = rf->partner->x - rf->x; diy = rf->partner->y - rf->y; - printf("RF: Feature %3i: %3i %3i %3i dev = %f %f px ", j, h, k, l, dix, diy); + printf("RF: Feature %3i: %3i %3i %3i dev = %+9.5f %+9.5f px ", j, h, k, l, dix, diy); old_x = rf->partner->x; old_y = rf->partner->y; @@ -98,7 +98,7 @@ static ImageFeature *refine_fit_image(Basis *cell, ImageRecord *image, Reflectio mapping_scale(rf->partner, &dx, &dy); rf->partner->x = old_x; rf->partner->y = old_y; - printf("=> %f %f nm^-1\n", dx/1e9, dy/1e9); + printf("=> %+10.5f %+10.5f nm^-1\n", dx/1e9, dy/1e9); xy = 0; switch ( axis ) { @@ -166,21 +166,24 @@ static ImageFeature *refine_fit_image(Basis *cell, ImageRecord *image, Reflectio gsl_vector_free(p); gsl_vector_free(q); - printf("a should change by %f %f nm^-1 in the image plane\n", dax/1e9, day/1e9); - printf("b should change by %f %f nm^-1 in the image plane\n", dbx/1e9, dby/1e9); - printf("c should change by %f %f nm^-1 in the image plane\n", dcx/1e9, dcy/1e9); + printf("a should change by %+7.5f %+7.5f nm^-1 in the image plane\n", dax/1e9, day/1e9); + printf("b should change by %+7.5f %+7.5f nm^-1 in the image plane\n", dbx/1e9, dby/1e9); + printf("c should change by %+7.5f %+7.5f nm^-1 in the image plane\n", dcx/1e9, dcy/1e9); /* Update the cell */ mapping_rotate(dax, day, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt); - printf("a changed by %f %f %f nm^-1 in reciprocal space (%f %f %f %%)\n", dlx, dly, dlz, 100*dlx/cell->a.x, 100*dlx/cell->a.y, 100*dlx/cell->a.z); + printf("a changed by %f %f %f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9, + 100*dlx/cell->a.x, 100*dly/cell->a.y, 100*dlz/cell->a.z); cell->a.x += dlx; cell->a.y += dly; cell->a.z += dlz; mapping_rotate(dbx, dby, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt); - printf("b changed by %f %f %f nm^-1 in reciprocal space (%f %f %f %%)\n", dlx, dly, dlz, 100*dlx/cell->b.x, 100*dlx/cell->b.y, 100*dlx/cell->b.z); + printf("b changed by %f %f %f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9, + 100*dlx/cell->b.x, 100*dly/cell->b.y, 100*dlz/cell->b.z); cell->b.x += dlx; cell->b.y += dly; cell->b.z += dlz; mapping_rotate(dcx, dcy, 0.0, &dlx, &dly, &dlz, image->omega, image->tilt); - printf("c changed by %f %f %f nm^-1 in reciprocal space (%f %f %f %%)\n", dlx, dly, dlz, 100*dlx/cell->c.x, 100*dlx/cell->c.y, 100*dlx/cell->c.z); + printf("c changed by %f %f %f nm^-1 in reciprocal space (%+10.5f %+10.5f %+10.5f %%)\n", dlx/1e9, dly/1e9, dlz/1e9, + 100*dlx/cell->c.x, 100*dly/cell->c.y, 100*dlz/cell->c.z); cell->c.x += dlx; cell->c.y += dly; cell->c.z += dlz; return NULL; |