Skip to content

Commit

Permalink
In the scans indexer, do not convert mm to px when `indexing.refineme…
Browse files Browse the repository at this point in the history
…nt_protocol.mode==None` (dials#2687)

* Check required column is present before converting mm to px.

This is what is done by the StillsIndexer when refinement_protocol.mode
is None, so do the same here.
  • Loading branch information
dagewa authored Jul 4, 2024
1 parent 97e2b73 commit 263e099
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions newsfragments/2687.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``dials.index``: Avoid mm to px conversion when the ``refinement_protocol``
is set to do no refinement, as the required data are not available.
3 changes: 2 additions & 1 deletion src/dials/algorithms/indexing/indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,8 @@ def index(self):
rotation_matrix_differences(self.refined_experiments.crystals())
)

self._xyzcal_mm_to_px(self.refined_experiments, self.refined_reflections)
if "xyzcal.mm" in self.refined_reflections:
self._xyzcal_mm_to_px(self.refined_experiments, self.refined_reflections)

def _unit_cell_volume_sanity_check(self, original_experiments, refined_experiments):
# sanity check for unrealistic unit cell volume increase during refinement
Expand Down

0 comments on commit 263e099

Please sign in to comment.