Source code for ts_ids_components.particle_sizer.curve
"""
Curve file component for particle sizer IDSs.
:py:class:`CurveFile` is a pointer to a Parquet file holding raw curve data --
the autocorrelation function (ACF) for DLS, the electrophoretic phase/
frequency trace for ELS, or the raw scattering pattern for laser diffraction.
These curves are stored as separate files (rather than inline datacubes)
because they are large and variable-length. A curve is always tied to the
sample (and run) it was measured on via ``fk_sample``/``fk_run``. Results
reference the curve they were derived from via :py:attr:`Result.fk_curve
<ts_ids_components.particle_sizer.result.Result.fk_curve>`; a result with no
underlying curve points at a placeholder entry so the foreign key is always
satisfied.
"""
from ts_ids_core.annotations import NullableString, UUIDForeignKey, UUIDPrimaryKey
from ts_ids_core.base.ids_element import IdsElement
from ts_ids_core.base.ids_field import IdsField
[docs]
class CurveFile(IdsElement):
"""Pointer to a Parquet file containing raw curve data (ACF, ELS time-series, etc.)."""
pk: UUIDPrimaryKey = IdsField(description="Primary key for this curve file.")
file_id: NullableString = IdsField(
description="Identifier of the Parquet file within the Tetra Data Platform."
)
file_name: NullableString = IdsField(description="Name of the Parquet file.")
fk_run: UUIDForeignKey = IdsField(
primary_key="/properties/runs/items/properties/pk",
description="Foreign key to the run this curve belongs to.",
)
fk_sample: UUIDForeignKey = IdsField(
primary_key="/properties/samples/items/properties/pk",
description="Foreign key to the sample this curve was measured on.",
)
description: NullableString = IdsField(
description="Human-readable description of the curve's contents, e.g. 'DLS autocorrelation function'."
)