Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dials.refine does not write out the refined orientation of a multi-axis goniometer #2659

Open
dagewa opened this issue Apr 26, 2024 · 1 comment
Assignees

Comments

@dagewa
Copy link
Member

dagewa commented Apr 26, 2024

          This code illustrates the problem
>>> from dxtbx.model import ExperimentList
>>> el=ExperimentList.from_file("imported.expt")
>>> gonio=el[0].goniometer
>>> type(gonio)
<class 'dxtbx_model_ext.MultiAxisGoniometer'>
>>> gonio.get_rotation_axis()
(0.0, -1.0, 0.0)
>>> gonio.set_rotation_axis((1,0,0))
>>> gonio.get_rotation_axis()
(1.0, 0.0, 0.0)
>>> el.as_file("modified.expt")
>>> el2=ExperimentList.from_file("modified.expt")
>>> gonio2=el2[0].goniometer
>>> gonio2.get_rotation_axis()
(0.0, -1.0, 0.0)

Clearly set_rotation_axis does not "stick" for a MultiAxisGoniometer (in which case, perhaps it should raise an error). Now I need to figure out how to set the rotation axis in this case. The way dials.refine does it is to modify the setting matrix only. Perhaps that is the correct way?

Originally posted by @dagewa in #2656 (comment)

@dagewa
Copy link
Member Author

dagewa commented Apr 26, 2024

summary: dials.refine parameterises the setting matrix of a goniometer. For a multi-axis goniometer, this is not primary information but is derived from definitions of the axes and angles. During refinement, dials.refine appears to modify the model, but once the result is written out these modifications are lost.

NB this is an unsual case - we do not usually refine the orientation of the rotation axis. It just affects those rare situations where we do want to do this

@dagewa dagewa self-assigned this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant