diff options
author | Thomas White <taw@physics.org> | 2011-09-29 16:17:12 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:38 +0100 |
commit | 51177ac637ecc41adffb7a73f118911862bf162d (patch) | |
tree | df22c68b4c576457cc12291deca4410e0a8a4ef1 | |
parent | e872c19300aa50169a76bc95f215fe67c358a1a8 (diff) |
Multiply the right way round
-rw-r--r-- | src/hrs-scaling.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |