.. _concepts.sample: ====== Sample ====== In |hklpy2|, each sample's name, :ref:`lattice `, :ref:`reflections `, and *orientation* are stored in the :class:`~hklpy2.blocks.sample.Sample()` class. The complete list of all a diffractometer's samples (a Python dictionary) is managed by the core :class:`~hklpy2.ops.Core()` class. You can find the samples at ``fourc.core.samples`` (substitute your diffractometer's name here). There is a shortcut: ``fourc.samples``. It's easy to switch between samples when there are choices. For example, select the *vibranium* sample: ``fourc.core.sample = "vibranium"`` (shortcut: ``fourc.sample = "vibranium"``) The operations ``.core`` sends information *from* the selected sample *to* the solver when calling a solver function (such as :meth:`~hklpy2.backends.base.SolverBase.calculate_UB()`). When the solver computes :math:`U` and :math:`UB`, those orientation matrices are stored in the sample structure. .. rubric:: Examples Many of the :ref:`examples` (such as :doc:`E4CH `, :doc:`E4CV `, and :doc:`K4CV `) show how to create or add a sample. .. seealso:: :ref:`glossary`