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
2 changes: 1 addition & 1 deletion eitprocessing/roi/watershed.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def apply( # noqa: PLR0915

included_marker_indices = np.isin(peaks_loc_int, markers_inside_tiv_mask)
included_peaks = np.argwhere(included_marker_indices)
excluded_peaks = np.argwhere(~included_marker_indices)
excluded_peaks = np.argwhere(peaks_loc_bool & ~included_marker_indices)

included_watershed_regions = np.where(included_region, watershed_regions, np.nan)

Expand Down
2 changes: 2 additions & 0 deletions tests/test_watershed.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def test_watershed_captures(draeger1: Sequence):
]:
assert key in captures, f"captures should have a '{key}' entry"

assert len(captures["local peaks"]) == len(captures["included peaks"]) + len(captures["excluded peaks"])


def test_watershed_no_amplitude():
eit_data = EITData(
Expand Down