Skip to content

Commit e748149

Browse files
authored
Merge pull request #449 from EIT-ALIVE/docs/add-vendor-documentation
Extend the documentation of the Vendor enum
2 parents 8417419 + 2139473 commit e748149

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

eitprocessing/datahandling/eitdata.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
import warnings
44
from dataclasses import InitVar, dataclass, field
5-
from enum import auto
5+
from enum import Enum
66
from pathlib import Path
77
from typing import TYPE_CHECKING, Any, TypeVar
88

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

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

175174

176-
class Vendor(LowercaseStrEnum):
177-
"""Enum indicating the vendor (manufacturer) of the source EIT device."""
175+
class Vendor(Enum):
176+
"""Enum indicating the vendor (manufacturer) of the source EIT device.
177+
178+
The enum values are all lowercase strings. For some manufacturers, multiple ways of wrinting are provided mapping to
179+
the same value, to prevent confusion over conversion of special characters. The "simulated" vendor is provided to
180+
indicate simulated data.
181+
"""
182+
183+
DRAEGER = "draeger"
184+
"""Dräger (PulmoVista V500)"""
185+
186+
TIMPEL = "timpel"
187+
"""Timpel (Enlight 2100)"""
188+
189+
SENTEC = "sentec"
190+
"""Sentec (Lumon)"""
178191

179-
DRAEGER = auto()
180-
TIMPEL = auto()
181-
SENTEC = auto()
182192
DRAGER = DRAEGER
183-
DRÄGER = DRAEGER # noqa: PLC2401
184-
SIMULATED = auto()
193+
"""Synonym of DRAEGER"""
194+
195+
DRÄGER = DRAEGER # noqa: PIE796, PLC2401
196+
"""Synonym of DRAEGER"""
197+
198+
SIMULATED = "simulated"
199+
"""Simulated data"""

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ dependencies = [
4040
"matplotlib>=3.10",
4141
"numpy >= 1.24.2",
4242
"scipy >= 1.10.1",
43-
"strenum >= 0.4.10",
4443
"anytree >= 2.12.1 ",
4544
"typing_extensions",
4645
"pyyaml",

0 commit comments

Comments
 (0)