Examples#
These notebooks are worked demonstrations — they show hklpy2 working on specific use cases with real (or simulated) hardware configurations. They are not tutorials: they assume you already know the basic workflow. If you are new to hklpy2, start with the Tutorial: Your First Diffractometer first.
The notebooks are available for download from the source code website: https://github.com/bluesky/hklpy2/docs/source/examples.
Getting started#
Example |
Description |
|---|---|
Simulated 4-circle diffractometer built with |
|
Same diffractometer built as a custom Python subclass. |
Eulerian geometries (hkl_soleil)#
Example |
Description |
|---|---|
E4CH (horizontal scattering) 4-circle geometry. |
|
E4CV (vertical scattering) 4-circle geometry. |
|
E4CV with real EPICS motor PVs. |
|
E6C with the extra |
|
E6C forward/inverse calculation validation. |
Kappa geometries (hkl_soleil)#
Example |
Description |
|---|---|
K4CV kappa 4-circle geometry. |
Orientation matrix#
Example |
Description |
|---|---|
Calculate the UB matrix from two orientation reflections. |
|
Set the UB matrix directly. |
|
Refine lattice parameters from three or more reflections. |
Constraints#
Example |
Description |
|---|---|
Filter |
Advanced topics#
Example |
Description |
|---|---|
Add a virtual (computed) axis to a diffractometer. |
|
Scan along a crystallographic zone axis. |
|
Cross-validate hklpy2 results against SPEC |
Real instrument examples#
Example |
Description |
|---|---|
APS ISN 6-circle diffractometer with renamed axes. |
|
NSLS-II TARDIS diffractometer. |