aboutsummaryrefslogtreecommitdiff
path: root/src/reflections.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-09-05 12:49:11 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-09-05 12:49:11 +0000
commit14b61d030c6b17a7c4d5c6eee03e73c96fa100ec (patch)
tree3935f920df3bd541c00219e4747593a8d40b77c8 /src/reflections.c
parente26c46cd662a8f9680668a661ad0214d04409480 (diff)
New formulation for rotations (goes with previous commit
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@119 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/reflections.c')
-rw-r--r--src/reflections.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/reflections.c b/src/reflections.c
index ba68baa..a490364 100644
--- a/src/reflections.c
+++ b/src/reflections.c
@@ -178,6 +178,12 @@ void reflection_add_from_dp(ControlContext *ctx, double x, double y, ImageRecord
ny = cos(tilt)*y_temp - sin(tilt)*z_temp;
nz = -sin(tilt)*y_temp - cos(tilt)*z_temp;
+ /* Finally, reverse the omega rotation to restore the location of the image in 3D space */
+ x_temp = nx; y_temp = ny; z_temp = nz;
+ nx = x_temp*cos(-omega) + y_temp*-sin(-omega);
+ ny = x_temp*sin(-omega) + y_temp*cos(-omega);
+ nz = z_temp;
+
reflection_add(ctx->reflectionctx, nx, ny, nz, intensity, REFLECTION_NORMAL);
}