diff options
-rw-r--r-- | src/ipr.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -39,12 +39,14 @@ static int ipr_choose_max(Basis *basis) { } +#if 0 static int ipr_random_image(ControlContext *ctx) { double n; n = (double)random()/RAND_MAX; n *= ctx->n_images; return (int)n; } +#endif static Reflection *ipr_random_reflection(ReflectionContext *rctx) { @@ -233,18 +235,12 @@ static double ipr_efom(ReflectionContext *rctx, Basis *basis) { k = ((a13*a32-a12*a33)*cur->x + (a11*a33-a13*a31)*cur->y + (a12*a31-a11*a32)*cur->z) / det; l = ((a12*a23-a13*a22)*cur->x + (a13*a21-a11*a23)*cur->y + (a11*a22-a12*a21)*cur->z) / det; - //printf("%12.0f %12.0f %12.0f ----> %3.2f %3.2f %3.2f", cur->x, cur->y, cur->z, h, k, l); - //printf("%f %f %f %f %f %f\n", cur->x, h*basis->a.x + k*basis->b.x + l*basis->c.x, - // cur->y, h*basis->a.y + k*basis->b.y + l*basis->c.y, - // cur->z, h*basis->a.z + k*basis->b.z + l*basis->c.z); - /* Calculate the deviations in terms of |a|, |b| and |c| */ h = fabs(h); k = fabs(k); l = fabs(l); h -= floor(h); k -= floor(k); l -= floor(l); if ( h == 1.0 ) h = 0.0; if ( k == 1.0 ) k = 0.0; if ( l == 1.0 ) l = 0.0; - //printf(" ----> %3.2f %3.2f %3.2f\n", h, k, l); if ( h*h + k*k + l*l <= 0.1*0.1*0.1 ) n_indexed++; n_counted++; @@ -393,7 +389,7 @@ int ipr_refine(ControlContext *ctx) { ImageReflection *refl; /* Select an image */ - ctx->ipr_cur_image = 0;//ipr_random_image(ctx); Temporary! + ctx->ipr_cur_image = 0; ctx->ipr_id = imagedisplay_open_with_message(ctx->images[ctx->ipr_cur_image], "Current Image", "Click to change image", IMAGEDISPLAY_SHOW_CENTRE | IMAGEDISPLAY_SHOW_TILT_AXIS, G_CALLBACK(ipr_clicked), ctx); |