From 8914bbac0d7f897877b95e48173daedd7e99a61d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 10 May 2011 16:07:02 +0200 Subject: Calculate redundancies properly when scaling --- src/hrs-scaling.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/hrs-scaling.c') diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c index 5c5ec8f0..2d7a6a92 100644 --- a/src/hrs-scaling.c +++ b/src/hrs-scaling.c @@ -329,6 +329,7 @@ static RefList *lsq_intensities(struct image *images, int n, double num = 0.0; double den = 0.0; int m; + int redundancy = 0; Reflection *new; /* For each frame */ @@ -351,6 +352,7 @@ static RefList *lsq_intensities(struct image *images, int n, num += get_intensity(refl) * p * G; den += pow(p, 2.0) * pow(G, 2.0); + redundancy++; } @@ -359,6 +361,7 @@ static RefList *lsq_intensities(struct image *images, int n, if ( !isnan(num/den) ) { new = add_refl(full, it->h, it->k, it->l); set_int(new, num/den); + set_redundancy(new, redundancy); } else { ERROR("Couldn't calculate LSQ full intensity for" "%3i %3i %3i\n", it->h, it->k, it->l); -- cgit v1.2.3