From a28916e2c809c7f6d9a77d2ffa51c4cbc52221bd Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 25 Jul 2018 12:12:27 -0400 Subject: [PATCH] Revert changes to make_adaptive_mask. I also changed `med_val` to `perc_val` to make it clearer. --- tedana/utils/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tedana/utils/utils.py b/tedana/utils/utils.py index 2f2390de3..1f1d3f5ea 100644 --- a/tedana/utils/utils.py +++ b/tedana/utils/utils.py @@ -194,11 +194,10 @@ def make_adaptive_mask(data, minimum=True, getsum=False): # get 33rd %ile of `first_echo` and find corresponding index perc_33 = np.percentile(first_echo, 33, interpolation='higher') # QUESTION: why 33%ile? - med_val = (echo_means[:, 0] == perc_33) + perc_val = (echo_means[:, 0] == perc_33) # extract values from all echos at relevant index - n_echos = data.shape[1] - lthrs = np.squeeze(echo_means[med_val].T) / n_echos + lthrs = np.squeeze(echo_means[perc_val].T) / 3 # QUESTION: why 3? # if multiple samples were extracted per echo, keep the one w/the highest signal if lthrs.ndim > 1: