[Mne_analysis] TFCE threshold cannot compute length after baseline correction

Mainak Jas mainakjas at gmail.com
Fri Apr 19 15:31:27 EDT 2019
Search archives:

        External Email - Use Caution        

Hi Mary,

It could be that the baseline is changing the data so that the stopping
threshold in TFCE (which is determined from the data) has changed. Perhaps
what would be useful is to provide is to share a minimal reproducible
script using the sample data so that we can help.

Mainak

On Thu, Apr 18, 2019 at 2:00 PM Maryam Zolfaghar <
Maryam.Zolfaghar at colorado.edu> wrote:

>         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
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190419/ceef4fda/attachment.html 


More information about the Mne_analysis mailing list