[Mne_analysis] Could you help me find events from ".set" file?
Soan KIM
cheukusi.kim at gmail.com
Wed May 22 11:59:30 EDT 2019
External Email - Use Caution
Thank you so much!! It worked!
but I've faced with another problem making custom epochs. Could you give me
some advice?
Thank you!!
I see this error even though I picked 18 channels :
ValueError: All picks must be < n_channels (30), got 30
This is my code :
event_id = {'S 4':4, 'S 6':6, 'S 7':7, 'S 1':1, 'S 5':5, 'S
3':3, 'S 2':2}
events= mne.events_from_annotations(raw)
n_channels = 32
sampling_rate = 500
info = mne.create_info(n_channels, sampling_rate)
channel_names = ['Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4',
'O1', 'O2', 'F7', 'F8', 'T7', 'T8', 'P7', 'P8', 'Fz', 'Cz', 'Pz',
'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6', 'TP9', 'TP10',
'EOG', 'M1', 'M2']
channel_types = ['eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
'eeg', 'eeg', 'eog', 'bio', 'bio']
sfreq = 500
info['description'] = 'My custom dataset'
info['bads'] = ['Fp1', 'Fp2', 'F7', 'F8', 'T7', 'T8', 'TP9', 'TP10']
include = ['F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'P7', 'P8',
'FC1', 'FC2', 'CP1', 'CP2', 'FC5', 'FC6', 'CP5', 'CP6']
picks = mne.pick_channels(channel_names, include=include,
exclude=info['bads'], ordered=False)
tmin= -0.2
tmax = 0.8
custom_epochs = mne.EpochsArray(raw, info, picks, events, event_id)
2019년 5월 22일 (수) 오후 10:26, Brunner, Clemens (clemens.brunner at uni-graz.at) <
clemens.brunner at uni-graz.at>님이 작성:
> External Email - Use Caution
>
> Hi!
>
>
>
> Your markers are probably in raw.annotations. If you want to convert them
> to events, use mne.events_from_annotations(raw).
>
>
>
> Clemens
>
>
>
>
>
> *From:* mne_analysis-bounces at nmr.mgh.harvard.edu <
> mne_analysis-bounces at nmr.mgh.harvard.edu> *On Behalf Of *Soan KIM
> *Sent:* Wednesday, 22 May 2019 14:04
> *To:* mne_analysis at nmr.mgh.harvard.edu
> *Subject:* [Mne_analysis] Could you help me find events from ".set" file?
>
>
>
> * External Email - Use Caution *
>
> Hello, I am a student learning MNE-python.
> I have trouble finding events in my ".set" file. It appears empty.
> I've also tried mne.io.read_epochs_eeglab with my another epoched
> ".set" file, but the list of events is also empty.
> To be specific, my raw eeg file was '.vhdr', '.vmrk', and
> '.eeg.(BrainProduct)', with no stim_channel. And the data had no
> problem when I pre-processed and ran statistics with EEGLAB and
> ERPlab. Could you please help me?
>
> I attach my continuous eeg file('001.set' , '001.fdt'), and epoched
> one("001_sync.set", '001_sync.fdt")
>
>
> Thank you.
>
> -------
> This is how my file looks like.
>
> <Info | 17 non-empty fields
> bads : list | 0 items
> ch_names : list | Fp1, Fp2, F3, F4, C3, C4, P3, P4, O1, ...
> chs : list | 30 items (EEG: 30)
> comps : list | 0 items
> custom_ref_applied : bool | False
> dev_head_t : Transform | 3 items
> dig : list | 29 items (29 EEG)
> events : list | 0 items
> highpass : float | 0.0 Hz
> hpi_meas : list | 0 items
> hpi_results : list | 0 items
> lowpass : float | 125.0 Hz
> meas_date : NoneType | unspecified
> nchan : int | 30
> proc_history : list | 0 items
> projs : list | 0 items
> sfreq : float | 250.0 Hz
> acq_pars : NoneType
> acq_stim : NoneType
> ctf_head_t : NoneType
> description : NoneType
> dev_ctf_t : NoneType
> experimenter : NoneType
> file_id : NoneType
> gantry_angle : NoneType
> hpi_subsystem : NoneType
> kit_system_id : NoneType
> line_freq : NoneType
> meas_id : NoneType
> proj_id : NoneType
> proj_name : NoneType
> subject_info : NoneType
> xplotter_layout : NoneType
>
> -----------
>
> This is my code :
>
> raw = mne.io.read_raw_eeglab('/001.set', preload=True)
> event_id = {'B1(1)': 1, 'B2(2)':2, 'B3(3)':3, 'B4(4)':4, 'B5(5)':5,
> 'B6(6)':6, 'B7(7)':7}
> events= mne.find_events(raw)
> data, times = raw[:, :]
> data.shape
> start, stop = raw.time_as_index([0, 503955])
> data, times = raw[:, start:stop]
> times.max()
> picks = mne.pick_types(raw.info
> ,meg=False,eeg=True,stim=False,eog=False,ecg=False,misc=False)
>
> events = mne.find_events(raw, stim_channel=None, verbose=True)
> events[:]
>
> array([], shape=(0, 3), dtype=int32)
>
> *[image: Image removed by sender.] 001.fdt
> <https://drive.google.com/file/d/1cWYSfx4Xjd_0how-JlNMqIRtKg8iKwOO/view?usp=drive_web>[image:
> Image removed by sender.]*
>
> *[image: Image removed by sender.] 001.set
> <https://drive.google.com/file/d/1W4_ZT9T1VV1E9spAQZI9iTN-JllRMkcR/view?usp=drive_web>[image:
> Image removed by sender.]*
>
> *[image: Image removed by sender.] 001_sync.fdt
> <https://drive.google.com/file/d/1UIcPulCpgIHbrNbsJMPF_dJsjwhYhDNv/view?usp=drive_web>[image:
> Image removed by sender.]*
>
> *[image: Image removed by sender.] 001_sync.set
> <https://drive.google.com/file/d/1GlIuQqDkgEr4waisO8zHdR2RA66j_T52/view?usp=drive_web>[image:
> Image removed by sender.]*
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
--
서울시 성북구 안암로 145 고려대학교 136-701
Korea University, 145 Anam-ro, Seongbuk-gu, Seoul, Korea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190523/3b32efb4/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ~WRD000.jpg
Type: image/jpeg
Size: 823 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190523/3b32efb4/attachment-0001.jpg
More information about the Mne_analysis
mailing list