[Mne_analysis] time frequency analysis

Alexandre Gramfort alexandre.gramfort at inria.fr
Wed Jan 9 13:06:42 EST 2019
Search archives:

        External Email - Use Caution        

hi Tao,

this is expect edge artifacts. you should crop the tfr object after
estimation
to remove the corrupted edges.

HTH
Alex


On Wed, Jan 9, 2019 at 2:44 PM Xia, Tao <psytao18 at connect.hku.hk> wrote:

>         External Email - Use Caution
>
> Hi all~
>     I have run tfr_wavelet with my epochs data. But the averaged results
> make me confused. Following are the script and results. I did not know why
> there is a large power both in started and ended time point. it is wrong ?
> or any problems with my script? I have tried a different time segment but
> have similar results.
>     best wishes,
> script:
> import mne
> import os
> import numpy as np
> from mne.time_frequency import tfr_morlet
> raw_fname=('/*******')
> subjectlist=os.listdir(raw_fname)
> power_list=list()
> freqs=np.arange(1,21,1)
> n_cycles=np.logspace(math.log10(2),math.log10(10),20)
>
> for raw_name in subjectlist:
> raw_name_path1=os.path.join(raw_fname1,raw_name1)
> epochs=mne.epochs.read_epochs(raw_name_path1)
> epochs.apply_baseline(baseline=(None,0))
> epochs.pick_types(meg=False, eeg=True,stim=False,eog=True)
> power, itc=tfr_morlet(epochs, freqs=freqs,n_cycles=n_cycles,
> return_itc=True, average=True)
> power.apply_baseline(baseline=(None,0),mode='zscore')
> data1=power.data
> power_list.append(data1)
> all=np.array(power_list)
> all_power=high.mean(0)
> all_power=mne.time_frequency.AverageTFR(info=power.info
> ,data=all_power,times=power.times,freqs=power.freqs,nave=14)
>
> [image: image.png]
>
> Tao Xia
>
> _______________________________________________
> 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/20190109/2f5ff357/attachment.html 


More information about the Mne_analysis mailing list