Skip to content

Commit

Permalink
[MRG] Log automatically determined cluster threshold (mne-tools#4733)
Browse files Browse the repository at this point in the history
* Log automatically determined threshold

* Fix typo
  • Loading branch information
cbrnr authored and larsoner committed Nov 8, 2017
1 parent 029e14a commit 73806bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mne/stats/cluster_level.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ def permutation_cluster_test(X, threshold=None, n_permutations=1024,
threshold = ppf(1. - p_thresh, *n_samples_per_group)
if np.sign(tail) < 0:
threshold = -threshold
logger.info("Using a threshold of {:.6f}".format(threshold))

return _permutation_cluster_test(X=X, threshold=threshold,
n_permutations=n_permutations,
Expand Down Expand Up @@ -1170,6 +1171,7 @@ def permutation_cluster_1samp_test(X, threshold=None, n_permutations=1024,
threshold = -ppf(p_thresh, n_samples - 1)
if np.sign(tail) < 0:
threshold = -threshold
logger.info("Using a threshold of {:.6f}".format(threshold))

X = [X] # for one sample only one data array
return _permutation_cluster_test(X=X,
Expand Down

0 comments on commit 73806bc

Please sign in to comment.