{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/90877687","pull_request_review_id":11391155,"id":90877687,"diff_hunk":"@@ -0,0 +1,135 @@\n+\"\"\"\n+=======================================================================\n+Compute MNE inverse solution on evoked data in a mixed source space\n+=======================================================================\n+\n+Create a mixed source space and compute MNE inverse solution on evoked dataset\n+\n+\"\"\"\n+# Author: Annalisa Pascarella <a.pascarella@iac.cnr.it>\n+#\n+# License: BSD (3-clause)\n+\n+import os.path as op\n+import matplotlib.pyplot as plt\n+import mne\n+\n+from mne.datasets import sample\n+from mne import write_source_spaces, setup_source_space\n+from mne import setup_volume_source_space\n+from mne import make_forward_solution\n+from mne.minimum_norm import make_inverse_operator, apply_inverse\n+\n+from nilearn import plotting\n+\n+# Set dir\n+data_path = sample.data_path()\n+subject = 'sample'\n+data_dir = op.join(data_path, 'MEG', subject)\n+subjects_dir = op.join(data_path, 'subjects')\n+bem_dir = op.join(subjects_dir, subject, 'bem')\n+\n+# Set file names\n+fname_mixed_src = op.join(bem_dir, '%s-oct-6-mixed-src.fif' % subject)\n+fname_aseg = op.join(subjects_dir, subject, 'mri', 'aseg.mgz')\n+\n+fname_model = op.join(bem_dir, '%s-5120-bem.fif' % subject)\n+fname_bem = op.join(bem_dir, '%s-5120-bem-sol.fif' % subject)\n+\n+fname_evoked = data_dir + '/sample_audvis-ave.fif'\n+fname_trans = data_dir + '/sample_audvis_raw-trans.fif'\n+fname_fwd = data_dir + '/sample_audvis-meg-oct-6-mixed-fwd.fif'\n+fname_cov = data_dir + '/sample_audvis-shrunk-cov.fif'\n+\n+# List of sub structures we are interested in. We select only the\n+# sub structures we want to include in the source space\n+labels_vol = ['Left-Amygdala',\n+              'Left-Thalamus-Proper',\n+              'Left-Cerebellum-Cortex',\n+              'Brain-Stem',\n+              'Right-Amygdala',\n+              'Right-Thalamus-Proper',\n+              'Right-Cerebellum-Cortex']\n+\n+# Setup a surface-based source space\n+src = setup_source_space(subject, subjects_dir=subjects_dir,\n+                         spacing='oct6', add_dist=False, overwrite=True)","path":"examples/inverse/plot_mixed_source_space_inverse.py","position":56,"original_position":56,"commit_id":"a14802559edf80a6e0d13c58c37b633a13f7e0fd","original_commit_id":"a14802559edf80a6e0d13c58c37b633a13f7e0fd","user":{"login":"annapasca","id":14320056,"avatar_url":"https://avatars.githubusercontent.com/u/14320056?v=3","gravatar_id":"","url":"https://api.github.com/users/annapasca","html_url":"https://github.com/annapasca","followers_url":"https://api.github.com/users/annapasca/followers","following_url":"https://api.github.com/users/annapasca/following{/other_user}","gists_url":"https://api.github.com/users/annapasca/gists{/gist_id}","starred_url":"https://api.github.com/users/annapasca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annapasca/subscriptions","organizations_url":"https://api.github.com/users/annapasca/orgs","repos_url":"https://api.github.com/users/annapasca/repos","events_url":"https://api.github.com/users/annapasca/events{/privacy}","received_events_url":"https://api.github.com/users/annapasca/received_events","type":"User","site_admin":false},"body":"ok!","created_at":"2016-12-05T14:46:41Z","updated_at":"2016-12-05T14:46:42Z","html_url":"https://github.com/mne-tools/mne-python/pull/3638#discussion_r90877687","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/90877687"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/3638#discussion_r90877687"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638","id":88010733,"html_url":"https://github.com/mne-tools/mne-python/pull/3638","diff_url":"https://github.com/mne-tools/mne-python/pull/3638.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/3638.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/3638","number":3638,"state":"open","locked":false,"title":"[MRG+1] new functions to hangle mixed src spaces in inverse","user":{"login":"annapasca","id":14320056,"avatar_url":"https://avatars.githubusercontent.com/u/14320056?v=3","gravatar_id":"","url":"https://api.github.com/users/annapasca","html_url":"https://github.com/annapasca","followers_url":"https://api.github.com/users/annapasca/followers","following_url":"https://api.github.com/users/annapasca/following{/other_user}","gists_url":"https://api.github.com/users/annapasca/gists{/gist_id}","starred_url":"https://api.github.com/users/annapasca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annapasca/subscriptions","organizations_url":"https://api.github.com/users/annapasca/orgs","repos_url":"https://api.github.com/users/annapasca/repos","events_url":"https://api.github.com/users/annapasca/events{/privacy}","received_events_url":"https://api.github.com/users/annapasca/received_events","type":"User","site_admin":false},"body":"these functions are used in neuropype to handle mixed source space in mne inverse methods\n","created_at":"2016-10-05T03:26:02Z","updated_at":"2016-12-05T14:46:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4e21365ea0b6474d8e3b4679cbcbf69f528f087","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638/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/3638/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/a14802559edf80a6e0d13c58c37b633a13f7e0fd","head":{"label":"annapasca:mixed_src_inv","ref":"mixed_src_inv","sha":"a14802559edf80a6e0d13c58c37b633a13f7e0fd","user":{"login":"annapasca","id":14320056,"avatar_url":"https://avatars.githubusercontent.com/u/14320056?v=3","gravatar_id":"","url":"https://api.github.com/users/annapasca","html_url":"https://github.com/annapasca","followers_url":"https://api.github.com/users/annapasca/followers","following_url":"https://api.github.com/users/annapasca/following{/other_user}","gists_url":"https://api.github.com/users/annapasca/gists{/gist_id}","starred_url":"https://api.github.com/users/annapasca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annapasca/subscriptions","organizations_url":"https://api.github.com/users/annapasca/orgs","repos_url":"https://api.github.com/users/annapasca/repos","events_url":"https://api.github.com/users/annapasca/events{/privacy}","received_events_url":"https://api.github.com/users/annapasca/received_events","type":"User","site_admin":false},"repo":{"id":68126690,"name":"mne-python","full_name":"annapasca/mne-python","owner":{"login":"annapasca","id":14320056,"avatar_url":"https://avatars.githubusercontent.com/u/14320056?v=3","gravatar_id":"","url":"https://api.github.com/users/annapasca","html_url":"https://github.com/annapasca","followers_url":"https://api.github.com/users/annapasca/followers","following_url":"https://api.github.com/users/annapasca/following{/other_user}","gists_url":"https://api.github.com/users/annapasca/gists{/gist_id}","starred_url":"https://api.github.com/users/annapasca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annapasca/subscriptions","organizations_url":"https://api.github.com/users/annapasca/orgs","repos_url":"https://api.github.com/users/annapasca/repos","events_url":"https://api.github.com/users/annapasca/events{/privacy}","received_events_url":"https://api.github.com/users/annapasca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/annapasca/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/annapasca/mne-python","forks_url":"https://api.github.com/repos/annapasca/mne-python/forks","keys_url":"https://api.github.com/repos/annapasca/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annapasca/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annapasca/mne-python/teams","hooks_url":"https://api.github.com/repos/annapasca/mne-python/hooks","issue_events_url":"https://api.github.com/repos/annapasca/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/annapasca/mne-python/events","assignees_url":"https://api.github.com/repos/annapasca/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/annapasca/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/annapasca/mne-python/tags","blobs_url":"https://api.github.com/repos/annapasca/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annapasca/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annapasca/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/annapasca/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annapasca/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/annapasca/mne-python/languages","stargazers_url":"https://api.github.com/repos/annapasca/mne-python/stargazers","contributors_url":"https://api.github.com/repos/annapasca/mne-python/contributors","subscribers_url":"https://api.github.com/repos/annapasca/mne-python/subscribers","subscription_url":"https://api.github.com/repos/annapasca/mne-python/subscription","commits_url":"https://api.github.com/repos/annapasca/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/annapasca/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/annapasca/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/annapasca/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/annapasca/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/annapasca/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annapasca/mne-python/merges","archive_url":"https://api.github.com/repos/annapasca/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annapasca/mne-python/downloads","issues_url":"https://api.github.com/repos/annapasca/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/annapasca/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/annapasca/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/annapasca/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annapasca/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/annapasca/mne-python/releases{/id}","deployments_url":"https://api.github.com/repos/annapasca/mne-python/deployments","created_at":"2016-09-13T16:33:34Z","updated_at":"2016-09-13T16:33:38Z","pushed_at":"2016-11-30T03:12:11Z","git_url":"git://github.com/annapasca/mne-python.git","ssh_url":"git@github.com:annapasca/mne-python.git","clone_url":"https://github.com/annapasca/mne-python.git","svn_url":"https://github.com/annapasca/mne-python","homepage":"http://martinos.org/mne/","size":90331,"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":"e2f79af9ad9d97a417aab8633161d10652fa158f","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}","deployments_url":"https://api.github.com/repos/mne-tools/mne-python/deployments","created_at":"2011-01-28T03:31:13Z","updated_at":"2016-12-04T09:58:10Z","pushed_at":"2016-12-05T14:33:10Z","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":184018,"stargazers_count":247,"watchers_count":247,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":226,"mirror_url":null,"open_issues_count":219,"forks":226,"open_issues":219,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/3638"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/3638"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/3638/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/3638/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/3638/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/a14802559edf80a6e0d13c58c37b633a13f7e0fd"}}}}
{"actor":{"display_login":"annapasca"}}