{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/44516184","id":44516184,"diff_hunk":"@@ -189,7 +196,10 @@ def find_ecg_events(raw, event_id=999, ch_name=None, tstart=0.0,\n     ecg_events = np.array([ecg_events + raw.first_samp,\n                            np.zeros(n_events, int),\n                            event_id * np.ones(n_events, int)]).T\n-    return ecg_events, idx_ecg, average_pulse\n+    out = (ecg_events, idx_ecg, average_pulse)\n+    if return_ecg:\n+        out += (ecg if created_ecg else None,)","path":"mne/preprocessing/ecg.py","position":49,"original_position":49,"commit_id":"6d245612ec5e59556fc1033f6bdafe38f9e44633","original_commit_id":"6915bdf5bdf7be917c583398ff18de2160d35d6d","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"body":"I would return the real ecg if return_ecg == True.","created_at":"2015-11-11T09:46:52Z","updated_at":"2015-11-11T09:46:52Z","html_url":"https://github.com/mne-tools/mne-python/pull/2607#discussion_r44516184","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/44516184"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2607#discussion_r44516184"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607","id":50343193,"html_url":"https://github.com/mne-tools/mne-python/pull/2607","diff_url":"https://github.com/mne-tools/mne-python/pull/2607.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2607.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2607","number":2607,"state":"open","locked":false,"title":"WIP: serialize labels for ICA, plot labels and fix ECG guessing (broken)","user":{"login":"dengemann","id":1908618,"avatar_url":"https://avatars.githubusercontent.com/u/1908618?v=3","gravatar_id":"","url":"https://api.github.com/users/dengemann","html_url":"https://github.com/dengemann","followers_url":"https://api.github.com/users/dengemann/followers","following_url":"https://api.github.com/users/dengemann/following{/other_user}","gists_url":"https://api.github.com/users/dengemann/gists{/gist_id}","starred_url":"https://api.github.com/users/dengemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dengemann/subscriptions","organizations_url":"https://api.github.com/users/dengemann/orgs","repos_url":"https://api.github.com/users/dengemann/repos","events_url":"https://api.github.com/users/dengemann/events{/privacy}","received_events_url":"https://api.github.com/users/dengemann/received_events","type":"User","site_admin":false},"body":"cc @Eric89GXL @agramfort @jona-sassenhagen \r\n\r\nwork in progress. ","created_at":"2015-11-11T03:07:46Z","updated_at":"2015-11-11T09:46:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1f2c2355b8a84cc83b845a4973f0615ea6ffcf6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607/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/2607/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/6d245612ec5e59556fc1033f6bdafe38f9e44633","head":{"label":"dengemann:save_ica_labels","ref":"save_ica_labels","sha":"6d245612ec5e59556fc1033f6bdafe38f9e44633","user":{"login":"dengemann","id":1908618,"avatar_url":"https://avatars.githubusercontent.com/u/1908618?v=3","gravatar_id":"","url":"https://api.github.com/users/dengemann","html_url":"https://github.com/dengemann","followers_url":"https://api.github.com/users/dengemann/followers","following_url":"https://api.github.com/users/dengemann/following{/other_user}","gists_url":"https://api.github.com/users/dengemann/gists{/gist_id}","starred_url":"https://api.github.com/users/dengemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dengemann/subscriptions","organizations_url":"https://api.github.com/users/dengemann/orgs","repos_url":"https://api.github.com/users/dengemann/repos","events_url":"https://api.github.com/users/dengemann/events{/privacy}","received_events_url":"https://api.github.com/users/dengemann/received_events","type":"User","site_admin":false},"repo":{"id":5578745,"name":"mne-python","full_name":"dengemann/mne-python","owner":{"login":"dengemann","id":1908618,"avatar_url":"https://avatars.githubusercontent.com/u/1908618?v=3","gravatar_id":"","url":"https://api.github.com/users/dengemann","html_url":"https://github.com/dengemann","followers_url":"https://api.github.com/users/dengemann/followers","following_url":"https://api.github.com/users/dengemann/following{/other_user}","gists_url":"https://api.github.com/users/dengemann/gists{/gist_id}","starred_url":"https://api.github.com/users/dengemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dengemann/subscriptions","organizations_url":"https://api.github.com/users/dengemann/orgs","repos_url":"https://api.github.com/users/dengemann/repos","events_url":"https://api.github.com/users/dengemann/events{/privacy}","received_events_url":"https://api.github.com/users/dengemann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dengemann/mne-python","description":"MNE scripting with Python","fork":true,"url":"https://api.github.com/repos/dengemann/mne-python","forks_url":"https://api.github.com/repos/dengemann/mne-python/forks","keys_url":"https://api.github.com/repos/dengemann/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dengemann/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dengemann/mne-python/teams","hooks_url":"https://api.github.com/repos/dengemann/mne-python/hooks","issue_events_url":"https://api.github.com/repos/dengemann/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/dengemann/mne-python/events","assignees_url":"https://api.github.com/repos/dengemann/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/dengemann/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/dengemann/mne-python/tags","blobs_url":"https://api.github.com/repos/dengemann/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dengemann/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dengemann/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/dengemann/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dengemann/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/dengemann/mne-python/languages","stargazers_url":"https://api.github.com/repos/dengemann/mne-python/stargazers","contributors_url":"https://api.github.com/repos/dengemann/mne-python/contributors","subscribers_url":"https://api.github.com/repos/dengemann/mne-python/subscribers","subscription_url":"https://api.github.com/repos/dengemann/mne-python/subscription","commits_url":"https://api.github.com/repos/dengemann/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/dengemann/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/dengemann/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/dengemann/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/dengemann/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/dengemann/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dengemann/mne-python/merges","archive_url":"https://api.github.com/repos/dengemann/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dengemann/mne-python/downloads","issues_url":"https://api.github.com/repos/dengemann/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/dengemann/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/dengemann/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/dengemann/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dengemann/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/dengemann/mne-python/releases{/id}","created_at":"2012-08-28T00:07:46Z","updated_at":"2014-09-16T13:18:12Z","pushed_at":"2015-11-11T09:38:20Z","git_url":"git://github.com/dengemann/mne-python.git","ssh_url":"git@github.com:dengemann/mne-python.git","clone_url":"https://github.com/dengemann/mne-python.git","svn_url":"https://github.com/dengemann/mne-python","homepage":"http://martinos.org/mne/","size":114445,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"411d6e848ffb7a3669db7bcab4a16c9059f938b0","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-11-10T23:43:19Z","pushed_at":"2015-11-11T09:38:21Z","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":184541,"stargazers_count":158,"watchers_count":158,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":148,"mirror_url":null,"open_issues_count":187,"forks":148,"open_issues":187,"watchers":158,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2607"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2607"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2607/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2607/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/2607/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/6d245612ec5e59556fc1033f6bdafe38f9e44633"}}}}