aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-11-19 13:08:11 +0100
committerThomas White <taw@physics.org>2015-11-19 14:33:08 +0100
commita1d57905623ce56de278d204378494cdceef4970 (patch)
treeebd3a1348d23bbc4a6bd4680028371d7059b0976 /src
parent08b93f124d2fc60cfa1dfff82b1700a2f2fbf91f (diff)
Monitor average B
Diffstat (limited to 'src')
-rw-r--r--src/scaling.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/scaling.c b/src/scaling.c
index dfe76d69..05e741ca 100644
--- a/src/scaling.c
+++ b/src/scaling.c
@@ -438,6 +438,14 @@ void scale_all(Crystal **crystals, int n_crystals, int nthreads,
STATUS("Log residual went from %e to %e, %i crystals\n",
bef_res, new_res, ninc);
+ int i;
+ double meanB = 0.0;
+ for ( i=0; i<n_crystals; i++ ) {
+ meanB += crystal_get_Bfac(crystals[i]);
+ }
+ meanB /= n_crystals;
+ STATUS("Mean B = %e\n", meanB);
+
reflist_free(full);
} while ( fabs(new_res-old_res) >= 0.01*old_res );