From 51177ac637ecc41adffb7a73f118911862bf162d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 29 Sep 2011 16:17:12 +0200 Subject: Multiply the right way round --- src/hrs-scaling.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/hrs-scaling.c') diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 8cf5e8b8..1d91fb3a 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -83,16 +83,16 @@ static double iterate_scale(struct image *images, int n, RefList *reference) Ihl = get_intensity(refl) / get_partiality(refl); num += Ih * Ihl; - den += Ihl * Ihl; + den += Ih * Ih; } new_sf = num / den; if ( !isnan(new_sf) && !isinf(new_sf) ) { - corr = image->osf - new_sf; + corr = fabs(image->osf - new_sf); image->osf = new_sf; } - if ( fabs(corr) > max_shift ) max_shift = fabs(corr); + if ( corr > max_shift ) max_shift = corr; } -- cgit v1.2.3