aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-07-22 17:23:30 +0200
committerThomas White <taw@physics.org>2015-07-23 16:58:52 +0200
commitee2c11a10b39210c75a9c9002a83ec0dda95418e (patch)
treed1eef5e5db368e3ef3339964a6fa6f280834d3b8
parent54148df6301bf4e1ac7c659fa2aea0e4f9fb68a2 (diff)
Add weightings to PR
-rw-r--r--src/post-refinement.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/post-refinement.c b/src/post-refinement.c
index a10ee781..517ed6a5 100644
--- a/src/post-refinement.c
+++ b/src/post-refinement.c
@@ -553,7 +553,7 @@ static double pr_iterate(Crystal *cr, const RefList *full,
s = resolution(crystal_get_cell(cr), ha, ka, la);
/* Calculate the weight for this reflection */
- w = 1.0;
+ w = (s/1e9)*(s/1e9) / (esd*esd);
/* Calculate all gradients for this reflection */
for ( k=0; k<num_params; k++ ) {
@@ -725,7 +725,7 @@ static double residual(Crystal *cr, const RefList *full, int verbose, int free,
fx = exp(G)*p*exp(-B*s*s)*I_full/L;
dc = I_partial - fx;
- w = 1.0;
+ w = (s/1e9)*(s/1e9)/(esd*esd);
dev += w*dc*dc;
n_used++;