diff options
author | Thomas White <taw@physics.org> | 2018-02-27 13:44:29 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2018-02-27 17:12:42 +0100 |
commit | bc24110f035c62b3e7e873a2b84c47bcf7414f19 (patch) | |
tree | 9208ba54ae6178437665aafa5178bb3868e118bf /src/scaling.c | |
parent | de9fbc4335a5d2e3896381403f4b1b5b19dcf444 (diff) |
Scaling fixes
Diffstat (limited to 'src/scaling.c')
-rw-r--r-- | src/scaling.c | 10 |
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); |