Hi Jonathan,
I spotted a bug in your script here:
Hello Everybody,
During my experiment I recorded 2 blocs per subject. I am just started
with mne_python.I have two questions in one ::
1) I would like to know how can I concatenate the blocs and above all
the events (corresponding to each bloc) to have just one bloc.
In brief, for each subject I have one bloc with its events and another
bloc with its events also.raw_fname1= '...'
raw_fname2= '...'
event_fname1= '...'
event_fname2= '...'raw1 = io.Raw(raw_fname1)
raw2 = io.Raw(raw_fname2)events1 = mne.read_events(event_fname1)
events2 = mne.read_events(event_fname2)
events_list = [events1,events2]
events is a numpy array, not a list. So, you need to use np.concatenate()
to stitch the events together. Something like:
import numpy as np
events = np.concatenate((events1, events2))
Does this solve your problem?
Mainak
raw_conc= concatenate_raws([raw1,raw2], events_list=events_list)
Until here I think these several code lines work correctly...
2) But when I try to extract the epochs from raw_conc I have some error
messages (concerning I think the events_list)picks =
mne.pick_types(raw1.info
,meg='mag',eeg=False,ecg=False,eog=False,stim=False,
exclude='bads')
epochs = mne.Epochs(raw, events_list, event_id, tmin, tmax, picks=picks,
baseline= baseline, reject=reject)The aim of both questions is to use the tfr_morlet function which asks
in input the epochs.power, itc = tfr_morlet(epochs, freqs=freqs, n_cycles=n_cycles,
use_fft=False, return_itc=True, decim=3,n_jobs=1)Someone has an idea about this?
Bests,
Jonathan
--
Dr Jonathan Entakli - Research Associate Post doctoral positionDepartment of Psychology
University of Cambridge, Downing St
Cambridge CB2 3EBSir William Hardy Building
Office : 314
Mobile : 07778 692 458http://www.viscog.psychol.cam.ac.uk/
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info PageThe information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140911/defb938e/attachment.html
