Skip to content

Commit 42078ff

Browse files
committed
Merge branch 'main' into develop
2 parents 4552cd7 + 6d6da6a commit 42078ff

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ authors:
3939

4040
date-released: 2023-03-23
4141
doi: 10.5281/zenodo.7869553
42-
version: "1.8.6"
42+
version: "1.8.7"
4343
repository-code: "https://github.com/EIT-ALIVE/eitprocessing"
4444
keywords:
4545
- Mechanical lung ventilation

eitprocessing/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.8.6"
1+
__version__ = "1.8.7"

eitprocessing/features/pixel_breath.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,18 @@ def find_pixel_breaths( # noqa: C901, PLR0912, PLR0915
225225
# find the closest peak to zero lag
226226
peak_lags = lags[lag_range][peaks]
227227
peak_distances = np.abs(peak_lags)
228+
if len(peak_distances) == 0:
229+
# no peaks found, skip pixel
230+
warnings.warn(
231+
(
232+
f"Skipping pixel ({row}, {col}) because no cross correlation peak found. "
233+
"This may be due to unstable (pixel) impedance. "
234+
"This algorithm does not handle unstable impedance data well."
235+
),
236+
RuntimeWarning,
237+
stacklevel=2,
238+
)
239+
continue
228240
min_peak_distance = np.min(peak_distances)
229241
candidates = peak_lags[peak_distances == min_peak_distance]
230242

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "eitprocessing"
7-
version = "1.8.6"
7+
version = "1.8.7"
88
description = "Processing of lung image data from electrical impedance tomography."
99
readme = "README.md"
1010
requires-python = ">=3.10"
@@ -173,7 +173,7 @@ isort.known-first-party = ["eitprocessing"]
173173
"docs/*" = ["ALL"]
174174

175175
[tool.bumpversion]
176-
current_version = "1.8.6"
176+
current_version = "1.8.7"
177177

178178
[[tool.bumpversion.files]]
179179
filename = "pyproject.toml"

0 commit comments

Comments
 (0)