aboutsummaryrefslogtreecommitdiff
path: root/src/scaling.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scaling.c')
-rw-r--r--src/scaling.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scaling.c b/src/scaling.c
index 0908cfb3..c7c608fe 100644
--- a/src/scaling.c
+++ b/src/scaling.c
@@ -183,7 +183,7 @@ static double scale_iterate(Crystal *cr, const RefList *full,
}
- fx = G + log(p) - log(L) - B*s*s + log(I_full);
+ fx = -log(G) + log(p) - log(L) - B*s*s + log(I_full);
delta_I = log(I_partial) - fx;
v_c = w * delta_I * gradients[k];
v_curr = gsl_vector_get(v, k);
@@ -549,7 +549,7 @@ void scale_all_to_reference(Crystal **crystals, int n_crystals,
for ( i=0; i<n_crystals; i++ ) {
double G;
linear_scale(crystal_get_reflections(crystals[i]), reference, &G);
- crystal_set_osf(crystals[i], -log(G));
+ crystal_set_osf(crystals[i], G);
crystal_set_Bfac(crystals[i], 0.0);
}
}