aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-09-05 16:35:14 +0200
committerThomas White <taw@physics.org>2019-09-05 16:35:14 +0200
commitdd9e5a75e115cd5b630d8dac2f6af8fc344f5ad6 (patch)
tree2d6f1c34c25f56db671e4d503aa4d4ed290b1b13
parent4640801af015f6eb46f12d17b22f8c0767a0091e (diff)
partialator: Correct polarisation after update_predictions()
Polarisation correction needs kpred values.
-rw-r--r--src/partialator.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/partialator.c b/src/partialator.c
index e92a80ac..2b5a235c 100644
--- a/src/partialator.c
+++ b/src/partialator.c
@@ -1437,9 +1437,6 @@ int main(int argc, char *argv[])
cr_refl = apply_max_adu(cr_refl, max_adu);
- polarisation_correction(cr_refl, crystal_get_cell(cr),
- polarisation);
-
if ( !no_free ) select_free_reflections(cr_refl, rng);
as = asymmetric_indices(cr_refl, sym);
@@ -1479,8 +1476,14 @@ int main(int argc, char *argv[])
STATUS("Initial partiality calculation...\n");
for ( i=0; i<n_crystals; i++ ) {
+
Crystal *cr = crystals[i];
update_predictions(cr);
+
+ /* Polarisation correction requires kpred values */
+ polarisation_correction(crystal_get_reflections(cr),
+ crystal_get_cell(cr), polarisation);
+
calculate_partialities(cr, pmodel);
}