Skip to content

Commit

Permalink
Merge pull request #31 from toastisme/allow_tof_goniometer
Browse files Browse the repository at this point in the history
allow_tof_goniometer
  • Loading branch information
toastisme committed Oct 5, 2023
2 parents 2fbd926 + a0d08fd commit 7b973b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dials/algorithms/refinement/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/dials/array_family/flex_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7b973b9

Please sign in to comment.