Skip to content

Commit ffe5ef1

Browse files
committed
FIX: another fix for the ratio threshold (would deserve to spend more time)
1 parent 0a39719 commit ffe5ef1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nisnap/snap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ def _snap_slices_(data, slices, axis, bb=None, figsize=None, pbar=None):
155155
labels = list(np.unique(data))
156156
has_bb = bb is not None
157157
d = data.ravel()
158-
ratio = len(d[d == 0]) / len(d)
158+
ratio = len(d[d <= 10]) / len(d)
159159
# has_orig = len(labels) > 50 # not bb is None
160-
is_raw = ratio < 0.90
160+
is_raw = ratio < 0.80
161161

162162
paths = []
163163
if not has_bb:

0 commit comments

Comments
 (0)