Skip to content

Commit

Permalink
Revert changes to make_adaptive_mask.
Browse files Browse the repository at this point in the history
I also changed `med_val` to `perc_val` to make it clearer.
  • Loading branch information
tsalo committed Jul 25, 2018
1 parent fe948b0 commit a28916e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tedana/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a28916e

Please sign in to comment.