Migration from hklpy (v1)#

hklpy2 is a complete redesign of the hklpy (v1) library with significant architectural changes. The main difference is that hklpy2 moves from a design centered on Hkl/Soleil to a Python-native data model with pluggable solvers.

For an AI-assisted description of the factors involved in migration, see DeepWiki.

Caution

Be careful with the code examples presented by the AI-assisted description. Often, they are not correct technically.

Simulated Eulerian 4-circle diffractometer#

1from hklpy2 import creator
2
3fourc = creator()

EPICS-based Eulerian 4-circle diffractometer#

 1from hklpy2 import creator
 2
 3fourc = creator(
 4    prefix="PREFIX:",
 5    name="fourc",
 6    geometry="E4CV",
 7    solver="hkl_soleil",
 8    reals=dict(
 9        omega="m30",
10        chi="m31",
11        phi="m32",
12        tth="m29",
13    )
14)