aboutsummaryrefslogtreecommitdiff
path: root/src/scaling.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scaling.c')
-rw-r--r--src/scaling.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/scaling.c b/src/scaling.c
index 97503b89..ab913229 100644
--- a/src/scaling.c
+++ b/src/scaling.c
@@ -515,9 +515,9 @@ int linear_scale(const RefList *list1, const RefList *list2, double *G)
}
}
- x[n] = Ih2;
+ x[n] = Ih2 / get_partiality(refl2);
y[n] = Ih1;
- w[n] = get_partiality(refl1);
+ w[n] = get_partiality(refl2);
n++;
}
@@ -534,6 +534,12 @@ int linear_scale(const RefList *list1, const RefList *list2, double *G)
return 1;
}
+ if ( isnan(*G) ) {
+ ERROR("Scaling gave NaN (%i pairs)\n", n);
+ abort();
+ return 1;
+ }
+
free(x);
free(y);
free(w);