From 0d658ebb6060be780a2c4d386b43f901ddef80fe Mon Sep 17 00:00:00 2001 From: Seth Frey Date: Fri, 27 Apr 2018 13:23:08 -0400 Subject: [PATCH] update example to fix threshold() call heads up: in the current example, I expected the plot for `threshold(lower='2.5%', upper='97.5%')` to reproduce the original plot from `threshold(threshold='95%')` but the call that reproduces the original plot is the wrong-looking `threshold(upper='95%')` I also changed a variable name mask_b to prevent overwriting of examples main mask Former-commit-id: 3bf9c3e61f5a1bda53aae91fac18e12993bb4adb --- examples/01_DataOperations/plot_mask.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/01_DataOperations/plot_mask.py b/examples/01_DataOperations/plot_mask.py index 47649290..b6c4c26f 100644 --- a/examples/01_DataOperations/plot_mask.py +++ b/examples/01_DataOperations/plot_mask.py @@ -79,17 +79,17 @@ import numpy as np high = data[np.where(data.X['PainLevel']==3)[0]] -high.mean().threshold(threshold='95%').plot() +high.mean().threshold(lower='2.5%', upper='97.5%').plot() ######################################################################### # We might be interested in creating a binary mask from this threshold. -mask = high.mean().threshold(threshold='95%',binarize=True) -mask.plot() +mask_b = high.mean().threshold(lower='2.5%', upper='97.5%',binarize=True) +mask_b.plot() ######################################################################### # We might also want to create separate images from each contiguous ROI. -region = high.mean().threshold(threshold='95%').regions() +region = high.mean().threshold(lower='2.5%', upper='97.5%').regions() region.plot()