Skip to content

Commit 0c338e5

Browse files
authored
Merge pull request #230 from enfascination/patch-1
update example to fix broken call to threshold() Former-commit-id: a7f046d
2 parents d2a3833 + 0d658eb commit 0c338e5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/01_DataOperations/plot_mask.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,17 +79,17 @@
7979
import numpy as np
8080

8181
high = data[np.where(data.X['PainLevel']==3)[0]]
82-
high.mean().threshold(threshold='95%').plot()
82+
high.mean().threshold(lower='2.5%', upper='97.5%').plot()
8383

8484
#########################################################################
8585
# We might be interested in creating a binary mask from this threshold.
8686

87-
mask = high.mean().threshold(threshold='95%',binarize=True)
88-
mask.plot()
87+
mask_b = high.mean().threshold(lower='2.5%', upper='97.5%',binarize=True)
88+
mask_b.plot()
8989

9090
#########################################################################
9191
# We might also want to create separate images from each contiguous ROI.
9292

93-
region = high.mean().threshold(threshold='95%').regions()
93+
region = high.mean().threshold(lower='2.5%', upper='97.5%').regions()
9494
region.plot()
9595

0 commit comments

Comments
 (0)