-
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
Describe geometry engines, modes, and axes #306
Conversation
@mrakitin @padraic-shafer @strempfer - This is ready for review. Here is an example of a table from the console UI: (bluesky_2024_1) prjemian@arf:~/.../Bluesky/hklpy$ ipython
Python 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:40:35) [GCC 12.3.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.17.2 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from hkl import SimulatedK4CV
In [2]: sim4k = SimulatedK4CV("", name="sim4k")
In [3]: sim4k.geometry_table()
Geometry: K4CV
real axes: komega, kappa, kphi, tth
pseudo axes: depends on the engine
========= ================== ================== ======================== ======================== ================
engine pseudo axes mode axes read axes written extra parameters
========= ================== ================== ======================== ======================== ================
emergence emergence, azimuth emergence komega, kappa, kphi, tth x, y, z
eulerians omega, chi, phi eulerians komega, kappa, kphi komega, kappa, kphi solutions
hkl h, k, l bissector komega, kappa, kphi, tth komega, kappa, kphi, tth
hkl h, k, l constant_chi komega, kappa, kphi, tth komega, kappa, kphi, tth chi
hkl h, k, l constant_omega komega, kappa, kphi, tth komega, kappa, kphi, tth omega
hkl h, k, l constant_phi komega, kappa, kphi, tth komega, kappa, kphi, tth phi
hkl h, k, l double_diffraction komega, kappa, kphi, tth komega, kappa, kphi, tth h2, k2, l2
hkl h, k, l psi_constant komega, kappa, kphi, tth komega, kappa, kphi, tth h2, k2, l2, psi
incidence incidence, azimuth incidence komega, kappa, kphi x, y, z
psi psi psi komega, kappa, kphi, tth komega, kappa, kphi, tth h2, k2, l2
q q q tth tth
========= ================== ================== ======================== ======================== ================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great addition!
Note that the real axes names are the canonical names defined by the lower-level support library (libhkl), as access through the But, let's not complicate this PR with this additional change. |
@rodolakis Added you as a reviewer. |
Could add properties for If the engine module has these properties, they would use the canonical names. Then, the calc module could also define the same properties and replace canonical with renamed axes. Makes it easier for the user to understand a given mode and engine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@padraic-shafer , @mrakitin Thanks for the reviews! @strempfer , @jwkim-anl : Thanks for the suggestion! |
@@ -79,7 +79,7 @@ def format_name_list(names): | |||
db = { | |||
gonio.geometry_name: { | |||
"real_axes": gonio.physical_axis_names, | |||
"cname": gonio.__class__.__name__[4:], | |||
"cname": gonio.__class__.__name__[4:], # 4 = len("Calc") as in "CalcE4CV" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"cname": gonio.__class__.__name__[4:], # 4 = len("Calc") as in "CalcE4CV" | |
"cname": gonio.__class__.__name__[len("Calc"):], |
(Re)build tables of diffractometer geometry, engines, and modes from libhkl API.