{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/35814354","id":35814354,"diff_hunk":"@@ -128,11 +140,21 @@ def test_maxwell_filter_additional():\n     raw_sss.save(test_outname)\n     raw_sss_loaded = Raw(test_outname, preload=True, proj=False,\n                          allow_maxshield=True)\n+\n     # Some numerical imprecision since save uses 'single' fmt\n     assert_allclose(raw_sss_loaded._data[:, :], raw_sss._data[:, :],\n                     rtol=1e-6, atol=1e-20)\n \n-    # Test covariance calculation XXX add this\n+    # Test rank of covariance matrices for raw and SSS processed data\n+    cov_raw = compute_raw_data_covariance(raw)\n+    cov_sss = compute_raw_data_covariance(raw_sss)\n+\n+    scalings = None\n+    cov_raw_rank = _estimate_rank_meeg_cov(cov_raw['data'], raw.info, scalings)\n+    cov_sss_rank = _estimate_rank_meeg_cov(cov_sss['data'], raw_sss.info,\n+                                           scalings)\n \n+    assert_equal(cov_raw_rank, raw.info['nchan'])\n+    assert_equal(cov_sss_rank, maxwell.get_num_moments(int_order, 0))","path":"mne/preprocessing/tests/test_maxwell.py","position":65,"original_position":65,"commit_id":"b0cbb4130a29b689954749af51a14e2bb38a59be","original_commit_id":"b0cbb4130a29b689954749af51a14e2bb38a59be","user":{"login":"wronk","id":5296721,"avatar_url":"https://avatars.githubusercontent.com/u/5296721?v=3","gravatar_id":"","url":"https://api.github.com/users/wronk","html_url":"https://github.com/wronk","followers_url":"https://api.github.com/users/wronk/followers","following_url":"https://api.github.com/users/wronk/following{/other_user}","gists_url":"https://api.github.com/users/wronk/gists{/gist_id}","starred_url":"https://api.github.com/users/wronk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wronk/subscriptions","organizations_url":"https://api.github.com/users/wronk/orgs","repos_url":"https://api.github.com/users/wronk/repos","events_url":"https://api.github.com/users/wronk/events{/privacy}","received_events_url":"https://api.github.com/users/wronk/received_events","type":"User","site_admin":false},"body":"@dengemann, @Eric89GXL, does this look correct? For raw and SSS processed data, I'm checking that the covariance rank equals the number of channels and the order of the internal multipolar moment space, respectively.","created_at":"2015-07-29T21:28:34Z","updated_at":"2015-07-29T21:28:34Z","html_url":"https://github.com/mne-tools/mne-python/pull/2355#discussion_r35814354","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/35814354"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2355#discussion_r35814354"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355"}}},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355","id":41017564,"html_url":"https://github.com/mne-tools/mne-python/pull/2355","diff_url":"https://github.com/mne-tools/mne-python/pull/2355.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/2355.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/2355","number":2355,"state":"open","locked":false,"title":"[WIP] Maxwell Filter cleanup","user":{"login":"wronk","id":5296721,"avatar_url":"https://avatars.githubusercontent.com/u/5296721?v=3","gravatar_id":"","url":"https://api.github.com/users/wronk","html_url":"https://github.com/wronk","followers_url":"https://api.github.com/users/wronk/followers","following_url":"https://api.github.com/users/wronk/following{/other_user}","gists_url":"https://api.github.com/users/wronk/gists{/gist_id}","starred_url":"https://api.github.com/users/wronk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wronk/subscriptions","organizations_url":"https://api.github.com/users/wronk/orgs","repos_url":"https://api.github.com/users/wronk/repos","events_url":"https://api.github.com/users/wronk/events{/privacy}","received_events_url":"https://api.github.com/users/wronk/received_events","type":"User","site_admin":false},"body":"Per issue #2277 \r\n\r\n* [x] Add warning that processing non-Elekta data is experimental\r\n* [x] Throw error if coil compensation is present\r\n* [x] Check that raw files play nice with covariance calculations after Maxwell filtering.\r\n* [x] Add a check that head_dev_t (head to device transformation matrix) is defined within the raw.info\r\n* [x] Refactor forward code used so code isn't repeated (maxwell._make_coils function)\r\n* [x] Track down all the bookkeeping Elekta's Maxfilter adds and update maxwell._update_info\r\n","created_at":"2015-07-28T14:28:13Z","updated_at":"2015-07-29T21:28:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dc2b94ef2e89fe98fa49a38115e002477eb67886","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355/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/2355/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/b0cbb4130a29b689954749af51a14e2bb38a59be","head":{"label":"wronk:sss_maxwell","ref":"sss_maxwell","sha":"b0cbb4130a29b689954749af51a14e2bb38a59be","user":{"login":"wronk","id":5296721,"avatar_url":"https://avatars.githubusercontent.com/u/5296721?v=3","gravatar_id":"","url":"https://api.github.com/users/wronk","html_url":"https://github.com/wronk","followers_url":"https://api.github.com/users/wronk/followers","following_url":"https://api.github.com/users/wronk/following{/other_user}","gists_url":"https://api.github.com/users/wronk/gists{/gist_id}","starred_url":"https://api.github.com/users/wronk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wronk/subscriptions","organizations_url":"https://api.github.com/users/wronk/orgs","repos_url":"https://api.github.com/users/wronk/repos","events_url":"https://api.github.com/users/wronk/events{/privacy}","received_events_url":"https://api.github.com/users/wronk/received_events","type":"User","site_admin":false},"repo":{"id":12385398,"name":"mne-python","full_name":"wronk/mne-python","owner":{"login":"wronk","id":5296721,"avatar_url":"https://avatars.githubusercontent.com/u/5296721?v=3","gravatar_id":"","url":"https://api.github.com/users/wronk","html_url":"https://github.com/wronk","followers_url":"https://api.github.com/users/wronk/followers","following_url":"https://api.github.com/users/wronk/following{/other_user}","gists_url":"https://api.github.com/users/wronk/gists{/gist_id}","starred_url":"https://api.github.com/users/wronk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wronk/subscriptions","organizations_url":"https://api.github.com/users/wronk/orgs","repos_url":"https://api.github.com/users/wronk/repos","events_url":"https://api.github.com/users/wronk/events{/privacy}","received_events_url":"https://api.github.com/users/wronk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wronk/mne-python","description":"MNE : Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python","fork":true,"url":"https://api.github.com/repos/wronk/mne-python","forks_url":"https://api.github.com/repos/wronk/mne-python/forks","keys_url":"https://api.github.com/repos/wronk/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wronk/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wronk/mne-python/teams","hooks_url":"https://api.github.com/repos/wronk/mne-python/hooks","issue_events_url":"https://api.github.com/repos/wronk/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/wronk/mne-python/events","assignees_url":"https://api.github.com/repos/wronk/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/wronk/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/wronk/mne-python/tags","blobs_url":"https://api.github.com/repos/wronk/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wronk/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wronk/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/wronk/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wronk/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/wronk/mne-python/languages","stargazers_url":"https://api.github.com/repos/wronk/mne-python/stargazers","contributors_url":"https://api.github.com/repos/wronk/mne-python/contributors","subscribers_url":"https://api.github.com/repos/wronk/mne-python/subscribers","subscription_url":"https://api.github.com/repos/wronk/mne-python/subscription","commits_url":"https://api.github.com/repos/wronk/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/wronk/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/wronk/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/wronk/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/wronk/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/wronk/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wronk/mne-python/merges","archive_url":"https://api.github.com/repos/wronk/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wronk/mne-python/downloads","issues_url":"https://api.github.com/repos/wronk/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/wronk/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/wronk/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/wronk/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wronk/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/wronk/mne-python/releases{/id}","created_at":"2013-08-26T17:36:28Z","updated_at":"2015-05-07T21:22:18Z","pushed_at":"2015-07-29T21:11:52Z","git_url":"git://github.com/wronk/mne-python.git","ssh_url":"git@github.com:wronk/mne-python.git","clone_url":"https://github.com/wronk/mne-python.git","svn_url":"https://github.com/wronk/mne-python","homepage":"http://martinos.org/mne/","size":80536,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"31d45737cc219a7d9a9e7127f84740811c5d73bf","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-07-22T18:59:16Z","pushed_at":"2015-07-29T21:11:52Z","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":180977,"stargazers_count":139,"watchers_count":139,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":135,"mirror_url":null,"open_issues_count":194,"forks":135,"open_issues":194,"watchers":139,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/2355"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2355"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/2355/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/2355/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/2355/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/b0cbb4130a29b689954749af51a14e2bb38a59be"}}}}