[Mne_analysis] TFCE threshold cannot compute length after baseline correction

Maryam Zolfaghar Maryam.Zolfaghar at colorado.edu
Thu Apr 18 13:59:08 EDT 2019
Search archives:

        External Email - Use Caution        

Hi,

I am applying  "permutation_cluster_1samp_test " on my power and itc data.
I am wondering whether I should not use the baseline correction for the
time-frequency data before doing the statistical analysis.

I have attached my code here. When I do the "*apply_baseline*" on each
condition and then do "*permutation_cluster_1samp_test*", I got the
following error, however, if I don't do the "*apply_baseline*" it works
fine. It does not make sense to me why it should not work after applying
the baseline correction.


cond1     = power_avgAll[set_btlc[loc][0]]   # <AverageTFR>,
cond.data.shape: (chan X freq X time)
cond2     = power_avgAll[set_btlc[loc][1]]

baseline = (-0.4, -0.3)
cond1.apply_baseline(baseline, mode='mean')
cond2.apply_baseline(baseline, mode='mean')

tfce                   = dict(start=0, step=.2)
thresh                = 0.05
n_permutations = 100000
X = diff = (cond1.data - cond2.data)

T_obs, clusters, cluster_p_values, H0 = \
                    permutation_cluster_1samp_test(X, tfce, n_permutations,
tail=0)

*Error:*
  File
"/Users/MA/anaconda3/lib/python3.6/site-packages/mne/stats/cluster_level.py",
line 316, in _find_clusters
 threshold['step'], float)
ValueError: arange: cannot compute length



-Mary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190418/158b1b80/attachment.html 


More information about the Mne_analysis mailing list