From dc854c240913d4c179f49c35f7b869e2c39b86c7 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 26 Oct 2017 15:51:29 +0200 Subject: Store scale factor in linear form --- src/scaling.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/scaling.c') 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