[Mne_analysis] EOG Artifact markers

Vincent cloud.ctl at gmail.com
Tue Nov 27 22:13:37 EST 2012
Search archives:

Hi Martin,

Thank you for the help. mne.write_events is just what I was looking for. As
for the second part of my question, I am running matplotlib 1.1.1. Should I
upgrade to the development version?

::vincent



On Tue, Nov 27, 2012 at 6:22 PM, Martin Luessi
<mluessi at nmr.mgh.harvard.edu>wrote:

> Hi Vincent,
>
> You can save the events using mne.write_events and later load them again
> using mne.read_events
>
> The error your are getting is strange, I can't see anything wrong, as all
> you changed is the file name. What matplotlib (pylab) version are you using?
>
> Best,
>
> Martin
>
> On 11/27/12 19:57, Vincent wrote:
>
>> Hello,
>>
>> I am using theEOG artifact example script
>> <http://martinos.org/mne/auto_**examples/preprocessing/plot_**
>> find_eog_artifacts.html<http://martinos.org/mne/auto_examples/preprocessing/plot_find_eog_artifacts.html>>
>> but
>>
>> having a little trouble with the output. First, am I right in assuming
>> that the "mne.artifacts.find_eog_**events(raw, event_id)" section adds
>> markers to the input fif file? If not, what is the best way to save
>> them? Second, I've modified only the part of the script that specifies
>> the input file, yet the script finishes with errors:
>>
>> Traceback (most recent call last):
>>    File "plot_find_eog_artifacts.py", line 39, in <module>
>>      pl.plot(1e3 * epochs.times, np.squeeze(data).T)
>>    File "/usr/lib/pymodules/python2.7/**matplotlib/pyplot.py", line 2467,
>> in plot
>>      ret = ax.plot(*args, **kwargs)
>>    File "/usr/lib/pymodules/python2.7/**matplotlib/axes.py", line 3893,
>> in
>> plot
>>      for line in self._get_lines(*args, **kwargs):
>>    File "/usr/lib/pymodules/python2.7/**matplotlib/axes.py", line 322, in
>> _grab_next_args
>>      for seg in self._plot_args(remaining, kwargs):
>>    File "/usr/lib/pymodules/python2.7/**matplotlib/axes.py", line 300, in
>> _plot_args
>>      x, y = self._xy_from_xy(x, y)
>>    File "/usr/lib/pymodules/python2.7/**matplotlib/axes.py", line 242, in
>> _xy_from_xy
>>      raise ValueError("x and y can be no greater than 2-D")
>> ValueError: x and y can be
>>
>> The actual locating of the EOG artifacts seems to process okay (it finds
>> 28 artifacts in this case and the output to screen looks like that in
>> the example on the website), instead it's just the plotting with
>> matplotlib at the end that fails. Any ideas why?
>>
>>
>> About the section of the script I modified. I didn't do too much, just
>> changed anything that specified the input file. I changed from this:
>>
>> importnumpyasnp
>> importpylabaspl
>> importmne
>> frommneimportfiff
>> frommne.datasetsimportsample
>> data_path=sample.data_path('..**')
>>
>>
>> ##############################**##############################**
>> ###################
>> # Set parameters
>> raw_fname  =  data_path  +  '/MEG/sample/sample_audvis_**
>> filt-0-40_raw.fif'
>>
>> to look like this:
>>
>> import numpy as np
>> import pylab as pl
>> import mne
>> from mne import fiff
>>
>> ##############################**##############################**
>> ###################
>> # Set parameters
>> raw_fname = '/home/vrupp/Desktop/YA/**restMEG/YA001/YA001_rest_raw_**
>> sss.fif'
>>
>> but otherwise I have left it as is.
>>
>> Thank you in advance for any help offered.
>>
>> ::vincent
>>
>>
>>
>> ______________________________**_________________
>> Mne_analysis mailing list
>> Mne_analysis at nmr.mgh.harvard.**edu <Mne_analysis at nmr.mgh.harvard.edu>
>> https://mail.nmr.mgh.harvard.**edu/mailman/listinfo/mne_**analysis<https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis>
>>
>>
>
> --
> Martin Luessi, Ph.D.
>
> Research Fellow
>
> Department of Radiology
> Athinoula A. Martinos Center for Biomedical Imaging
> Massachusetts General Hospital
> Harvard Medical School
> 149 13th Street
> Charlestown, MA 02129
>
> Fax: +1 617 726-7422
>
>
> 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<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/20121127/25288de4/attachment.html 


More information about the Mne_analysis mailing list