Skip to content

Commit

Permalink
Remove hardcoded number of echoes from make_adaptive_mask.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jul 24, 2018
1 parent a92a766 commit 433338b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tedana/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def make_adaptive_mask(data, minimum=True, getsum=False):
med_val = (echo_means[:, 0] == perc_33)

# extract values from all echos at relevant index
lthrs = np.squeeze(echo_means[med_val].T) / 3 # QUESTION: why divide by 3?
n_echos = data.shape[1]
lthrs = np.squeeze(echo_means[med_val].T) / n_echos

# if multiple samples were extracted per echo, keep the one w/the highest signal
if lthrs.ndim > 1:
Expand Down

0 comments on commit 433338b

Please sign in to comment.