diff options
author | Thomas White <taw@physics.org> | 2011-05-10 16:07:02 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:25 +0100 |
commit | 8914bbac0d7f897877b95e48173daedd7e99a61d (patch) | |
tree | be36634ae3a8ce03c8a1e8509cc2d1c1a6f8ed40 /src/hrs-scaling.c | |
parent | 334836244eca7cdca509815e0496f64fc5b9317a (diff) |
Calculate redundancies properly when scaling
Diffstat (limited to 'src/hrs-scaling.c')
-rw-r--r-- | src/hrs-scaling.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |