Skip to content

Commit

Permalink
Add notes about arbitrary hardcoded values.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Jul 25, 2018
1 parent a28916e commit 92201f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tedana/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,13 @@ def make_adaptive_mask(data, minimum=True, getsum=False):
first_echo = echo_means[echo_means[:, 0] != 0, 0]

# get 33rd %ile of `first_echo` and find corresponding index
perc_33 = np.percentile(first_echo, 33, interpolation='higher') # QUESTION: why 33%ile?
perc_val = (echo_means[:, 0] == perc_33)
# NOTE: percentile is arbitrary
perc = np.percentile(first_echo, 33, interpolation='higher')
perc_val = (echo_means[:, 0] == perc)

# extract values from all echos at relevant index
lthrs = np.squeeze(echo_means[perc_val].T) / 3 # QUESTION: why 3?
# NOTE: threshold of 1/3 voxel value is arbitrary
lthrs = np.squeeze(echo_means[perc_val].T) / 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 92201f2

Please sign in to comment.