aboutsummaryrefslogtreecommitdiff
path: root/src/mapping.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-11-02 19:06:04 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-11-02 19:06:04 +0000
commit4b6725f92bd05657134476056c88c3e224c10101 (patch)
tree5c7cbc5041aa955ea40eaf81194980deb452837d /src/mapping.c
parent4700f1e11171d2900489e221494a42d90ccdfd4b (diff)
More work on refinement
Store absolute image coordinates in cache (not relative to centre) git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@190 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/mapping.c')
-rw-r--r--src/mapping.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapping.c b/src/mapping.c
index 668bfc4..afe36c4 100644
--- a/src/mapping.c
+++ b/src/mapping.c
@@ -38,7 +38,7 @@ int mapping_map_to_space(ImageFeature *refl, double *ddx, double *ddy, double *d
double nx, ny, nz;
imagerecord = refl->parent;
- x = refl->x; y = refl->y;
+ 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 */
k = 1/imagerecord->lambda;
@@ -95,7 +95,7 @@ int mapping_map_to_space(ImageFeature *refl, double *ddx, double *ddy, double *d
static void mapping_map_features(ControlContext *ctx) {
int i;
-
+
/* Create reflection list for measured reflections */
if ( ctx->reflectionlist ) reflectionlist_free(ctx->reflectionlist);
ctx->reflectionlist = reflectionlist_new();
@@ -114,7 +114,7 @@ static void mapping_map_features(ControlContext *ctx) {
reflection_add(ctx->reflectionlist, nx, ny, nz,
ctx->images->images[i].features->features[j].intensity, REFLECTION_NORMAL);
}
-
+
}
}