File tree Expand file tree Collapse file tree 2 files changed +24
-10
lines changed
eitprocessing/datahandling Expand file tree Collapse file tree 2 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 22
33import warnings
44from dataclasses import InitVar , dataclass , field
5- from enum import auto
5+ from enum import Enum
66from pathlib import Path
77from typing import TYPE_CHECKING , Any , TypeVar
88
99import numpy as np
10- from strenum import LowercaseStrEnum # TODO: EOL 3.10: replace with native StrEnum
1110
1211from eitprocessing .datahandling import DataContainer
1312from 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"""
Original file line number Diff line number Diff 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" ,
You can’t perform that action at this time.
0 commit comments