diff options
author | Thomas White <taw@physics.org> | 2019-06-20 16:28:53 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-07-17 09:22:23 +0200 |
commit | c274adc00703bf725137dd846a1d0f32aaa8bb1f (patch) | |
tree | 5b9467c1e8c0327da2a26a79bb146f38d22f3553 /src | |
parent | b62612cc17eda59a3aa347d8a51e7ea235ad716b (diff) |
Modify residual to give clearer minimum, particularly as function of profile radius
Diffstat (limited to 'src')
-rw-r--r-- | src/merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/merge.c b/src/merge.c index 33567ecd..e56c3378 100644 --- a/src/merge.c +++ b/src/merge.c @@ -402,8 +402,8 @@ double residual(Crystal *cr, const RefList *full, int free, w = 0.0; } - num += fabs(int1 - int2) * w; - den += fabs(int1 + int2) * w/2.0; + num += w*fabs(int1 - int2)/((int1+int2)/2.0); + den += w; n_used++; |