aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw27@cam.ac.uk>2008-10-15 18:19:26 +0100
committerThomas White <taw27@cam.ac.uk>2008-10-15 18:19:26 +0100
commita066052be7beab1a2657dced4a03e8be4d9e3bd6 (patch)
tree5b7c9638aebc4931fad70fbad1dc47502da2b3d4
parent74ac0499829c6fb2d45af4b1dae0978e3d6bc649 (diff)
Remove debugging stuff
-rw-r--r--src/reproject.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/reproject.c b/src/reproject.c
index 43b525b..46d59c9 100644
--- a/src/reproject.c
+++ b/src/reproject.c
@@ -55,8 +55,6 @@ ImageFeatureList *reproject_get_reflections(ImageRecord *image, ReflectionList *
double nx, ny, nz; /* "normal" vector */
double kx, ky, kz; /* Electron wavevector ("normal" times 1/lambda */
double ux, uy, uz; /* "up" vector */
- int done_debug = 0;
- int i = 0;
flist = image_feature_list_new();
@@ -119,9 +117,6 @@ ImageFeatureList *reproject_get_reflections(ImageRecord *image, ReflectionList *
double psi, disc;
- reflection_add(ctx->reflectionlist, xl, yl, zl, 1, REFLECTION_GENERATED);
- reflection_add(ctx->reflectionlist, xi, yi, zi, 1, REFLECTION_MARKER);
-
/* Calculate azimuth of point in image (clockwise from "up", will be changed later) */
cx = yi*nz-zi*ny; cy = nx*zi-nz*xi; cz = ny*xi-nx*yi; /* c = i x n */
psi = angle_between(cx, cy, cz, ux, uy, uz);
@@ -129,33 +124,17 @@ ImageFeatureList *reproject_get_reflections(ImageRecord *image, ReflectionList *
/* Finally, resolve the +/- Pi ambiguity from the previous step */
rx = cy*nz-cz*ny; ry = nx*cz-nz*cx; rz = ny*cx-nx*cy; /* r = [i x n] x n */
disc = angle_between(rx, ry, rz, ux, uy, uz);
- if ( (i==20) && !done_debug ) {
- reflection_add(ctx->reflectionlist, xi, yi, zi, 1, REFLECTION_VECTOR_MARKER_3);
- reflection_add(ctx->reflectionlist, cx, cy, cz, 1, REFLECTION_VECTOR_MARKER_4);
- reflection_add(ctx->reflectionlist, rx, ry, rz, 1, REFLECTION_VECTOR_MARKER_4);
- printf("psi=%f deg, disc=%f deg\n", rad2deg(psi), rad2deg(disc));
- }
if ( (psi >= M_PI_2) && (disc >= M_PI_2) ) {
psi -= M_PI_2; /* Case 1 */
- if ( (i==20) && !done_debug ) printf("case 1\n");
} else if ( (psi >= M_PI_2) && (disc < M_PI_2) ) {
psi = 3*M_PI_2 - psi; /* Case 2 */
- if ( (i==20) && !done_debug ) printf("case 2\n");
} else if ( (psi < M_PI_2) && (disc < M_PI_2) ) {
psi = 3*M_PI_2 - psi; /* Case 3 */
- if ( (i==20) && !done_debug ) printf("case 3\n");
} else if ( (psi < M_PI_2) && (disc >= M_PI_2) ) {
psi = 3*M_PI_2 + psi; /* Case 4 */
- if ( (i==20) && !done_debug ) printf("case 4\n");
}
- if ( (i==20) && !done_debug ) printf("final psi=%f clockwise from 'up'\n",
- rad2deg(psi));
psi = M_PI_2 - psi; /* Anticlockwise from "+x" instead of clockwise from "up" */
- if ( (i==20) && !done_debug ) printf("final psi=%f anticlockwise from +x\n",
- rad2deg(psi));
-
- if ( (i==20) && !done_debug ) done_debug = 1;
/* Calculate image coordinates from polar representation */
if ( image->fmode == FORMULATION_CLEN ) {
@@ -188,8 +167,6 @@ ImageFeatureList *reproject_get_reflections(ImageRecord *image, ReflectionList *
} /* else it's outside the picture somewhere */
- i++;
-
} /* else this is the central beam so don't worry about it */
}