config
Config for the CST/CRT calculation step (v2).
Adds the EZ-integrity measurement to v1's CST/CRT config. Subclassing v1's
model is deliberate: the cache-persistence helpers are keyed on task_hash
alone and take the config only to derive equality filters (of which this step
has none), so they stay version-agnostic and shared.
The threshold lives here rather than in criteria_matching, despite being a
clinical number, because it is applied per A-scan before the run-length
reduction — a ColumnFilter can only compare the resulting scalar. The cost of
that placement is worth stating plainly: task_hash is a Merkle hash over the
step's version and semantic config, so changing this threshold moves the
partition and recomputes every scan's CST/CRT along with its EZ metrics. A
criteria_matching threshold does not.
Classes
CSTCalculationConfigV2
class CSTCalculationConfigV2(**data: Any):CST/CRT config, plus the EZ-integrity measurement.
The EZ block is inert unless ez_attenuation_threshold_um is set, which is
what makes the step safe to wire into a template before a trial has agreed
its threshold: every ez_* column is then empty rather than wrong.
Two assumptions are being made literally, and are recorded here so they are auditable if a cohort looks wrong rather than being rediscovered:
- A 50 µm gate sits close to normal anatomy. Healthy EZ-to-RPE separation is on the order of a few tens of micrometres, so the measurement convention matters more than it would for a threshold with margin.
dedupe_layer_pointsbiases the separation upward. Where a polyline is multivalued at one X, the inner boundary keeps the shallowest Y and the outer the deepest, which is the largest separation available. That convention was chosen for ILM-to-RPE, where it means "full retinal thickness"; here it biases towards calling tissue intact. It is left unchanged so CST and GCC are unaffected.
Attributes
ez_inner_layer_name: Inner layer of the EZ pair.ez_outer_layer_name: Outer layer of the EZ pair. Bruch's membrane is inRetinalLayerbut absent from the layers model's real output, so EZ-to-BM is not obtainable today.ez_attenuation_threshold_um: Separation above which the EZ counts as intact.Noneswitches the measurement off.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Ancestors
Variables
- static
ez_attenuation_threshold_um : float | None
- static
ez_inner_layer_name : str
- static
ez_outer_layer_name : str
- static
model_config