Skip to content

Commit

Permalink
Merge branch 'main' into 267-versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian authored Oct 19, 2023
2 parents 5d7c943 + 299d39a commit ef5e939
Show file tree
Hide file tree
Showing 14 changed files with 461 additions and 46 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/conda_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ defaults:

jobs:

lint:
name: Code style
runs-on: ubuntu-latest
# lint:
# name: Code style
# runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
# steps:
# - uses: actions/checkout@v4

- uses: actions/setup-python@v4
with:
python-version: '3.11'
# - uses: actions/setup-python@v4
# with:
# python-version: '3.11'

- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
# - name: Install Dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8

- name: Run flake8
run: |
flake8
# - name: Run flake8
# run: |
# flake8

- name: Run black
uses: rickstaa/action-black@v1
with:
black_args: ". --check"
# - name: Run black
# uses: rickstaa/action-black@v1
# with:
# black_args: ". --check"

build:
testing:

runs-on: ubuntu-latest
needs: lint
# needs: lint
strategy:
matrix:
python-version:
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: pre-commit

# from: https://github.com/NSLS-II/scientific-python-cookiecutter/ ... /.github/workflows/pre-commit.yml

on:
pull_request:
push:
workflow_dispatch:

jobs:
pre-commit:
# pull requests are a duplicate of a branch push if within the same repo.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: pre-commit/[email protected]
with:
extra_args: --all-files
37 changes: 37 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks

ci:
default_language_version: python3.11

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-yaml
- id: check-json
- id: debug-statements
- id: check-executables-have-shebangs
- id: mixed-line-ending
# - id: end-of-file-fixer
# - id: trailing-whitespace

# - repo: https://github.com/pycqa/flake8
# rev: 4.0.1
# hooks:
# - id: flake8

# - repo: https://github.com/timothycrosley/isort
# rev: 5.12.0
# hooks:
# - id: isort

# - repo: https://github.com/psf/black
# rev: 22.8.0
# hooks:
# - id: black
12 changes: 11 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ Release History
Deprecations
Contributors
v1.1 (expected 2024)
v1.2 (expected 2024)
======================================

User-requested changes

v1.1 (expected 2023-12)
======================================

Add new geometries from upstream *libhkl*.

Fixes
-----

* ``util.restore_reflections()`` use renamed motor axes if so defined.

Maintenance
-----------

Expand Down
140 changes: 123 additions & 17 deletions docs/source/geometry_tables.rst
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 @@ -39,17 +39,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
Loading

0 comments on commit ef5e939

Please sign in to comment.