aboutsummaryrefslogtreecommitdiff
path: root/src/hrs-scaling.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-04-26 15:13:42 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:24 +0100
commit6815bab588d3e995bd1319e23614372aa1a07f0c (patch)
tree14b2e12ff2cda12f6ed4baed992cdee6448a44ea /src/hrs-scaling.c
parent074034e2dcc34a9a0bab7c979f0deea060a3be21 (diff)
Progress with post refinement...
Diffstat (limited to 'src/hrs-scaling.c')
-rw-r--r--src/hrs-scaling.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/hrs-scaling.c b/src/hrs-scaling.c
index 4b9b932d..cb0f8cde 100644
--- a/src/hrs-scaling.c
+++ b/src/hrs-scaling.c
@@ -338,12 +338,11 @@ static RefList *lsq_intensities(struct image *images, int n,
for ( refl = find_refl(images[m].reflections,
it->h, it->k, it->l);
refl != NULL;
- refl = next_found_refl(refl) ) {
+ refl = next_found_refl(refl) )
+ {
double p;
- if ( !get_scalable(refl) ) continue;
-
p = get_partiality(refl);
num += get_intensity(refl) * p * G;
@@ -353,8 +352,14 @@ static RefList *lsq_intensities(struct image *images, int n,
}
- new = add_refl(full, it->h, it->k, it->l);
- set_int(new, num/den);
+ if ( !isnan(num/den) ) {
+ new = add_refl(full, it->h, it->k, it->l);
+ set_int(new, num/den);
+ } else {
+ ERROR("Couldn't calculate LSQ full intensity for"
+ "%3i %3i %3i\n", it->h, it->k, it->l);
+ /* Doom is probably impending */
+ }
}