diff options
Diffstat (limited to 'src/mapping.c')
-rw-r--r-- | src/mapping.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mapping.c b/src/mapping.c index bc6e062..c9872f9 100644 --- a/src/mapping.c +++ b/src/mapping.c @@ -19,6 +19,7 @@ #include "image.h" #include "displaywindow.h" #include "cache.h" +#include "utils.h" void mapping_rotate(double x, double y, double z, double *ddx, double *ddy, double *ddz, double omega, double tilt) { @@ -66,8 +67,8 @@ int mapping_map_to_space(ImageFeature *refl, double *ddx, double *ddy, double *d imagerecord = refl->parent; x = refl->x - imagerecord->x_centre; y = refl->y - imagerecord->y_centre; - tilt = 2*M_PI*(imagerecord->tilt/360); /* Convert to Radians */ - omega = 2*M_PI*(imagerecord->omega/360); /* Likewise */ + tilt = imagerecord->tilt; + omega = imagerecord->omega; k = 1/imagerecord->lambda; /* Calculate an angular description of the reflection */ @@ -162,7 +163,8 @@ void mapping_adjust_axis(ControlContext *ctx, double offset) { int i; for ( i=0; i<ctx->images->n_images; i++ ) { - printf("Image #%3i: old omega=%f deg, new omega=%f deg\n", i, ctx->images->images[i].omega, ctx->images->images[i].omega+offset); + printf("Image #%3i: old omega=%f deg, new omega=%f deg\n", i, rad2deg(ctx->images->images[i].omega), + rad2deg(ctx->images->images[i].omega+offset)); ctx->images->images[i].omega += offset; } |