{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/307675094","pull_request_review_id":267099271,"id":307675094,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNzY3NTA5NA==","diff_hunk":"@@ -1881,6 +1882,23 @@ def _title_helper_pce(title, picked_types, picks, ch_names, combine):\n     return title\n \n \n+def _get_evokeds_from_epochs(instances, Epochs):\n+    \"\"\"Transform a dict of lists of Epochs into a dict of lists of Evokeds.\"\"\"\n+    if all(isinstance(content[0], Epochs) for content in instances.values()):\n+        print(instances)\n+        instances = {key: list(epochs[key].iter_evoked())\n+                     for key, epochs in instances.items()}\n+    elif all([all(isinstance(content, Epochs) for sublist in instances.values()\n+                  for content in sublist)]):\n+        instances = {key: [epochs[key].average() for epochs in epochs_list]\n+                     for key, epochs_list in instances.items()}","path":"mne/viz/evoked.py","position":21,"original_position":21,"commit_id":"241ea2794c13e3c1e3c239ddd80b6ca6ae14e1ff","original_commit_id":"241ea2794c13e3c1e3c239ddd80b6ca6ae14e1ff","user":{"login":"jona-sassenhagen","id":4321826,"node_id":"MDQ6VXNlcjQzMjE4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4321826?v=4","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":"I don't think that works - the averaging only happens when they're lists of evoked. If it's a single epoch, it's epochs.iter_evoked.","created_at":"2019-07-26T09:59:24Z","updated_at":"2019-07-26T09:59:25Z","html_url":"https://github.com/mne-tools/mne-python/pull/6604#discussion_r307675094","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/307675094"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/6604#discussion_r307675094"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604"}},"in_reply_to_id":307561905},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604","id":301330613,"node_id":"MDExOlB1bGxSZXF1ZXN0MzAxMzMwNjEz","html_url":"https://github.com/mne-tools/mne-python/pull/6604","diff_url":"https://github.com/mne-tools/mne-python/pull/6604.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/6604.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/6604","number":6604,"state":"open","locked":false,"title":"[WIP] epochs.plot_compare_evokeds","user":{"login":"jona-sassenhagen","id":4321826,"node_id":"MDQ6VXNlcjQzMjE4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4321826?v=4","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":"Redo of #5993\r\n\r\n```\r\nimport os.path as op\r\nimport mne\r\n\r\ndata_path = op.join(mne.datasets.sample.data_path(), 'MEG', 'sample')\r\nraw = mne.io.read_raw_fif(\r\n    op.join(data_path, 'sample_audvis_raw.fif'), preload=True)\r\nraw.filter(None, 30, fir_design='firwin')\r\nevent_id = {'auditory/left': 1, 'auditory/right': 2, 'visual/left': 3, 'visual/right': 4}\r\nevents = mne.read_events(op.join(data_path, 'sample_audvis_raw-eve.fif'))\r\nepochs = mne.Epochs(raw, events, event_id=event_id, tmin=-0.2, tmax=.5)\r\n\r\nepochs.plot_compare_evokeds(picks=4, ci=.68, split_legend=True,\r\n                            colors={\"left\": \"C0\", \"right\": \"C1\"},\r\n                            linestyles={\"auditory\": \"-\", \"visual\": \":\"});\r\n```\r\n\r\n\r\n![](https://user-images.githubusercontent.com/4321826/53446661-cd05a680-3a13-11e9-8b0c-9019202d4183.png)\r\n","created_at":"2019-07-25T22:20:19Z","updated_at":"2019-07-26T09:59:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c3194f6e0d49cb38c46e5f0071f6495b29a1ced1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604/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/6604/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/241ea2794c13e3c1e3c239ddd80b6ca6ae14e1ff","head":{"label":"jona-sassenhagen:plot_compare_epochs","ref":"plot_compare_epochs","sha":"241ea2794c13e3c1e3c239ddd80b6ca6ae14e1ff","user":{"login":"jona-sassenhagen","id":4321826,"node_id":"MDQ6VXNlcjQzMjE4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4321826?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNjM2Njc3MA==","name":"mne-python","full_name":"jona-sassenhagen/mne-python","private":false,"owner":{"login":"jona-sassenhagen","id":4321826,"node_id":"MDQ6VXNlcjQzMjE4MjY=","avatar_url":"https://avatars2.githubusercontent.com/u/4321826?v=4","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},"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}","deployments_url":"https://api.github.com/repos/jona-sassenhagen/mne-python/deployments","created_at":"2014-11-08T16:37:16Z","updated_at":"2015-03-21T16:54:38Z","pushed_at":"2019-07-25T22:19:10Z","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":113180,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"00806ca8b7e33f65a9782bfe8eb9b08b89c9ec70","user":{"login":"mne-tools","id":583875,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4Mzg3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/583875?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAxNTg0","name":"mne-python","full_name":"mne-tools/mne-python","private":false,"owner":{"login":"mne-tools","id":583875,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU4Mzg3NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/583875?v=4","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},"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}","deployments_url":"https://api.github.com/repos/mne-tools/mne-python/deployments","created_at":"2011-01-28T03:31:13Z","updated_at":"2019-07-26T05:53:04Z","pushed_at":"2019-07-26T06:04:30Z","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":112858,"stargazers_count":934,"watchers_count":934,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":599,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":295,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":599,"open_issues":295,"watchers":934,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/6604"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/6604"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/6604/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/6604/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/6604/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/241ea2794c13e3c1e3c239ddd80b6ca6ae14e1ff"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jona-sassenhagen"}}