{"action":"created","issue":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/5455","repository_url":"https://api.github.com/repos/mne-tools/mne-python","labels_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5455/labels{/name}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5455/comments","events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5455/events","html_url":"https://github.com/mne-tools/mne-python/issues/5455","id":352045336,"node_id":"MDU6SXNzdWUzNTIwNDUzMzY=","number":5455,"title":"Make \"raw\" BrainVision events accessible","user":{"login":"cbrnr","id":4377312,"node_id":"MDQ6VXNlcjQzNzczMTI=","avatar_url":"https://avatars2.githubusercontent.com/u/4377312?v=4","gravatar_id":"","url":"https://api.github.com/users/cbrnr","html_url":"https://github.com/cbrnr","followers_url":"https://api.github.com/users/cbrnr/followers","following_url":"https://api.github.com/users/cbrnr/following{/other_user}","gists_url":"https://api.github.com/users/cbrnr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrnr/subscriptions","organizations_url":"https://api.github.com/users/cbrnr/orgs","repos_url":"https://api.github.com/users/cbrnr/repos","events_url":"https://api.github.com/users/cbrnr/events{/privacy}","received_events_url":"https://api.github.com/users/cbrnr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-20T09:05:01Z","updated_at":"2018-08-21T11:30:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently, markers stored in BrainVision files are first converted to a stim channel, which then needs to be parsed with `mne.find_events` to extract events. This is error-prone and does not work for arbitrary marker types. #5387 made this a little more generic, but I have markers that do not follow the `Cxxx` style (where `C` is a character and `xxx` is a number), which is typical for artifact annotations. Here are some example markers I have:\r\n\r\n```\r\nMk1=New Segment,,1,1,0,20110228132350000000\r\nMk2=Comment,Start Epoch,1,1,0\r\nMk3=Comment,DC mode,1,1,0\r\nMk4=Comment,CMS in range,1,1,0\r\nMk5=Comment,Imp. Check,1,1,0\r\nMk6=Bad Interval,Bad Min-Max,119,125,0\r\nMk7=Bad Interval,Bad Min-Max,531,144,0\r\nMk8=Bad Interval,Bad Min-Max,533,144,0\r\nMk9=Bad Interval,Bad Min-Max,534,141,0\r\nMk10=Bad Interval,Multiple,968,178,0\r\nMk11=Bad Interval,Bad Min-Max,968,129,0\r\nMk12=Bad Interval,Multiple,970,162,0\r\nMk13=Bad Interval,Multiple,970,162,0\r\nMk14=Bad Interval,Multiple,986,166,0\r\nMk15=Bad Interval,Bad Min-Max,989,163,0\r\nMk16=Bad Interval,Bad Min-Max,993,171,0\r\nMk17=Bad Interval,Bad Min-Max,996,151,0\r\nMk18=Bad Interval,Multiple,1318,138,0\r\nMk19=Stimulus,S 11,2599,1,0\r\nMk20=Stimulus,S120,3383,1,0\r\nMk21=Stimulus,S  2,4229,1,0\r\nMk22=Stimulus,S 11,4622,1,0\r\nMk23=Stimulus,S 90,5395,1,0\r\n```\r\n\r\nI think it would be great to have a method that returns the raw marker structure, similar to what is already available for EDF files (`raw.find_edf_events`). This method could either be called `raw.find_brainvision_events`, or we could add a generic `raw.find_raw_events` (better name suggestions welcome) method that works for arbitrary file types. Personally, I'd prefer the latter because then I don't have to remember which file type I originally loaded.\r\n\r\nOn a related note, I've tried to load files with this marker structure using a combination of the `trig_shift_by_type` and `event_id` arguments, but it turns out that some events get lost in the process. Maybe I did something wrong, but it seems like this should also be fixed (in a separate PR)."},"comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments/414642681","html_url":"https://github.com/mne-tools/mne-python/issues/5455#issuecomment-414642681","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/5455","id":414642681,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDY0MjY4MQ==","user":{"login":"cbrnr","id":4377312,"node_id":"MDQ6VXNlcjQzNzczMTI=","avatar_url":"https://avatars2.githubusercontent.com/u/4377312?v=4","gravatar_id":"","url":"https://api.github.com/users/cbrnr","html_url":"https://github.com/cbrnr","followers_url":"https://api.github.com/users/cbrnr/followers","following_url":"https://api.github.com/users/cbrnr/following{/other_user}","gists_url":"https://api.github.com/users/cbrnr/gists{/gist_id}","starred_url":"https://api.github.com/users/cbrnr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cbrnr/subscriptions","organizations_url":"https://api.github.com/users/cbrnr/orgs","repos_url":"https://api.github.com/users/cbrnr/repos","events_url":"https://api.github.com/users/cbrnr/events{/privacy}","received_events_url":"https://api.github.com/users/cbrnr/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T11:30:28Z","updated_at":"2018-08-21T11:30:28Z","author_association":"CONTRIBUTOR","body":"Let me know how I can help."}}
{"actor":{"display_login":"cbrnr"}}