m3resp.QualityAnnotation#

class m3resp.QualityAnnotation(*, quality_annotation_id=<factory>, target_type, target_id, time_window_start=None, time_window_end=None, breath_ids=None, quality_label, artifact_type=None, annotation_source=None, annotator_ref=None)[source]#

Polymorphic quality label (doc Sec 11).

breath_ids lists the breaths the label is about, using the ids of the in-memory results (QualityFlag.breath_id/breath_ids). It is None when the label covers the whole target.

Attributes

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

quality_annotation_id

target_type

target_id

time_window_start

time_window_end

breath_ids

quality_label

artifact_type

annotation_source

annotator_ref

Parameters:
  • quality_annotation_id (str)

  • target_type (Literal['signal', 'file', 'session', 'event', 'feature'])

  • target_id (str)

  • time_window_start (float | None)

  • time_window_end (float | None)

  • breath_ids (list[str] | None)

  • quality_label (Literal['valid', 'suspect', 'invalid', 'missing', 'artifact'])

  • artifact_type (Literal['motion', 'electrode_detachment', 'ventilator_disconnect', 'noise', 'saturation', 'drift', 'other'] | None)

  • annotation_source (Literal['manual', 'automated', 'device_log'] | None)

  • annotator_ref (str | None)

annotation_source: AnnotationSource | None#
annotator_ref: str | None#
artifact_type: ArtifactType | None#
breath_ids: list[str] | None#
model_config = {'extra': 'forbid'}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

quality_annotation_id: str#
quality_label: QualityLabel#
target_id: str#
target_type: TargetType#
time_window_end: float | None#
time_window_start: float | None#