Source code for ts_ids_components.xrd.sample

"""
Sample component for XRD IDSs.

:py:class:`XrdSample` extends the generic
:py:class:`Sample <ts_ids_core.schema.sample.Sample>` common component with a
``pk`` (:py:data:`UUIDPrimaryKey <ts_ids_core.annotations.UUIDPrimaryKey>`) so
a consuming IDS can declare it as a top-level array (``samples: List[XrdSample]``,
following the platform-wide ``samples`` top-level naming convention) and
datacubes (see :py:mod:`ts_ids_components.xrd.datacube` and
:py:mod:`ts_ids_components.xrd.datacube_raw`) can reference the specific
sample a scan was measured on via ``fk_sample``.
"""

from ts_ids_core.annotations import UUIDPrimaryKey
from ts_ids_core.base.ids_field import IdsField
from ts_ids_core.schema import Sample


[docs] class XrdSample(Sample): """A sample measured by an XRD instrument.""" pk: UUIDPrimaryKey = IdsField( description="Primary key for this sample, referenced by datacubes measured on it." )