diff options
Diffstat (limited to 'src/itrans-threshold.c')
-rw-r--r-- | src/itrans-threshold.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/itrans-threshold.c b/src/itrans-threshold.c index 71c39a1..519acc8 100644 --- a/src/itrans-threshold.c +++ b/src/itrans-threshold.c @@ -26,7 +26,6 @@ unsigned int itrans_peaksearch_threshold(ImageRecord imagerecord, ControlContext int x, y; unsigned int n_reflections = 0; uint16_t *image = imagerecord.image; - double tilt_degrees = imagerecord.tilt; uint16_t max = 0; width = imagerecord.width; @@ -46,17 +45,8 @@ unsigned int itrans_peaksearch_threshold(ImageRecord imagerecord, ControlContext assert(y<height); assert(x>=0); assert(y>=0); - if ( imagerecord.fmode == FORMULATION_PIXELSIZE ) { - reflection_add_from_reciprocal(ctx, - (signed)(x-imagerecord.x_centre)*imagerecord.pixel_size, - (signed)(y-imagerecord.y_centre)*imagerecord.pixel_size, - tilt_degrees, image[x + width*y]); - } else { - reflection_add_from_dp(ctx, - (signed)(x-imagerecord.x_centre)/imagerecord.resolution, - (signed)(y-imagerecord.y_centre)/imagerecord.resolution, - tilt_degrees, image[x + width*y]); - } + reflection_add_from_dp(ctx, (x-imagerecord.x_centre), (y-imagerecord.y_centre), + imagerecord, image[x + width*y]); n_reflections++; } } @@ -72,7 +62,6 @@ unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord imagerecord, Contr int width, height; unsigned int n_reflections = 0; uint16_t *image; - double tilt_degrees = imagerecord.tilt; uint16_t max; int x, y; @@ -111,16 +100,8 @@ unsigned int itrans_peaksearch_adaptive_threshold(ImageRecord imagerecord, Contr assert(max_y<height); assert(max_x>=0); assert(max_y>=0); - if ( imagerecord.fmode == FORMULATION_PIXELSIZE ) { - reflection_add_from_reciprocal(ctx, - (signed)(max_x-imagerecord.x_centre)*imagerecord.pixel_size, - (signed)(max_y-imagerecord.y_centre)*imagerecord.pixel_size, - tilt_degrees, image[max_x + width*max_y]); - } else { - reflection_add_from_dp(ctx, (signed)(max_x-imagerecord.x_centre)/imagerecord.resolution, - (signed)(max_y-imagerecord.y_centre)/imagerecord.resolution, - tilt_degrees, image[max_x + width*max_y]); - } + reflection_add_from_dp(ctx, (max_x-imagerecord.x_centre), (max_y-imagerecord.y_centre), + imagerecord, image[x + width*y]); n_reflections++; /* Remove it and its surroundings */ |