Skip to content

Commit bb74a08

Browse files
committed
Extend the documentation of the Vendor enum
Also, replace LowercaseStrEnum with Enum and remove the auto() calls for better readibility of the documentation.
1 parent f3543cc commit bb74a08

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
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 DREAGER"""
194+
195+
DRÄGER = DRAEGER # noqa: PIE796, PLC2401
196+
"""Synonym of DREAGER"""
197+
198+
SIMULATED = "simulated"
199+
"""Simulated data"""

0 commit comments

Comments
 (0)