Skip to content

Commit

Permalink
Add additional reflection properties to save after indexing.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastisme committed Jul 18, 2024
1 parent 153f5a7 commit a880cda
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
1 change: 1 addition & 0 deletions newsfragments/XXX.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add additional reflection properties to save after indexing.
16 changes: 14 additions & 2 deletions src/dials/algorithms/indexing/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit a880cda

Please sign in to comment.