diff --git a/newsfragments/XXX.misc b/newsfragments/XXX.misc new file mode 100644 index 0000000000..a415426835 --- /dev/null +++ b/newsfragments/XXX.misc @@ -0,0 +1 @@ +Add additional reflection properties to save after indexing. diff --git a/src/dials/algorithms/indexing/indexer.py b/src/dials/algorithms/indexing/indexer.py index d551bc472e..13354e9c1f 100644 --- a/src/dials/algorithms/indexing/indexer.py +++ b/src/dials/algorithms/indexing/indexer.py @@ -995,12 +995,24 @@ def index_reflections(self, experiments, reflections): def refine(self, experiments, reflections): from dials.algorithms.indexing.refinement import refine + properties_to_save = [ + "xyzcal.mm", + "entering", + "wavelength_cal", + "s0_cal", + "tof_cal", + ] + refiner, refined, outliers = refine(self.all_params, reflections, experiments) if outliers is not None: reflections["id"].set_selected(outliers, -1) + predicted = refiner.predict_for_indexed() - reflections["xyzcal.mm"] = predicted["xyzcal.mm"] - reflections["entering"] = predicted["entering"] + + for i in properties_to_save: + if i in predicted: + reflections[i] = predicted[i] + reflections.unset_flags( flex.bool(len(reflections), True), reflections.flags.centroid_outlier )