diff options
Diffstat (limited to 'src/itrans.c')
-rw-r--r-- | src/itrans.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/itrans.c b/src/itrans.c index 1b66915..c210645 100644 --- a/src/itrans.c +++ b/src/itrans.c @@ -516,7 +516,12 @@ static unsigned int itrans_peaksearch_iterative(int16_t *image, ControlContext * px = gsl_matrix_get(p,0,i); py = gsl_matrix_get(p,1,i); printf("Reflection %d (%lf,%lf)\n",i,px,py); - reflection_add_from_dp(ctx, (px-ctx->x_centre), (py-ctx->y_centre), tilt_degrees, 1.); + if ( ctx->fmode == FORMULATION_PIXELSIZE ) { + reflection_add_from_reciprocal(ctx, (px-ctx->x_centre)*ctx->pixel_size, (py-ctx->y_centre)*ctx->pixel_size, + tilt_degrees, 1.0); + } else { + reflection_add_from_dp(ctx, (px-ctx->x_centre), (py-ctx->y_centre), tilt_degrees, 1.0); + } if (ctx->first_image) imagedisplay_mark_point(imagedisplay, (unsigned int)px, (unsigned int)py); } gsl_matrix_free(m); |