aboutsummaryrefslogtreecommitdiff
path: root/src/itrans-threshold.c
diff options
context:
space:
mode:
authortaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-30 12:14:32 +0000
committertaw27 <taw27@bf6ca9ba-c028-0410-8290-897cf20841d1>2007-08-30 12:14:32 +0000
commite9a2b408c139a17e431dfb84384edd62a2ead7e3 (patch)
tree3bac693f8b773553f29456973dd77317378c6e8f /src/itrans-threshold.c
parent0126d58f87dae943396f3701d83ccb1686143568 (diff)
Merge the two reflection_add routines for different formulations
git-svn-id: svn://cook.msm.cam.ac.uk:745/diff-tomo/dtr@95 bf6ca9ba-c028-0410-8290-897cf20841d1
Diffstat (limited to 'src/itrans-threshold.c')
-rw-r--r--src/itrans-threshold.c27
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 */