[Mne_analysis] EOG Artifact markers

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

Hello,

I am using the EOG artifact example
script<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:

import numpy as np
import pylab as pl
import mne
from mne import fiff
from mne.datasets import sample
data_path = sample.data_path('..')

################################################################################
Set parametersraw_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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20121127/eaf7ae70/attachment.html 


More information about the Mne_analysis mailing list