{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/48457593","id":48457593,"diff_hunk":"@@ -445,3 +471,45 @@ def __init__(self, input_fname, events=None, event_id=None, tmin=0,\n             reject=reject, flat=flat, reject_tmin=reject_tmin,\n             reject_tmax=reject_tmax, add_eeg_ref=False, verbose=verbose)\n         logger.info('Ready.')\n+\n+\n+def _events_from_eeglab_raw(fname, event_id=dict()):\n+    \"\"\"Create events array from EEGLAB structure by looking them up in the\n+    event_id, trying to reduce them to their integer part otherwise, and\n+    entirely dropping them (with a warning) if this is impossible\"\"\"\n+    from scipy.io import loadmat\n+\n+    eeg = loadmat(fname, struct_as_record=False, squeeze_me=True)[\"EEG\"]","path":"mne/io/eeglab/eeglab.py","position":86,"original_position":86,"commit_id":"dffe44272d9ce5e0819f4998670df9d5f2b60011","original_commit_id":"dffe44272d9ce5e0819f4998670df9d5f2b60011","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"body":"Ah, because it used to be a standalone function.\r\nI'll pass `eeg` as the 1st argument instead.","created_at":"2015-12-27T19:30:14Z","updated_at":"2015-12-27T19:30:14Z","html_url":"https://github.com/mne-tools/mne-python/pull/2745#discussion_r48457593","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/48457593"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2745#discussion_r48457593"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745","id":54545628,"html_url":"https://github.com/mne-tools/mne-python/pull/2745","diff_url":"https://github.com/mne-tools/mne-python/pull/2745.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2745.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2745","number":2745,"state":"open","locked":false,"title":"[VWIP] Add EEGLAB raw event reader","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"body":"Start on a basic event reader for EEGLAB files.\r\nModelled partially after the Brainvision way of handling string events.\r\n\r\nNeeds everything a PR can need but for basic functionality.","created_at":"2015-12-24T11:27:31Z","updated_at":"2015-12-27T19:30:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51bd8559202976700ac0d68e5d88ee241e435540","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2745/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/dffe44272d9ce5e0819f4998670df9d5f2b60011","head":{"label":"jona-sassenhagen:patch-10","ref":"patch-10","sha":"dffe44272d9ce5e0819f4998670df9d5f2b60011","user":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"repo":{"id":26366770,"name":"mne-python","full_name":"jona-sassenhagen/mne-python","owner":{"login":"jona-sassenhagen","id":4321826,"avatar_url":"https://avatars.githubusercontent.com/u/4321826?v=3","gravatar_id":"","url":"https://api.github.com/users/jona-sassenhagen","html_url":"https://github.com/jona-sassenhagen","followers_url":"https://api.github.com/users/jona-sassenhagen/followers","following_url":"https://api.github.com/users/jona-sassenhagen/following{/other_user}","gists_url":"https://api.github.com/users/jona-sassenhagen/gists{/gist_id}","starred_url":"https://api.github.com/users/jona-sassenhagen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jona-sassenhagen/subscriptions","organizations_url":"https://api.github.com/users/jona-sassenhagen/orgs","repos_url":"https://api.github.com/users/jona-sassenhagen/repos","events_url":"https://api.github.com/users/jona-sassenhagen/events{/privacy}","received_events_url":"https://api.github.com/users/jona-sassenhagen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jona-sassenhagen/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/jona-sassenhagen/mne-python","forks_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/forks","keys_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/teams","hooks_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/hooks","issue_events_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/events","assignees_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/tags","blobs_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/languages","stargazers_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/stargazers","contributors_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/contributors","subscribers_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/subscribers","subscription_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/subscription","commits_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/merges","archive_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/downloads","issues_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/releases{/id}","created_at":"2014-11-08T16:37:16Z","updated_at":"2015-03-21T16:54:38Z","pushed_at":"2015-12-27T19:06:54Z","git_url":"git://github.com/jona-sassenhagen/mne-python.git","ssh_url":"git@github.com:jona-sassenhagen/mne-python.git","clone_url":"https://github.com/jona-sassenhagen/mne-python.git","svn_url":"https://github.com/jona-sassenhagen/mne-python","homepage":"http://martinos.org/mne/","size":80589,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"5272bf6f6aac8b7b63570e0f715f8a54c5589a08","user":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":1301584,"name":"mne-python","full_name":"mne-tools/mne-python","owner":{"login":"mne-tools","id":583875,"avatar_url":"https://avatars.githubusercontent.com/u/583875?v=3","gravatar_id":"","url":"https://api.github.com/users/mne-tools","html_url":"https://github.com/mne-tools","followers_url":"https://api.github.com/users/mne-tools/followers","following_url":"https://api.github.com/users/mne-tools/following{/other_user}","gists_url":"https://api.github.com/users/mne-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/mne-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mne-tools/subscriptions","organizations_url":"https://api.github.com/users/mne-tools/orgs","repos_url":"https://api.github.com/users/mne-tools/repos","events_url":"https://api.github.com/users/mne-tools/events{/privacy}","received_events_url":"https://api.github.com/users/mne-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mne-tools/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-python","forks_url":"https://api.github.com/repos/mne-tools/mne-python/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-python/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-python/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-python/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-python/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-python/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-python/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-python/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-python/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-python/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-python/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-python/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-python/releases{/id}","created_at":"2011-01-28T03:31:13Z","updated_at":"2015-12-26T22:35:49Z","pushed_at":"2015-12-27T19:06:55Z","git_url":"git://github.com/mne-tools/mne-python.git","ssh_url":"git@github.com:mne-tools/mne-python.git","clone_url":"https://github.com/mne-tools/mne-python.git","svn_url":"https://github.com/mne-tools/mne-python","homepage":"http://martinos.org/mne/","size":169337,"stargazers_count":169,"watchers_count":169,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":155,"mirror_url":null,"open_issues_count":157,"forks":155,"open_issues":157,"watchers":169,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2745"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2745"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2745/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2745/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/dffe44272d9ce5e0819f4998670df9d5f2b60011"}}}}