Overview#

hklpy2 provides ophyd diffractometer devices. Each diffractometer is a positioner which may be used with bluesky plans.

Any diffractometer may be provisioned with simulated axes; motors from an EPICS control system are not required to use hklpy2.

Built from DiffractometerBase(), each diffractometer is an ophyd.PseudoPositioner that defines all the components of a diffractometer. The diffractometer geometry defines the names and order for the real motor axes. Geometries are defined by backend Solvers. Some solvers support different calculation engines (other than \(hkl\)). It is common for a geometry to support several operating modes.

Package Architecture#

The diagrams below show how the major components of hklpy2 fit together. The first diagram gives a high-level overview; the following three provide detail for each major section.

hklpy2 package architecture overview

Overview – major sections left to right: External, User-facing, Core, Solvers, Backend libraries.#

hklpy2 user-facing components

User-facing – Bluesky plans and EPICS hardware connect to DiffractometerBase and WavelengthBase; creator() and hklpy2.user provide convenience wrappers.#

hklpy2 core components

CoreCore manages the seven block classes (Sample, Lattice, Reflection, Constraints, Presets, Zone, Configuration) and delegates calculations to the solver.#

hklpy2 solver components

SolversSolverBase is the adapter interface; built-in solvers (HklSolver, ThTthSolver, NoOpSolver) and additional solvers registered via entry points all subclass it.#

See also

Glossary