{"action":"created","comment":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/173288295","pull_request_review_id":102455345,"id":173288295,"diff_hunk":"@@ -41,20 +41,27 @@ def _m_fmt(x):\n                                    evaluate=float,\n                                    format_func=lambda x: '%0.1f' % x)\n \n-_BUTTON_WIDTH = -75\n-_RAD_WIDTH = -70  # radian floats\n+_BUTTON_WIDTH = -70\n+_OMIT_BUTTON_WIDTH = -100\n+_RAD_WIDTH = -65  # radian floats\n _M_WIDTH = _RAD_WIDTH  # m floats\n-_MM_WIDTH = _RAD_WIDTH  # mm floats\n-_INC_BUTTON_WIDTH = -30  # inc/dec buttons\n+_MM_WIDTH = -50  # mm floats\n+_INC_BUTTON_WIDTH = -25  # inc/dec buttons\n _SCALE_WIDTH = -50  # scale floats\n _WEIGHT_WIDTH = -40  # weight floats\n _RAD_STEP_WIDTH = -50\n+_VIEW_BUTTON_WIDTH = -50\n _M_STEP_WIDTH = _RAD_STEP_WIDTH\n-# width is optimized for macOS and Linux avoid a horizontal scroll-bar;\n-# might benefit from platform-specific values\n-_COREG_WIDTH = -300\n-_TEXT_WIDTH = -240\n+# width is optimized for macOS and Linux avoid a horizontal scroll-bar\n+# even when a vertical one is present\n+_COREG_WIDTH = -280\n+_TEXT_WIDTH = -250\n+_REDUCED_TEXT_WIDTH = _TEXT_WIDTH - 40 * np.sign(_TEXT_WIDTH)","path":"mne/gui/_viewer.py","position":57,"original_position":42,"commit_id":"3cee6eccd61a06965193825057e069e168c44851","original_commit_id":"926002d19201251590f43d9c10c0a5a8bdec5ea3","user":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"body":"> Vertical bar still present on my macOS.\r\n\r\nWhich vertical bar? You mean the scroll bar? Yes it might be present on left, right, or both, depending on your layout. I'll tweak the button size, though.","created_at":"2018-03-08T20:57:31Z","updated_at":"2018-03-08T20:57:31Z","html_url":"https://github.com/mne-tools/mne-python/pull/4971#discussion_r173288295","pull_request_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/comments/173288295"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/4971#discussion_r173288295"},"pull_request":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971"}},"in_reply_to_id":173287838},"pull_request":{"url":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971","id":171495364,"html_url":"https://github.com/mne-tools/mne-python/pull/4971","diff_url":"https://github.com/mne-tools/mne-python/pull/4971.diff","patch_url":"https://github.com/mne-tools/mne-python/pull/4971.patch","issue_url":"https://api.github.com/repos/mne-tools/mne-python/issues/4971","number":4971,"state":"open","locked":false,"title":"MRG: Refactor coreg transformations and fits","user":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"body":"~~This PR builds on #4966 so that must be merged first.~~\r\n\r\nThis PR:\r\n\r\n1. Refactors the transforms to ~~only ever transform the MRI points.~~ be done in the `_coreg_gui` module instead of the `_viewer.py` module / visuals.\r\n2. Speeds plotting / interaction substantially by making transform parameters in a list that can be updated at once (previously, updating 3 rot + 3 trans params caused 6 plot updates, now it causes 1)\r\n3. Refactors the transforms to respect Neuromag head coordinates (rather than being naison-centric)\r\n4. Adds weighting factors for nasion/LPA/RPA/EEG/HPI. For example, setting the nasion factor to 100 weights the nasion 100x more than any dig point (i.e., pretty much fixes it in place)\r\n5. Changes the fitting method from `fit_point_cloud`-based (which uses `nearest` calculations on every objective function evaluation) to iterative-closest-point (ICP; computes nearest neighbors and does the fit using those matched pairs). This should replicate what people are presumably more accustomed to from `mne_analyze` and in the MEG literature. It is fairly quick, so pressing it multiple times to see/watch fit convergence isn't bad and also has some pedagogical value I think.\r\n6. Adds coordinate frame axes to the display\r\n7. Make display more compact\r\n8. Save and restore scene scale factor and size\r\n9. Adds status bar to monitor changes / convergence\r\n\r\nAlso:\r\n- [x] removes `Save trans` button that was errantly added\r\n- [x] does not require MRI fiducials for transforms to take effect\r\n- [x] allows weights for EEG electrodes and HPI coils (default to zero)\r\n- [x] adds \"reset\" buttons for scaling and trans\r\n- [x] changes \"Save subject as...\" to \"Save as...\" for more generic term\r\n- [x] allow setting view coordinate frame to head- or MRI-based\r\n- [x] fix bug with point orientation updates\r\n- [x] fix bug where excluding outliers (exclude 10mm, then exclude 5 mm) causes an error\r\n- [x] fix OSX HiDPI size saving\r\n- [x] make `SCENE_SCALE` persist\r\n- [x] save scene size\r\n- [x] fix bug with saving old source spaces (negative distance)\r\n- [x] fix layout on OSX (make left panel scrollable)\r\n- [x] fix switching terrain->arcball\r\n","created_at":"2018-02-26T21:22:39Z","updated_at":"2018-03-08T20:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3635dfa244c8a95a3fc3228fe5ec030d3565915","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/mne-tools/mne-python/milestones/12","html_url":"https://github.com/mne-tools/mne-python/milestone/12","labels_url":"https://api.github.com/repos/mne-tools/mne-python/milestones/12/labels","id":2716744,"number":12,"title":"0.16","description":"","creator":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":24,"state":"open","created_at":"2017-08-22T19:08:45Z","updated_at":"2018-03-08T03:34:41Z","due_on":"2018-02-01T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971/commits","review_comments_url":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971/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/4971/comments","statuses_url":"https://api.github.com/repos/mne-tools/mne-python/statuses/3cee6eccd61a06965193825057e069e168c44851","head":{"label":"larsoner:coreg2","ref":"coreg2","sha":"3cee6eccd61a06965193825057e069e168c44851","user":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"repo":{"id":5848067,"name":"mne-python","full_name":"larsoner/mne-python","owner":{"login":"larsoner","id":2365790,"avatar_url":"https://avatars1.githubusercontent.com/u/2365790?v=4","gravatar_id":"","url":"https://api.github.com/users/larsoner","html_url":"https://github.com/larsoner","followers_url":"https://api.github.com/users/larsoner/followers","following_url":"https://api.github.com/users/larsoner/following{/other_user}","gists_url":"https://api.github.com/users/larsoner/gists{/gist_id}","starred_url":"https://api.github.com/users/larsoner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsoner/subscriptions","organizations_url":"https://api.github.com/users/larsoner/orgs","repos_url":"https://api.github.com/users/larsoner/repos","events_url":"https://api.github.com/users/larsoner/events{/privacy}","received_events_url":"https://api.github.com/users/larsoner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larsoner/mne-python","description":"MNE scripting with Python","fork":true,"url":"https://api.github.com/repos/larsoner/mne-python","forks_url":"https://api.github.com/repos/larsoner/mne-python/forks","keys_url":"https://api.github.com/repos/larsoner/mne-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larsoner/mne-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larsoner/mne-python/teams","hooks_url":"https://api.github.com/repos/larsoner/mne-python/hooks","issue_events_url":"https://api.github.com/repos/larsoner/mne-python/issues/events{/number}","events_url":"https://api.github.com/repos/larsoner/mne-python/events","assignees_url":"https://api.github.com/repos/larsoner/mne-python/assignees{/user}","branches_url":"https://api.github.com/repos/larsoner/mne-python/branches{/branch}","tags_url":"https://api.github.com/repos/larsoner/mne-python/tags","blobs_url":"https://api.github.com/repos/larsoner/mne-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larsoner/mne-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larsoner/mne-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/larsoner/mne-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larsoner/mne-python/statuses/{sha}","languages_url":"https://api.github.com/repos/larsoner/mne-python/languages","stargazers_url":"https://api.github.com/repos/larsoner/mne-python/stargazers","contributors_url":"https://api.github.com/repos/larsoner/mne-python/contributors","subscribers_url":"https://api.github.com/repos/larsoner/mne-python/subscribers","subscription_url":"https://api.github.com/repos/larsoner/mne-python/subscription","commits_url":"https://api.github.com/repos/larsoner/mne-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/larsoner/mne-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/larsoner/mne-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/larsoner/mne-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/larsoner/mne-python/contents/{+path}","compare_url":"https://api.github.com/repos/larsoner/mne-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larsoner/mne-python/merges","archive_url":"https://api.github.com/repos/larsoner/mne-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larsoner/mne-python/downloads","issues_url":"https://api.github.com/repos/larsoner/mne-python/issues{/number}","pulls_url":"https://api.github.com/repos/larsoner/mne-python/pulls{/number}","milestones_url":"https://api.github.com/repos/larsoner/mne-python/milestones{/number}","notifications_url":"https://api.github.com/repos/larsoner/mne-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larsoner/mne-python/labels{/name}","releases_url":"https://api.github.com/repos/larsoner/mne-python/releases{/id}","deployments_url":"https://api.github.com/repos/larsoner/mne-python/deployments","created_at":"2012-09-17T22:08:11Z","updated_at":"2015-05-07T15:05:01Z","pushed_at":"2018-03-08T20:24:09Z","git_url":"git://github.com/larsoner/mne-python.git","ssh_url":"git@github.com:larsoner/mne-python.git","clone_url":"https://github.com/larsoner/mne-python.git","svn_url":"https://github.com/larsoner/mne-python","homepage":"http://martinos.org/mne/","size":98309,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"mne-tools:master","ref":"master","sha":"24668f4e9434cc6f81f05f641b2973e56a5b6b1e","user":{"login":"mne-tools","id":583875,"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,"name":"mne-python","full_name":"mne-tools/mne-python","owner":{"login":"mne-tools","id":583875,"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},"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":"2018-03-08T20:06:40Z","pushed_at":"2018-03-08T20:24: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":98310,"stargazers_count":422,"watchers_count":422,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":377,"mirror_url":null,"archived":false,"open_issues_count":270,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":377,"open_issues":270,"watchers":422,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971"},"html":{"href":"https://github.com/mne-tools/mne-python/pull/4971"},"issue":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/4971"},"comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/issues/4971/comments"},"review_comments":{"href":"https://api.github.com/repos/mne-tools/mne-python/pulls/4971/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/4971/commits"},"statuses":{"href":"https://api.github.com/repos/mne-tools/mne-python/statuses/3cee6eccd61a06965193825057e069e168c44851"}},"author_association":"OWNER"}}
{"actor":{"display_login":"larsoner"}}