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

add new geometries from upstream #270

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 123 additions & 17 deletions docs/source/geometry_tables.rst
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the source for the tables in this document? Are the tables compiled from the data from https://people.debian.org/~picca/hkl/hkl.html#orgdf95f6f?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tables are compiled by hand by reviewing the web documentation and the source code.

Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,27 @@ the number of axes (circles) and the names of each. This table is
sorted first by the number of circles, and then the geometry name (as
used here in *hklpy*).

======== ==================================================== =======================================================================
#circles geometry real_axes
======== ==================================================== =======================================================================
4 :ref:`E4CH <E4CH_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`E4CV <E4CV_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`K4CV <K4CV_table>` ``komega``, ``kappa``, ``kphi``, ``tth``
4 :ref:`SoleilMars <SoleilMars_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`SoleilSixsMed1p2 <SoleilSixsMed1p2_table>` ``pitch``, ``mu``, ``gamma``, ``delta``
4 :ref:`Zaxis <Zaxis_table>` ``mu``, ``omega``, ``delta``, ``gamma``
5 :ref:`SoleilSixsMed2p2 <SoleilSixsMed2p2_table>` ``beta``, ``mu``, ``omega``, ``gamma``, ``delta``
6 :ref:`E6C <E6C_table>` ``mu``, ``omega``, ``chi``, ``phi``, ``gamma``, ``delta``
6 :ref:`K6C <K6C_table>` ``mu``, ``komega``, ``kappa``, ``kphi``, ``gamma``, ``delta``
6 :ref:`Petra3_p09_eh2 <Petra3_p09_eh2_table>` ``mu``, ``omega``, ``chi``, ``phi``, ``delta``, ``gamma``
6 :ref:`SoleilSiriusKappa <SoleilSiriusKappa_table>` ``mu``, ``komega``, ``kappa``, ``kphi``, ``delta``, ``gamma``
6 :ref:`SoleilSiriusTurret <SoleilSiriusTurret_table>` ``basepitch``, ``thetah``, ``alphay``, ``alphax``, ``delta``, ``gamma``
6 :ref:`SoleilSixsMed2p3 <SoleilSixsMed2p3_table>` ``beta``, ``mu``, ``omega``, ``gamma``, ``delta``, ``eta_a``
======== ==================================================== =======================================================================
======== ============================================================== ========================================================================
#circles geometry real_axes
======== ============================================================== ========================================================================
4 :ref:`E4CH <E4CH_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`E4CV <E4CV_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`K4CV <K4CV_table>` ``komega``, ``kappa``, ``kphi``, ``tth``
4 :ref:`Petra3_p23_4c <Petra3_p23_4c_table>` ``omega_t``, ``mu``, ``gamma``, ``delta``
4 :ref:`SoleilMars <SoleilMars_table>` ``omega``, ``chi``, ``phi``, ``tth``
4 :ref:`SoleilSixsMed1p2 <SoleilSixsMed1p2_table>` ``pitch``, ``mu``, ``gamma``, ``delta``
4 :ref:`Zaxis <Zaxis_table>` ``mu``, ``omega``, ``delta``, ``gamma``
5 :ref:`SoleilSixsMed2p2 <SoleilSixsMed2p2_table>` ``beta``, ``mu``, ``omega``, ``gamma``, ``delta``
5 :ref:`SoleilSixsMed2p3v2 <SoleilSixsMed2p3v2_table>` ``mu``, ``omega``, ``gamma``, ``delta``, ``eta_a``
6 :ref:`E6C <E6C_table>` ``mu``, ``omega``, ``chi``, ``phi``, ``gamma``, ``delta``
6 :ref:`K6C <K6C_table>` ``mu``, ``komega``, ``kappa``, ``kphi``, ``gamma``, ``delta``
6 :ref:`Petra3_p09_eh2 <Petra3_p09_eh2_table>` ``mu``, ``omega``, ``chi``, ``phi``, ``delta``, ``gamma``
6 :ref:`SoleilNanoscopiumRobot <SoleilNanoscopiumRobot_table>` ``rz``, ``rs``, ``rx``, ``r``, ``delta``, ``gamma``
6 :ref:`SoleilSiriusKappa <SoleilSiriusKappa_table>` ``mu``, ``komega``, ``kappa``, ``kphi``, ``delta``, ``gamma``
6 :ref:`SoleilSiriusTurret <SoleilSiriusTurret_table>` ``basepitch``, ``thetah``, ``alphay``, ``alphax``, ``delta``, ``gamma``
6 :ref:`SoleilSixsMed2p3 <SoleilSixsMed2p3_table>` ``beta``, ``mu``, ``omega``, ``gamma``, ``delta``, ``eta_a``
7 :ref:`Petra3_p23_6c <Petra3_p23_6c_table>` ``omega_t``, ``mu``, ``omega``, ``chi``, ``phi``, ``gamma``, ``delta``
======== ============================================================== ========================================================================

Tables for each geometry
------------------------
Expand Down Expand Up @@ -206,6 +210,63 @@ hkl ``h``, ``k``, ``l`` lifting detector chi
hkl ``h``, ``k``, ``l`` lifting detector phi
====== =================== =================================== ==========

.. index:: Petra3_p23_4c, geometry; Petra3_p23_4c

.. _Petra3_p23_4c_table:

Geometry: `Petra3_p23_4c`
++++++++++++++++++++++++++

real axes: ``omega_t``, ``mu``, ``gamma``, ``delta``

=========== =========================== =================================== ==========
engine pseudo_axes mode parameters
=========== =========================== =================================== ==========
hkl ``h``, ``k``, ``l`` bisector vertical
hkl ``h``, ``k``, ``l`` lifting detector omega_t
hkl ``h``, ``k``, ``l`` lifting detector mu
hkl ``h``, ``k``, ``l`` bisector horizontal
hkl ``h``, ``k``, ``l`` psi constant h2, k2, l2, psi
q2 ``q``, ``alpha`` q2
qper_qpar ``qper``, ``qpar`` qper_qpar x, y, z
tth2 ``tth``, ``alpha`` tth2
incidence ``incidence``, ``azimuth`` incidence x, y, z
emergence ``emergence``, ``azimuth`` emergence x, y, z
=========== =========================== =================================== ==========

.. index:: Petra3_p23_6c, geometry; Petra3_p23_6c

.. _Petra3_p23_6c_table:

Geometry: `Petra3_p23_6c`
++++++++++++++++++++++++++

real axes: ``omega_t``, ``mu``, ``omega``, ``chi``, ``phi``, ``gamma``, ``delta``

=========== =========================== =================================== ==========
engine pseudo_axes mode parameters
=========== =========================== =================================== ==========
hkl ``h``, ``k``, ``l`` bisector vertical
hkl ``h``, ``k``, ``l`` constant omega vertical
hkl ``h``, ``k``, ``l`` constant chi vertical
hkl ``h``, ``k``, ``l`` constant phi vertical
hkl ``h``, ``k``, ``l`` lifting detector phi
hkl ``h``, ``k``, ``l`` lifting detector omega
hkl ``h``, ``k``, ``l`` lifting detector mu
hkl ``h``, ``k``, ``l`` double diffraction vertical h2, k2, l2
hkl ``h``, ``k``, ``l`` bisector horizontal
hkl ``h``, ``k``, ``l`` double diffraction horizontal h2, k2, l2
hkl ``h``, ``k``, ``l`` psi constant vertical h2, k2, l2, psi
hkl ``h``, ``k``, ``l`` psi constant horizontal h2, k2, l2, psi
hkl ``h``, ``k``, ``l`` constant mu horizontal
psi ``psi`` psi vertical h2, k2, l2
q2 ``q``, ``alpha`` q2
qper_qpar ``qper``, ``qpar`` qper_qpar x, y, z
tth2 ``tth``, ``alpha`` tth2
incidence ``incidence``, ``azimuth`` incidence x, y, z
emergence ``emergence``, ``azimuth`` emergence x, y, z
=========== =========================== =================================== ==========

.. index:: SoleilMars, geometry; SoleilMars

.. _SoleilMars_table:
Expand All @@ -229,6 +290,23 @@ q ``q`` q
incidence ``incidence``, ``azimuth`` incidence ``x``, ``y``, ``z``
========= ========================== ================== ===============================

.. index:: SoleilNanoscopiumRobot, geometry; SoleilNanoscopiumRobot

.. _SoleilNanoscopiumRobot_table:

Geometry: `SoleilNanoscopiumRobot`
++++++++++++++++++++++++++++++++++

real axes: ``rz``, ``rs``, ``rx``, ``r``, ``delta``, ``gamma``

========= ========================== =================== ==========
engine pseudo_axes mode parameters
========= ========================== =================== ==========
hkl ``h``, ``k``, ``l`` lifting detector rz
hkl ``h``, ``k``, ``l`` lifting detector rs
hkl ``h``, ``k``, ``l`` lifting detector rx
========= ========================== =================== ==========

.. index:: SoleilSiriusKappa, geometry; SoleilSiriusKappa

.. _SoleilSiriusKappa_table:
Expand Down Expand Up @@ -336,6 +414,34 @@ Geometry: `SoleilSixsMed2p3`

real axes: ``beta``, ``mu``, ``omega``, ``gamma``, ``delta``, ``eta_a``

.. note:: Compare with :ref:`SoleilSixsMed2p3v2_table` which does not have ``beta``.

========= ========================== =============== ==================================
engine pseudo_axes mode parameters
========= ========================== =============== ==================================
hkl ``h``, ``k``, ``l`` mu_fixed
hkl ``h``, ``k``, ``l`` gamma_fixed
hkl ``h``, ``k``, ``l`` emergence_fixed ``x``, ``y``, ``z``, ``emergence``
q2 ``q``, ``alpha`` q2
qper_qpar ``qper``, ``qpar`` qper_qpar ``x``, ``y``, ``z``
tth2 ``tth``, ``alpha`` tth2
incidence ``incidence``, ``azimuth`` incidence ``x``, ``y``, ``z``
emergence ``emergence``, ``azimuth`` emergence ``x``, ``y``, ``z``
========= ========================== =============== ==================================

.. index:: SoleilSixsMed2p3v2, geometry; SoleilSixsMed2p3v2

.. _SoleilSixsMed2p3v2_table:

Geometry: `SoleilSixsMed2p3v2`
++++++++++++++++++++++++++++++

real axes: ``mu``, ``omega``, ``gamma``, ``delta``, ``eta_a``

global parameter: `eta_a_rotation`, rotation of the detector (zaxis-like)

.. note:: Compare with :ref:`SoleilSixsMed2p3_table` which has an additional ``beta`` rotation.

========= ========================== =============== ==================================
engine pseudo_axes mode parameters
========= ========================== =============== ==================================
Expand Down
4 changes: 4 additions & 0 deletions hkl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,21 @@
K4CV,
K6C,
Petra3_p09_eh2,
Petra3_p23_4c,
Petra3_p23_6c,
SimMixin,
SimulatedE4CV,
SimulatedE6C,
SimulatedK4CV,
SimulatedK6C,
SoleilMars,
SoleilNanoscopiumRobot,
SoleilSiriusKappa,
SoleilSiriusTurret,
SoleilSixsMed1p2,
SoleilSixsMed2p2,
SoleilSixsMed2p3,
SoleilSixsMed2p3v2,
Zaxis,
)

Expand Down
37 changes: 37 additions & 0 deletions hkl/calc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@
~CalcK4CV
~CalcK6C
~CalcPetra3_p09_eh2
~CalcPetra3_p23_4c
~CalcPetra3_p23_6c
~CalcSoleilMars
~CalcSoleilNanoscopiumRobot
~CalcSoleilSiriusKappa
~CalcSoleilSiriusTurret
~CalcSoleilSixsMed1p2
~CalcSoleilSixsMed2p2
~CalcSoleilSixsMed2p3
~CalcSoleilSixsMed2p3v2
~CalcZaxis

"""
Expand All @@ -48,8 +52,11 @@
CalcK4CV
CalcK6C
CalcPetra3_p09_eh2
CalcPetra3_p23_4c
CalcPetra3_p23_6c
CalcRecip
CalcSoleilMars
CalcSoleilNanoscopiumRobot
CalcSoleilSiriusKappa
CalcSoleilSiriusTurret
CalcSoleilSixsMed1p2
Expand Down Expand Up @@ -745,13 +752,34 @@ def __init__(self, **kwargs):
super().__init__("PETRA3 P09 EH2", **kwargs)


class CalcPetra3_p23_4c(CalcRecip):
"""Geometry: PETRA3 P23 4C"""

def __init__(self, **kwargs):
super().__init__("PETRA3 P23 4C", **kwargs)


class CalcPetra3_p23_6c(CalcRecip):
"""Geometry: PETRA3 P23 6C"""

def __init__(self, **kwargs):
super().__init__("PETRA3 P23 6C", **kwargs)


class CalcSoleilMars(CalcRecip):
"""Geometry: SOLEIL MARS"""

def __init__(self, **kwargs):
super().__init__("SOLEIL MARS", **kwargs)


class CalcSoleilNanoscopiumRobot(CalcRecip):
"""Geometry: SOLEIL NANOSCOPIUM ROBOT"""

def __init__(self, **kwargs):
super().__init__("SOLEIL NANOSCOPIUM ROBOT", **kwargs)


class CalcSoleilSiriusKappa(CalcRecip):
"""Geometry: SOLEIL SIRIUS KAPPA"""

Expand Down Expand Up @@ -781,10 +809,19 @@ def __init__(self, **kwargs):


class CalcSoleilSixsMed2p3(CalcRecip):
"""Geometry: SOLEIL SIXS MED2+3"""

def __init__(self, **kwargs):
super().__init__("SOLEIL SIXS MED2+3", **kwargs)


class CalcSoleilSixsMed2p3v2(CalcRecip):
"""Geometry: SOLEIL SIXS MED2+3 v2"""

def __init__(self, **kwargs):
super().__init__("SOLEIL SIXS MED2+3 v2", **kwargs)


class CalcZaxis(CalcRecip):
"""Geometry: ZAXIS"""

Expand Down
5 changes: 5 additions & 0 deletions hkl/diffract.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,17 @@ class (using `calc_kw`) to instantiate a new one.
:class:`~hkl.geometries.K6C`
:class:`~hkl.geometries.Med2p3`
:class:`~hkl.geometries.Petra3_p09_eh2`
:class:`~hkl.geometries.Petra3_p23_4c`
:class:`~hkl.geometries.Petra3_p23_6c`
:class:`~hkl.geometries.SoleilMars`
:class:`~hkl.geometries.SoleilNanoscopiumRobot`
:class:`~hkl.geometries.SoleilSiriusKappa`
:class:`~hkl.geometries.SoleilSiriusTurret`
:class:`~hkl.geometries.SoleilSixs`
:class:`~hkl.geometries.SoleilSixsMed1p2`
:class:`~hkl.geometries.SoleilSixsMed2p2`
:class:`~hkl.geometries.SoleilSixsMed2p3`
:class:`~hkl.geometries.SoleilSixsMed2p3v2`
:class:`~hkl.geometries.Zaxis`
"""

Expand Down
34 changes: 33 additions & 1 deletion hkl/geometries.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,16 @@
.. autosummary::

~Petra3_p09_eh2
~Petra3_p23_4c
~Petra3_p23_6c
~SoleilMars
~SoleilNanoscopiumRobot
~SoleilSiriusKappa
~SoleilSiriusTurret
~SoleilSixsMed1p2
~SoleilSixsMed2p2
~SoleilSixsMed2p3
~SoleilSixsMed2p3v2

"""

Expand All @@ -54,17 +58,21 @@
K4CV
K6C
Petra3_p09_eh2
Petra3_p23_4c
Petra3_p23_6c
SimMixin
SimulatedE4CV
SimulatedE6C
SimulatedK4CV
SimulatedK6C
SoleilMars
SoleilNanoscopiumRobot
SoleilSiriusKappa
SoleilSiriusTurret
SoleilSixsMed1p2
SoleilSixsMed2p2
SoleilSixsMed2p3
SoleilSixsMed2p3v2
Zaxis
""".split()
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -101,17 +109,35 @@ class K6C(Diffractometer):


class Petra3_p09_eh2(Diffractometer):
"""Used at Petra3"""
"""6-circle Used at Petra3 P09"""

calc_class = calc.CalcPetra3_p09_eh2


class Petra3_p23_4c(Diffractometer):
"""4-circle Used at Petra3 P23"""

calc_class = calc.CalcPetra3_p23_4c


class Petra3_p23_6c(Diffractometer):
"""7-circle Used at Petra3 P23"""

calc_class = calc.CalcPetra3_p23_6c


class SoleilMars(Diffractometer):
"""Used at Soleil"""

calc_class = calc.CalcSoleilMars


class SoleilNanoscopiumRobot(Diffractometer):
"""Used at Soleil"""

calc_class = calc.CalcSoleilNanoscopiumRobot


class SoleilSiriusKappa(Diffractometer):
"""Used at Soleil"""

Expand Down Expand Up @@ -142,6 +168,12 @@ class SoleilSixsMed2p3(Diffractometer):
calc_class = calc.CalcSoleilSixsMed2p3


class SoleilSixsMed2p3v2(Diffractometer):
"""Used at Soleil"""

calc_class = calc.CalcSoleilSixsMed2p3v2


class Zaxis(Diffractometer):
"""Z-axis geometry"""

Expand Down
Loading
Loading