From a0d08fd280c2b388cb51230608e68a373a795a08 Mon Sep 17 00:00:00 2001 From: davidmcdonagh Date: Thu, 5 Oct 2023 12:40:53 +0100 Subject: [PATCH] allow_tof_goniometer --- src/dials/algorithms/refinement/target.py | 3 ++- src/dials/array_family/flex_ext.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dials/algorithms/refinement/target.py b/src/dials/algorithms/refinement/target.py index fab9a697ff..64af1c8ff0 100644 --- a/src/dials/algorithms/refinement/target.py +++ b/src/dials/algorithms/refinement/target.py @@ -7,6 +7,7 @@ import math from typing import Any, Tuple, Union +from dxtbx.model import TOFSequence from libtbx.phil import parse from scitbx import sparse from scitbx.array_family import flex @@ -235,7 +236,7 @@ def predict_for_reflection_table(self, reflections, skip_derivatives=False): sel = reflections["id"] == iexp # keep all reflections if there is no rotation axis - if exp.goniometer is None: + if exp.goniometer is None or isinstance(exp.sequence, TOFSequence): to_keep.set_selected(sel, True) continue diff --git a/src/dials/array_family/flex_ext.py b/src/dials/array_family/flex_ext.py index 2435d183e1..e87c16fd45 100644 --- a/src/dials/array_family/flex_ext.py +++ b/src/dials/array_family/flex_ext.py @@ -1588,7 +1588,7 @@ def calculate_entering_flags(self, experiments): if not experiment.goniometer: continue axis = matrix.col(experiment.goniometer.get_rotation_axis()) - s0 = matrix.col(experiment.beam.get_s0()) + s0 = matrix.col(experiment.beam.get_unit_s0()) vec = s0.cross(axis) sel = self["id"] == iexp enterings.set_selected(sel, self["s1"].dot(vec) < 0.0)