time frequency analysis

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190109/7fd4629d/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 57326 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190109/7fd4629d/attachment-0001.png

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