question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

events not listed in raw object, and unable to add_events, but can find_edf_events

See original GitHub issue

I have a raw edf data object, which appears to have no events:

In [1]: data = mne.io.read_raw_edf("data.edf",verbose=True,preload=True)
In [1]: data.info['events']
Out[1]: []

even if I try adding some:

In [2]: events = np.array([np.arange(0,100000,1000),np.zeros(100),[1]*100]).transpose()
In [2]: data.add_events(events)
In [2]: data.info['events']
Out[2]: []

However, the data has some events in the header:

In [3]: data.find_edf_events()
Out[3]:
[[35.558594, 2.621094, 'test block'],
 [182.128906, 0, 'Pause -  0:03:03'],
 [220.21875, 1.386719, 'test block 2'],
 [269.691406, 0, 'eyes closed#F1'],
 [284.878906, 0, 'eyes closed#F1'],
 [356.128906, 0, 'Pause -  0:05:57'],
 [365.691406, 0, 'blink22#F2'],
 [368.316406, 0, 'blink22#F2'],
 [371.191406, 0, 'blink22#F2'],
 [374.066406, 0, 'blink22#F2'],
 [376.253906, 0, 'blink22#F2'],
 [381.003906, 0, 'blink22#F2'],
 [384.128906, 0, 'blink22#F2'],
 [387.753906, 0, 'blink22#F2'],
 [391.378906, 0, 'blink22#F2'],
 [396.503906, 0, 'blink22#F2'],
 [400.941406, 0, 'blink22#F2'],
 [405.691406, 0, 'blink22#F2'],
 [415.253906, 0, 'blink22#F2'],
 [418.441406, 0, 'blink22#F2'],
 [421.066406, 0, 'blink22#F2'],
 [424.066406, 0, 'blink22#F2'],
 [427.003906, 0, 'blink22#F2'],
 [461.378906, 0, 'Pause -  0:07:42']]

Is this a bug? What’s going on?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
agramfortcommented, Jan 25, 2018

no idea either…

the edf IO should be simplified with Annotations. Cf comments from 2 weeks ago

0reactions
larsonercommented, Aug 21, 2019

Closing this as something we won’t fix as it could cause backward compat problems, and in our Info docs we now say “…In general this should not be used…”.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Working with events — MNE 1.3.dev0 documentation
The tutorial Parsing events from raw data describes in detail the different ways of obtaining an Events array from a Raw object (see...
Read more >
Microsoft Outlook error: trigger partner failure: Unable to ...
Trigger partner failure: Unable to retrieve the list of calendar events: The specified object was not found in the store.
Read more >
Help Center - Troubleshooting - AddEvent.com
This guide explains the various ways to troubleshoot your subscription calendar.Events from the subscription calendar are not showing on my Apple device ( ......
Read more >
Can't remove event listener for windows object - Stack Overflow
I have to sometimes load in content and add infinite scroll but also be able to remove that event again. This is the...
Read more >
Working with events - Jupyter Notebooks Gallery
Raw object, it will have fewer events than the events file loaded from disk (which contains events for the entire recording), but the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found