Skip to content

Commit

Permalink
Multi-axis goniometer needs axes= not axis= (cctbx#730)
Browse files Browse the repository at this point in the history
* Raise an error if the user's PHIL overrides contains geometry.goniometer.axis
and the reference goniometer is multi-axis. In that case, the full
geometry.goniometer.axes must be set instead.

Fixes cctbx#729
  • Loading branch information
dagewa authored Apr 30, 2024
1 parent 8f409a9 commit 5289332
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions newsfragments/730.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Raise an error if ``geometry.goniometer.axis=`` is set with a multi-axis goniometer. In that case ``geometry.goniometer.axes=`` must be set instead.
4 changes: 4 additions & 0 deletions src/dxtbx/model/goniometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def from_phil(params, reference=None):
raise ValueError("Only one of axis or axes should be set")
if reference is not None:
if isinstance(reference, MultiAxisGoniometer):
if params.goniometer.axis:
raise ValueError(
"All axes must be set for a multi-axis goniometer, not just axis"
)
goniometer = GoniometerFactory.multi_axis_goniometer_from_phil(
params, reference
)
Expand Down

0 comments on commit 5289332

Please sign in to comment.