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.
Overview – major sections left to right: External, User-facing, Core, Solvers, Backend libraries.#
User-facing – Bluesky plans and EPICS hardware connect to
DiffractometerBase and
WavelengthBase; creator() and
hklpy2.user provide convenience wrappers.#
Core – Core manages the seven block classes
(Sample, Lattice, Reflection, Constraints, Presets, Zone, Configuration)
and delegates calculations to the solver.#
Solvers – SolverBase is the adapter
interface; built-in solvers (HklSolver, ThTthSolver, NoOpSolver) and
additional solvers registered via entry points all subclass it.#
See also