{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/comments/74214812","id":74214812,"diff_hunk":"@@ -62,6 +62,42 @@ def apply_ica_hcp(raw, ica_mat, exclude):\n     raw._data /= 1e15\n \n \n+def apply_ref_meg_residual_fit(raw, decim_fit=100):\n+    \"\"\"Regress out MEG ref channels\n+\n+    Computes linear models from MEG reference channels\n+    on each sensors, predicts the MEG data and subtracts\n+    and computes the residual by subtracting the predictions.\n+    Note. Operates in place and can be memory demanding.\n+    To alleviate this problem the model can be fit on decimated\n+    data. This is permissive because the linear model does\n+    not have any representation of time, only the distributions\n+    matter.\n+\n+    Parameters\n+    ----------\n+    raw : instance of Raw\n+        The BTi/4D raw data.\n+    decim_fit : int\n+        The decimation factor used for fitting the model.\n+        Defaults to 100.\n+    \"\"\"\n+    from sklearn.linear_model import LinearRegression","path":"hcp/preprocessing.py","position":24,"original_position":24,"commit_id":"2950dbcd5a63d9b8a4c2550ab1eff8010de5970a","original_commit_id":"2950dbcd5a63d9b8a4c2550ab1eff8010de5970a","user":{"login":"jasmainak","id":15852194,"avatar_url":"https://avatars.githubusercontent.com/u/15852194?v=3","gravatar_id":"","url":"https://api.github.com/users/jasmainak","html_url":"https://github.com/jasmainak","followers_url":"https://api.github.com/users/jasmainak/followers","following_url":"https://api.github.com/users/jasmainak/following{/other_user}","gists_url":"https://api.github.com/users/jasmainak/gists{/gist_id}","starred_url":"https://api.github.com/users/jasmainak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasmainak/subscriptions","organizations_url":"https://api.github.com/users/jasmainak/orgs","repos_url":"https://api.github.com/users/jasmainak/repos","events_url":"https://api.github.com/users/jasmainak/events{/privacy}","received_events_url":"https://api.github.com/users/jasmainak/received_events","type":"User","site_admin":false},"body":"you would need to add `scikit-learn` as an optional dependency on the readme page","created_at":"2016-08-10T09:41:36Z","updated_at":"2016-08-10T09:41:36Z","html_url":"https://github.com/mne-tools/mne-hcp/pull/16#discussion_r74214812","pull_request_url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/comments/74214812"},"html":{"href":"https://github.com/mne-tools/mne-hcp/pull/16#discussion_r74214812"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16","id":80758388,"html_url":"https://github.com/mne-tools/mne-hcp/pull/16","diff_url":"https://github.com/mne-tools/mne-hcp/pull/16.diff","patch_url":"https://github.com/mne-tools/mne-hcp/pull/16.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-hcp/issues/16","number":16,"state":"open","locked":false,"title":"[WIP] Preproc opts","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":"Addresses most out of #15.\r\n\r\ncc @jasmainak FYI @jona-sassenhagen ","created_at":"2016-08-10T09:03:25Z","updated_at":"2016-08-10T09:41:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"22713bbb632d3df8649f13987d79ed138c0a4bbd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16/comments","review_comment_url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mne-tools/mne-hcp/issues/16/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-hcp/statuses/2950dbcd5a63d9b8a4c2550ab1eff8010de5970a","head":{"label":"dengemann:preproc_opts","ref":"preproc_opts","sha":"2950dbcd5a63d9b8a4c2550ab1eff8010de5970a","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":64224020,"name":"mne-hcp","full_name":"dengemann/mne-hcp","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-hcp","description":"MNE-HCP for processing the Human Connectome Project MEG data using MNE-Python","fork":true,"url":"https://api.github.com/repos/dengemann/mne-hcp","forks_url":"https://api.github.com/repos/dengemann/mne-hcp/forks","keys_url":"https://api.github.com/repos/dengemann/mne-hcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dengemann/mne-hcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dengemann/mne-hcp/teams","hooks_url":"https://api.github.com/repos/dengemann/mne-hcp/hooks","issue_events_url":"https://api.github.com/repos/dengemann/mne-hcp/issues/events{/number}","events_url":"https://api.github.com/repos/dengemann/mne-hcp/events","assignees_url":"https://api.github.com/repos/dengemann/mne-hcp/assignees{/user}","branches_url":"https://api.github.com/repos/dengemann/mne-hcp/branches{/branch}","tags_url":"https://api.github.com/repos/dengemann/mne-hcp/tags","blobs_url":"https://api.github.com/repos/dengemann/mne-hcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dengemann/mne-hcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dengemann/mne-hcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/dengemann/mne-hcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dengemann/mne-hcp/statuses/{sha}","languages_url":"https://api.github.com/repos/dengemann/mne-hcp/languages","stargazers_url":"https://api.github.com/repos/dengemann/mne-hcp/stargazers","contributors_url":"https://api.github.com/repos/dengemann/mne-hcp/contributors","subscribers_url":"https://api.github.com/repos/dengemann/mne-hcp/subscribers","subscription_url":"https://api.github.com/repos/dengemann/mne-hcp/subscription","commits_url":"https://api.github.com/repos/dengemann/mne-hcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/dengemann/mne-hcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/dengemann/mne-hcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/dengemann/mne-hcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/dengemann/mne-hcp/contents/{+path}","compare_url":"https://api.github.com/repos/dengemann/mne-hcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dengemann/mne-hcp/merges","archive_url":"https://api.github.com/repos/dengemann/mne-hcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dengemann/mne-hcp/downloads","issues_url":"https://api.github.com/repos/dengemann/mne-hcp/issues{/number}","pulls_url":"https://api.github.com/repos/dengemann/mne-hcp/pulls{/number}","milestones_url":"https://api.github.com/repos/dengemann/mne-hcp/milestones{/number}","notifications_url":"https://api.github.com/repos/dengemann/mne-hcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dengemann/mne-hcp/labels{/name}","releases_url":"https://api.github.com/repos/dengemann/mne-hcp/releases{/id}","deployments_url":"https://api.github.com/repos/dengemann/mne-hcp/deployments","created_at":"2016-07-26T13:37:19Z","updated_at":"2016-07-26T13:37:20Z","pushed_at":"2016-08-10T09:02:13Z","git_url":"git://github.com/dengemann/mne-hcp.git","ssh_url":"git@github.com:dengemann/mne-hcp.git","clone_url":"https://github.com/dengemann/mne-hcp.git","svn_url":"https://github.com/dengemann/mne-hcp","homepage":"","size":115,"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":"a7edfe94c69230b6e8af751be470acd6bb95ab0e","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":53261823,"name":"mne-hcp","full_name":"mne-tools/mne-hcp","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-hcp","description":"MNE-HCP for processing the Human Connectome Project MEG data using MNE-Python","fork":false,"url":"https://api.github.com/repos/mne-tools/mne-hcp","forks_url":"https://api.github.com/repos/mne-tools/mne-hcp/forks","keys_url":"https://api.github.com/repos/mne-tools/mne-hcp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mne-tools/mne-hcp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mne-tools/mne-hcp/teams","hooks_url":"https://api.github.com/repos/mne-tools/mne-hcp/hooks","issue_events_url":"https://api.github.com/repos/mne-tools/mne-hcp/issues/events{/number}","events_url":"https://api.github.com/repos/mne-tools/mne-hcp/events","assignees_url":"https://api.github.com/repos/mne-tools/mne-hcp/assignees{/user}","branches_url":"https://api.github.com/repos/mne-tools/mne-hcp/branches{/branch}","tags_url":"https://api.github.com/repos/mne-tools/mne-hcp/tags","blobs_url":"https://api.github.com/repos/mne-tools/mne-hcp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mne-tools/mne-hcp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mne-tools/mne-hcp/git/refs{/sha}","trees_url":"https://api.github.com/repos/mne-tools/mne-hcp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mne-tools/mne-hcp/statuses/{sha}","languages_url":"https://api.github.com/repos/mne-tools/mne-hcp/languages","stargazers_url":"https://api.github.com/repos/mne-tools/mne-hcp/stargazers","contributors_url":"https://api.github.com/repos/mne-tools/mne-hcp/contributors","subscribers_url":"https://api.github.com/repos/mne-tools/mne-hcp/subscribers","subscription_url":"https://api.github.com/repos/mne-tools/mne-hcp/subscription","commits_url":"https://api.github.com/repos/mne-tools/mne-hcp/commits{/sha}","git_commits_url":"https://api.github.com/repos/mne-tools/mne-hcp/git/commits{/sha}","comments_url":"https://api.github.com/repos/mne-tools/mne-hcp/comments{/number}","issue_comment_url":"https://api.github.com/repos/mne-tools/mne-hcp/issues/comments{/number}","contents_url":"https://api.github.com/repos/mne-tools/mne-hcp/contents/{+path}","compare_url":"https://api.github.com/repos/mne-tools/mne-hcp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mne-tools/mne-hcp/merges","archive_url":"https://api.github.com/repos/mne-tools/mne-hcp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mne-tools/mne-hcp/downloads","issues_url":"https://api.github.com/repos/mne-tools/mne-hcp/issues{/number}","pulls_url":"https://api.github.com/repos/mne-tools/mne-hcp/pulls{/number}","milestones_url":"https://api.github.com/repos/mne-tools/mne-hcp/milestones{/number}","notifications_url":"https://api.github.com/repos/mne-tools/mne-hcp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mne-tools/mne-hcp/labels{/name}","releases_url":"https://api.github.com/repos/mne-tools/mne-hcp/releases{/id}","deployments_url":"https://api.github.com/repos/mne-tools/mne-hcp/deployments","created_at":"2016-03-06T15:31:39Z","updated_at":"2016-07-26T21:43:06Z","pushed_at":"2016-08-10T09:03:25Z","git_url":"git://github.com/mne-tools/mne-hcp.git","ssh_url":"git@github.com:mne-tools/mne-hcp.git","clone_url":"https://github.com/mne-tools/mne-hcp.git","svn_url":"https://github.com/mne-tools/mne-hcp","homepage":"","size":119,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16"},"html":{"href":"https://github.com/mne-tools/mne-hcp/pull/16"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/issues/16"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-hcp/statuses/2950dbcd5a63d9b8a4c2550ab1eff8010de5970a"}}}}
{"actor":{"display_login":"jasmainak"}}