config
Config for the scan reduce step (v1).
Classes
ScanReduceConfig
class ScanReduceConfig(**data: Any):Config for the scan reduce step.
Attributes
strategy:latestkeeps the newest scans per group;allis the identity reduction, which lets a template carry the step while a trial opts out of reducing at all.num_latest: How many scans to keep per group. A ceiling, not a quota.group_by: What to subdivide a patient by — nothing (latest N per patient), their laterality (latest N per eye), or their protocol.min_scans: How many selected scans a patient must hold to be inferred at all.1, the default, keeps every patient.
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
group_by : list[ScanReduceGroupKey]
- static
min_scans : int
- static
model_config
- static
num_latest : int
- static
strategy : ScanReduceStrategy
ScanReduceGroupKey
class ScanReduceGroupKey(*args, **kwds):Scan attributes a reduction may subdivide a patient by.
Drawn from scan_metadata's own columns, so a key here needs no new
extraction. The patient is always part of the group; these are what may be
added beside them.
Ancestors
ScanReduceStrategy
class ScanReduceStrategy(*args, **kwds):Valid reduction strategies.
StrEnum keeps values JSON/YAML-friendly and comparable to plain strings,
as ScanFilterStrategy does.