[Mne_analysis] Setting the Marker channel

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Wed Jul 12 07:59:41 EDT 2017
Search archives:

hi,

make sure the marker channel is set as stim channel so it is not filtered.

did you do this?

raw.set_channel_types({'MARKER': 'stim'})

Best,
--
Alexandre Gramfort, PhD
INRIA, Université Paris-Saclay
http://alexandre.gramfort.net
alexandre.gramfort at inria.fr


On Wed, Jul 12, 2017 at 1:03 PM, Senaka Amarakeerthi <senakahks at gmail.com>
wrote:

> Dear Jaakko,
>
> Your suggestion fixed the problem.
>
> Thanks
>
> Senaka
>
>
>
> <https://mailtrack.io/> Sent with Mailtrack
> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>
> On Wed, Jul 12, 2017 at 4:22 PM, Jaakko Leppakangas <jaeilepp at gmail.com>
> wrote:
>
>> Could it be because the stim channel is getting filtered as well? You
>> should first reassign the channel as stim channel (with
>> raw.set_channel_types) and then filter.
>>
>> -Jaakko
>>
>> On Wed, Jul 12, 2017 at 12:42 PM, Senaka Amarakeerthi <
>> senakahks at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> One more small problem to get fixed. When I apply a low-pass or
>>> high-pass filter, SOME event ids are not detected. Tested with the code I
>>> specified in the thread with linked data.
>>>
>>> Any possible reasons?
>>>
>>> Thank you,
>>>
>>> Senaka
>>>
>>>
>>>
>>>
>>>
>>> <https://mailtrack.io/> Sent with Mailtrack
>>> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>>>
>>> On Mon, Jul 10, 2017 at 6:05 PM, Senaka Amarakeerthi <
>>> senakahks at gmail.com> wrote:
>>>
>>>> Hi Jaakko and Alex,
>>>>
>>>> Thanks a lot. Finally, Jaakko's trick worked.
>>>>
>>>> This is the plot.
>>>>
>>>> https://ibb.co/eKt6Pa
>>>>
>>>> Thank you again for spending your valuable to get the code fixed up.
>>>>
>>>> Senaka
>>>>
>>>>
>>>>
>>>> <https://mailtrack.io/> Sent with Mailtrack
>>>> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>>>>
>>>> On Mon, Jul 10, 2017 at 4:04 PM, Jaakko Leppakangas <jaeilepp at gmail.com
>>>> > wrote:
>>>>
>>>>> You can do
>>>>>
>>>>> import mne
>>>>> mne.sys_info()
>>>>>
>>>>> I think you can also work around the issue by doing
>>>>> raw.set_channel_types({'MARKER': 'stim'})
>>>>>
>>>>> after constructing the RawArray. The amplitude of the stimulus channel
>>>>> is messing up the plot.
>>>>>
>>>>> -Jaakko
>>>>>
>>>>> On Mon, Jul 10, 2017 at 11:52 AM, Senaka Amarakeerthi <
>>>>> senakahks at gmail.com> wrote:
>>>>>
>>>>>> Dear Jaakko,
>>>>>>
>>>>>> I issued the following command
>>>>>> pip install mne --upgrade
>>>>>>
>>>>>> Result:
>>>>>> Requirement already up-to-date: mne in ./mne-python
>>>>>>
>>>>>> Is there a direct command to check the version?
>>>>>>
>>>>>> I use python 2.7 and macOS Sierra.
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Senaka
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <https://mailtrack.io/> Sent with Mailtrack
>>>>>> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>>>>>>
>>>>>> On Mon, Jul 10, 2017 at 11:19 AM, Jaakko Leppakangas <
>>>>>> jaeilepp at gmail.com> wrote:
>>>>>>
>>>>>>> I was able to reproduce the plot with version 0.13. I'm not sure
>>>>>>> what's the cause of it, but in v. 0.14 it looks better. Can you try
>>>>>>> updating mne to the latest version?
>>>>>>>
>>>>>>> -Jaakko
>>>>>>>
>>>>>>> On Sun, Jul 9, 2017 at 2:22 PM, Senaka Amarakeerthi <
>>>>>>> senakahks at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> I am migrating from EEGLAB and tried to apply baseline corrections
>>>>>>>> and filters, unfortunately, those attempts ended up with another set of
>>>>>>>> errors. Highly appreciating somebody's support since I am exhausted.
>>>>>>>>
>>>>>>>> Sample file URL:
>>>>>>>> https://www.dropbox.com/s/vwvy4duwkahysfk/ChinthakaDahnushka
>>>>>>>> .edf?dl=0
>>>>>>>>
>>>>>>>> The code so far I used:
>>>>>>>>
>>>>>>>> import mne
>>>>>>>> import numpy as np
>>>>>>>> import matplotlib.pyplot as plt
>>>>>>>>
>>>>>>>>
>>>>>>>> raw = mne.io.read_raw_edf('ChinthakaDahnushka.edf', preload=True)
>>>>>>>> raw = raw.drop_channels(['COUNTER', 'INTERPOLATED','RAW_CQ','GYROX','GYROY', 'SYNC', 'TIME_STAMP_s', 'TIME_STAMP_ms', 'CQ_AF3', 'CQ_F7', 'CQ_F3', 'CQ_FC5', 'CQ_T7', 'CQ_P7', 'CQ_O1', 'CQ_O2', 'CQ_P8', 'CQ_T8', 'CQ_FC6', 'CQ_F4', 'CQ_F8', 'CQ_AF4', 'CQ_CMS', 'STI 014'])
>>>>>>>>
>>>>>>>> data = raw[:, :][0]
>>>>>>>>
>>>>>>>> data[14] *= 1000000
>>>>>>>>
>>>>>>>> raw = mne.io.RawArray(data, raw.info)
>>>>>>>>
>>>>>>>> events = mne.find_events(raw, stim_channel='MARKER')
>>>>>>>>
>>>>>>>>
>>>>>>>> print('Found %s events, first five:' % len(events))
>>>>>>>> print(events[:5])
>>>>>>>>
>>>>>>>>
>>>>>>>> event_id = {'two': 2}
>>>>>>>>
>>>>>>>> epochs = mne.Epochs(raw, events, event_id=event_id, tmin=-0.2, tmax=1.5)
>>>>>>>>
>>>>>>>>
>>>>>>>> epochs_data = epochs['two'].get_data()
>>>>>>>>
>>>>>>>>
>>>>>>>> print(epochs_data.shape)
>>>>>>>>
>>>>>>>>
>>>>>>>> epochs.plot(block=True)
>>>>>>>>
>>>>>>>>
>>>>>>>> This is the plot I ended up with
>>>>>>>>
>>>>>>>> https://ibb.co/ccKXvF
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Senaka
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> <https://mailtrack.io/> Sent with Mailtrack
>>>>>>>> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>>>>>>>>
>>>>>>>> On Sun, Jul 9, 2017 at 1:33 PM, Alexandre Gramfort <
>>>>>>>> alexandre.gramfort at telecom-paristech.fr> wrote:
>>>>>>>>
>>>>>>>>> hi,
>>>>>>>>>
>>>>>>>>> did you baseline correct your Epochs or high pass filter the raw
>>>>>>>>> data?
>>>>>>>>> if not please do.
>>>>>>>>>
>>>>>>>>> you may have a big offset in the values.
>>>>>>>>>
>>>>>>>>> HTH,
>>>>>>>>> Alex
>>>>>>>>>
>>>>>>>>> On Sat, Jul 8, 2017 at 4:38 PM, Senaka Amarakeerthi <
>>>>>>>>> senakahks at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Alex,
>>>>>>>>>>
>>>>>>>>>> Thank you for your time. You can check screenshots of the graphs
>>>>>>>>>> below, which were not available in the last post.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> raw.plot(block=True)
>>>>>>>>>> https://ibb.co/n6GeaF
>>>>>>>>>>
>>>>>>>>>> epochs.plot(block=True)
>>>>>>>>>>
>>>>>>>>>> https://ibb.co/ccKXvF
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> So, I guess this is not a problem with an amplitude of the
>>>>>>>>>> signal. Am I correct?
>>>>>>>>>>
>>>>>>>>>> Thanks,
>>>>>>>>>>
>>>>>>>>>> Senaka
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> <https://mailtrack.io/> Sent with Mailtrack
>>>>>>>>>> <https://mailtrack.io/install?source=signature&lang=en&referral=senakahks@gmail.com&idSignature=22>
>>>>>>>>>>
>>>>>>>>>> On Sat, Jul 8, 2017 at 7:49 PM, Alexandre Gramfort <
>>>>>>>>>> alexandre.gramfort at telecom-paristech.fr> wrote:
>>>>>>>>>>
>>>>>>>>>>> I don't see any problem. Make sure your data are in Volts not
>>>>>>>>>>> micro-Volts.
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>> Alex
>>>>>>>>>>>
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> Mne_analysis mailing list
>>>>>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> The 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 e-mail
>>>>>>>>>>> contains patient information, please contact the Partners
>>>>>>>>>>> Compliance HelpLine at
>>>>>>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> Mne_analysis mailing list
>>>>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> The 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 e-mail
>>>>>>>>>> contains patient information, please contact the Partners
>>>>>>>>>> Compliance HelpLine at
>>>>>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Mne_analysis mailing list
>>>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The 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 e-mail
>>>>>>>>> contains patient information, please contact the Partners
>>>>>>>>> Compliance HelpLine at
>>>>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Mne_analysis mailing list
>>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>>>
>>>>>>>>
>>>>>>>> The 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 e-mail
>>>>>>>> contains patient information, please contact the Partners
>>>>>>>> Compliance HelpLine at
>>>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mne_analysis mailing list
>>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>>
>>>>>>>
>>>>>>> The 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 e-mail
>>>>>>> contains patient information, please contact the Partners Compliance
>>>>>>> HelpLine at
>>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Senaka Amarakeerthi, PhD(Japan)
>>>>>> Senior Lecturer in Computer Science
>>>>>> Faculty of Technology
>>>>>> University of Sri Jayewardenepura
>>>>>> Nugegoda
>>>>>> Sri Lanka
>>>>>> email:   senaka at sjp.ac.lk
>>>>>> Mobile: +(94)-71-2043212 <+94%2071%20204%203212>
>>>>>> Office:  +(94)-11-2802969
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mne_analysis mailing list
>>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>>
>>>>>>
>>>>>> The 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 e-mail
>>>>>> contains patient information, please contact the Partners Compliance
>>>>>> HelpLine at
>>>>>> http://www.partners.org/complianceline . 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.
>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mne_analysis mailing list
>>>>> Mne_analysis at nmr.mgh.harvard.edu
>>>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>>>
>>>>>
>>>>> The 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
>>>>> e-mail
>>>>> contains patient information, please contact the Partners Compliance
>>>>> HelpLine at
>>>>> http://www.partners.org/complianceline . 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.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Senaka Amarakeerthi, PhD(Japan)
>>>> Senior Lecturer in Computer Science
>>>> Faculty of Technology
>>>> University of Sri Jayewardenepura
>>>> Nugegoda
>>>> Sri Lanka
>>>> email:   senaka at sjp.ac.lk
>>>> Mobile: +(94)-71-2043212 <071%20204%203212>
>>>> Office:  +(94)-11-2802969
>>>>
>>>
>>>
>>>
>>> --
>>> Senaka Amarakeerthi, PhD(Japan)
>>> Senior Lecturer in Computer Science
>>> Faculty of Technology
>>> University of Sri Jayewardenepura
>>> Nugegoda
>>> Sri Lanka
>>> email:   senaka at sjp.ac.lk
>>> Mobile: +(94)-71-2043212 <+94%2071%20204%203212>
>>> Office:  +(94)-11-2802969
>>>
>>> _______________________________________________
>>> Mne_analysis mailing list
>>> Mne_analysis at nmr.mgh.harvard.edu
>>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>>
>>>
>>> The 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
>>> e-mail
>>> contains patient information, please contact the Partners Compliance
>>> HelpLine at
>>> http://www.partners.org/complianceline . 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.
>>>
>>>
>>
>> _______________________________________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.edu
>> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>>
>>
>> The 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
>> e-mail
>> contains patient information, please contact the Partners Compliance
>> HelpLine at
>> http://www.partners.org/complianceline . 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.
>>
>>
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The 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
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . 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/20170712/fea63521/attachment-0001.html 


More information about the Mne_analysis mailing list