File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ def apply( # noqa: PLR0915
168168
169169 included_marker_indices = np .isin (peaks_loc_int , markers_inside_tiv_mask )
170170 included_peaks = np .argwhere (included_marker_indices )
171- excluded_peaks = np .argwhere (~ included_marker_indices )
171+ excluded_peaks = np .argwhere (peaks_loc_bool & ~ included_marker_indices )
172172
173173 included_watershed_regions = np .where (included_region , watershed_regions , np .nan )
174174
Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ def test_watershed_captures(draeger1: Sequence):
159159 ]:
160160 assert key in captures , f"captures should have a '{ key } ' entry"
161161
162+ assert len (captures ["local peaks" ]) == len (captures ["included peaks" ]) + len (captures ["excluded peaks" ])
163+
162164
163165def test_watershed_no_amplitude ():
164166 eit_data = EITData (
You can’t perform that action at this time.
0 commit comments