[Mne_analysis] One event shorter than the shortest_event?

Maria Hakonen maria.hakonen at gmail.com
Wed Oct 17 08:02:16 EDT 2018
Search archives:

        External Email - Use Caution        

 Dear mne-experts,

I have read meg data into python as follows:

raw = mne.io.read_raw_bti(fname, config_fname='config',
rename_channels=False, head_shape_fname='hs_file',preload=True)

Then, I tried to read events:

events = mne.find_events(raw, 'TRIGGER')

However, I get an error:

Removing orphaned offset at the beginning of the file.
635 events found
Events id: [  34  100  102  104  106  110  112  114  120  200  202  204
206  208
  210  220  222 2048]
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-25-5520d6839034> in <module>()
----> 1 events = mne.find_events(raw, 'TRIGGER')

/share/apps2/anaconda/anaconda2/latest/lib/python2.7/site-packages/mne/event.pyc
in find_events(raw, stim_channel, output, consecutive, min_duration,
shortest_event, mask, uint_cast, mask_type, verbose)

/share/apps2/anaconda/anaconda2/latest/lib/python2.7/site-packages/mne/utils.pyc
in verbose(function, *args, **kwargs)
    726         with use_log_level(verbose_level):
    727             return function(*args, **kwargs)
--> 728     return function(*args, **kwargs)
    729
    730

/share/apps2/anaconda/anaconda2/latest/lib/python2.7/site-packages/mne/event.pyc
in find_events(raw, stim_channel, output, consecutive, min_duration,
shortest_event, mask, uint_cast, mask_type, verbose)
    690                              "e.g. x / raw.info['sfreq']. Where x =
1 sample "
    691                              "shorter than the shortest event "
--> 692                              "length." % (n_short_events))
    693
    694         events_list.append(events)

ValueError: You have 1 events shorter than the shortest_event. These are
very unusual and you may want to set min_duration to a larger value e.g. x
/ raw.info['sfreq']. Where x = 1 sample shorter than the shortest event
length.

Could someone please let me know what might cause an event to be shorter
than the shortest_event? How can I find durations of the events? I looked
raw.info['events'], but it is empty. I also managed to read the events from
another data file, but also in that data raw.info['events'] is empty.

Best,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20181017/24ac91d2/attachment.html 


More information about the Mne_analysis mailing list