Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions eitprocessing/datahandling/eitdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

import warnings
from dataclasses import InitVar, dataclass, field
from enum import auto
from enum import Enum
from pathlib import Path
from typing import TYPE_CHECKING, Any, TypeVar

import numpy as np
from strenum import LowercaseStrEnum # TODO: EOL 3.10: replace with native StrEnum

from eitprocessing.datahandling import DataContainer
from eitprocessing.datahandling.continuousdata import ContinuousData
Expand Down Expand Up @@ -173,12 +172,28 @@ def calculate_global_impedance(self) -> np.ndarray:
return np.nansum(self.pixel_impedance, axis=(1, 2))


class Vendor(LowercaseStrEnum):
"""Enum indicating the vendor (manufacturer) of the source EIT device."""
class Vendor(Enum):
"""Enum indicating the vendor (manufacturer) of the source EIT device.

The enum values are all lowercase strings. For some manufacturers, multiple ways of wrinting are provided mapping to
the same value, to prevent confusion over conversion of special characters. The "simulated" vendor is provided to
indicate simulated data.
"""

DRAEGER = "draeger"
"""Dräger (PulmoVista V500)"""

TIMPEL = "timpel"
"""Timpel (Enlight 2100)"""

SENTEC = "sentec"
"""Sentec (Lumon)"""

DRAEGER = auto()
TIMPEL = auto()
SENTEC = auto()
DRAGER = DRAEGER
DRÄGER = DRAEGER # noqa: PLC2401
SIMULATED = auto()
"""Synonym of DRAEGER"""

DRÄGER = DRAEGER # noqa: PIE796, PLC2401
"""Synonym of DRAEGER"""

SIMULATED = "simulated"
"""Simulated data"""
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ dependencies = [
"matplotlib>=3.10",
"numpy >= 1.24.2",
"scipy >= 1.10.1",
"strenum >= 0.4.10",
"anytree >= 2.12.1 ",
"typing_extensions",
"pyyaml",
Expand Down