-
Notifications
You must be signed in to change notification settings - Fork 12
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
BUG: forward() does not give same answer as first solution in forward_solutions_table() #303
Comments
A general freeze command that freezes the
|
It would be nice to have a function that returns for a given mode if there is an axis kept constant and the name of the axis. This would simplify the |
@strempfer - Like this: In [1]: from hkl import SimulatedE6C
In [2]: sim6c = SimulatedE6C("", name="sim6c")
In [3]: [ax for ax in sim6c.calc.engine._engine.axis_names_get(0) if ax not in sim6c.calc.engine._engine.axis_names_get(1)]
Out[3]: ['mu', 'gamma']
In [4]: sim6c.calc.engine.mode = "constant_chi_vertical"
In [5]: [ax for ax in sim6c.calc.engine._engine.axis_names_get(0) if ax not in sim6c.calc.engine._engine.axis_names_get(1)]
Out[5]: ['mu', 'chi', 'gamma'] Thinking that such a function should also show what additional parameters are required by the mode (instead of making yet another function to remember). |
Perfect! This allows also to determine if in vertical (fixed mu and gamma) or horizontal (fixed omega and delta) mode.
From: Pete R Jemian ***@***.***>
Date: Thursday, November 30, 2023 at 4:57 PM
To: bluesky/hklpy ***@***.***>
Cc: Strempfer, Joerg ***@***.***>, Mention ***@***.***>
Subject: Re: [bluesky/hklpy] BUG: forward() does not give same answer as first solution in forward_solutions_table() (Issue #303)
@strempfer<https://github.com/strempfer> - Like this:
In [1]: from hkl import SimulatedE6C
In [2]: sim6c = SimulatedE6C("", name="sim6c")
In [3]: [ax for ax in sim6c.calc.engine._engine.axis_names_get(0) if ax not in sim6c.calc.engine._engine.axis_names_get(1)]
Out[3]: ['mu', 'gamma']
In [4]: sim6c.calc.engine.mode = "constant_chi_vertical"
In [5]: [ax for ax in sim6c.calc.engine._engine.axis_names_get(0) if ax not in sim6c.calc.engine._engine.axis_names_get(1)]
Out[5]: ['mu', 'chi', 'gamma']
Thinking that such a function should also show what additional parameters are required by the mode (instead of making yet another function to remember).
—
Reply to this email directly, view it on GitHub<#303 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOAHWJ7AETNZWVKCTKIHVMLYHEFM3AVCNFSM6AAAAAA7TKZ5ZWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZUGY4DQNRZGA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
First, though, let's resolve why the two solutions are different. |
During testing to hold a rotation axis constant when computing the
forward(h,k,l)
axis positions, observed that the position returned byforward((1,1,1))
is not the same as the first position shown byforward_solutions_table([(1,1,1)], full=True)
. The problem observed is thatphi
is not held to the expected value byforward()
.code
output
Note, a diagnostic print was added just before this line:
hklpy/hkl/engine.py
Line 258 in bb4ac84
Thanks, @strempfer, for identifying this situation.
The text was updated successfully, but these errors were encountered: