{"action":"created","comment":{"url":"https://api.github.com/repos/kwikteam/phy/pulls/comments/29512959","id":29512959,"diff_hunk":"@@ -0,0 +1,794 @@\n+# -*- coding: utf-8 -*-\n+\n+\"\"\"Pan & zoom transform.\"\"\"\n+\n+\n+#------------------------------------------------------------------------------\n+# Imports\n+#------------------------------------------------------------------------------\n+\n+import math\n+\n+import numpy as np\n+\n+# from vispy import gloo\n+\n+from ..utils.array import _as_array\n+\n+\n+#------------------------------------------------------------------------------\n+# PanZoom class","path":"phy/plot/_panzoom.py","position":20,"original_position":20,"commit_id":"c7f0d2acf3fbc70f2f3c10c343ad7d07b64781cb","original_commit_id":"c7f0d2acf3fbc70f2f3c10c343ad7d07b64781cb","user":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"body":"Eventually, yes.","created_at":"2015-05-01T16:31:50Z","updated_at":"2015-05-01T16:31:50Z","html_url":"https://github.com/kwikteam/phy/pull/224#discussion_r29512959","pull_request_url":"https://api.github.com/repos/kwikteam/phy/pulls/224","_links":{"self":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/comments/29512959"},"html":{"href":"https://github.com/kwikteam/phy/pull/224#discussion_r29512959"},"pull_request":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/224"}}},"pull_request":{"url":"https://api.github.com/repos/kwikteam/phy/pulls/224","id":34125751,"html_url":"https://github.com/kwikteam/phy/pull/224","diff_url":"https://github.com/kwikteam/phy/pull/224.diff","patch_url":"https://github.com/kwikteam/phy/pull/224.patch","issue_url":"https://api.github.com/repos/kwikteam/phy/issues/224","number":224,"state":"open","locked":false,"title":"Trace view","user":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"body":"This PR implements the trace view. It also brings many other improvements and bug fixes.\r\n\r\n* Trace view with user-settable interval and spikes with masks.\r\n* Refactored selector: now, each view model is responsible for its selector instance. There is no more global selector instance in Session.\r\n* A view no longer has a reference to the full spike_clusters array, just the spike clusters for the spikes shown in that view.\r\n* Warning if a kwik file is not present.\r\n* Improved pan zoom: in a grid view, pan zoom is now specific to each subplot (using a matrix of pan/zoom parameters with an OpenGL uniform array). There are a few global keyboard shortcuts.\r\n* Refactored pan zoom is a dedicated private module.\r\n* There is now a `PanZoomGrid` class that derives from `PanZoom`.\r\n* Added pan constraints.\r\n* Added special pan constraints for time subplots in feature view.\r\n* Global zoom applies to a single axis in time subplots.\r\n* Fixed display bug with feature markers.\r\n* Take the cluster order into account in the views.\r\n\r\nIssues closed:\r\n\r\n* Closes #16 \r\n* Closes #175\r\n* Closes #177\r\n* Closes #198 \r\n* Closes #218\r\n* Closes #223 \r\n* Closes #227 \r\n* Closes #228 ","created_at":"2015-04-26T16:37:59Z","updated_at":"2015-05-01T16:31:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79410f9e047f6309314b6d6055bb7040e658437a","assignee":null,"milestone":{"url":"https://api.github.com/repos/kwikteam/phy/milestones/5","html_url":"https://github.com/kwikteam/phy/milestones/v0.1.0","labels_url":"https://api.github.com/repos/kwikteam/phy/milestones/5/labels","id":1082882,"number":5,"title":"v0.1.0","description":"* Qt GUI with VisPy widgets\r\n* Keyboard shortcuts for the wizard\r\n* Cluster view","creator":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2015-04-24T20:55:18Z","updated_at":"2015-05-01T13:40:17Z","due_on":"2015-05-14T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kwikteam/phy/pulls/224/commits","review_comments_url":"https://api.github.com/repos/kwikteam/phy/pulls/224/comments","review_comment_url":"https://api.github.com/repos/kwikteam/phy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kwikteam/phy/issues/224/comments","statuses_url":"https://api.github.com/repos/kwikteam/phy/statuses/c7f0d2acf3fbc70f2f3c10c343ad7d07b64781cb","head":{"label":"rossant:trace-view","ref":"trace-view","sha":"c7f0d2acf3fbc70f2f3c10c343ad7d07b64781cb","user":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"repo":{"id":25036206,"name":"phy","full_name":"rossant/phy","owner":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rossant/phy","description":"","fork":true,"url":"https://api.github.com/repos/rossant/phy","forks_url":"https://api.github.com/repos/rossant/phy/forks","keys_url":"https://api.github.com/repos/rossant/phy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rossant/phy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rossant/phy/teams","hooks_url":"https://api.github.com/repos/rossant/phy/hooks","issue_events_url":"https://api.github.com/repos/rossant/phy/issues/events{/number}","events_url":"https://api.github.com/repos/rossant/phy/events","assignees_url":"https://api.github.com/repos/rossant/phy/assignees{/user}","branches_url":"https://api.github.com/repos/rossant/phy/branches{/branch}","tags_url":"https://api.github.com/repos/rossant/phy/tags","blobs_url":"https://api.github.com/repos/rossant/phy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rossant/phy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rossant/phy/git/refs{/sha}","trees_url":"https://api.github.com/repos/rossant/phy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rossant/phy/statuses/{sha}","languages_url":"https://api.github.com/repos/rossant/phy/languages","stargazers_url":"https://api.github.com/repos/rossant/phy/stargazers","contributors_url":"https://api.github.com/repos/rossant/phy/contributors","subscribers_url":"https://api.github.com/repos/rossant/phy/subscribers","subscription_url":"https://api.github.com/repos/rossant/phy/subscription","commits_url":"https://api.github.com/repos/rossant/phy/commits{/sha}","git_commits_url":"https://api.github.com/repos/rossant/phy/git/commits{/sha}","comments_url":"https://api.github.com/repos/rossant/phy/comments{/number}","issue_comment_url":"https://api.github.com/repos/rossant/phy/issues/comments{/number}","contents_url":"https://api.github.com/repos/rossant/phy/contents/{+path}","compare_url":"https://api.github.com/repos/rossant/phy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rossant/phy/merges","archive_url":"https://api.github.com/repos/rossant/phy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rossant/phy/downloads","issues_url":"https://api.github.com/repos/rossant/phy/issues{/number}","pulls_url":"https://api.github.com/repos/rossant/phy/pulls{/number}","milestones_url":"https://api.github.com/repos/rossant/phy/milestones{/number}","notifications_url":"https://api.github.com/repos/rossant/phy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rossant/phy/labels{/name}","releases_url":"https://api.github.com/repos/rossant/phy/releases{/id}","created_at":"2014-10-10T13:17:32Z","updated_at":"2015-05-01T10:27:52Z","pushed_at":"2015-05-01T13:39:18Z","git_url":"git://github.com/rossant/phy.git","ssh_url":"git@github.com:rossant/phy.git","clone_url":"https://github.com/rossant/phy.git","svn_url":"https://github.com/rossant/phy","homepage":null,"size":1688,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"kwikteam:master","ref":"master","sha":"41d1b1e30434904c6ea5bd47198025a61c2d7b5d","user":{"login":"kwikteam","id":8309794,"avatar_url":"https://avatars.githubusercontent.com/u/8309794?v=3","gravatar_id":"","url":"https://api.github.com/users/kwikteam","html_url":"https://github.com/kwikteam","followers_url":"https://api.github.com/users/kwikteam/followers","following_url":"https://api.github.com/users/kwikteam/following{/other_user}","gists_url":"https://api.github.com/users/kwikteam/gists{/gist_id}","starred_url":"https://api.github.com/users/kwikteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwikteam/subscriptions","organizations_url":"https://api.github.com/users/kwikteam/orgs","repos_url":"https://api.github.com/users/kwikteam/repos","events_url":"https://api.github.com/users/kwikteam/events{/privacy}","received_events_url":"https://api.github.com/users/kwikteam/received_events","type":"Organization","site_admin":false},"repo":{"id":22426819,"name":"phy","full_name":"kwikteam/phy","owner":{"login":"kwikteam","id":8309794,"avatar_url":"https://avatars.githubusercontent.com/u/8309794?v=3","gravatar_id":"","url":"https://api.github.com/users/kwikteam","html_url":"https://github.com/kwikteam","followers_url":"https://api.github.com/users/kwikteam/followers","following_url":"https://api.github.com/users/kwikteam/following{/other_user}","gists_url":"https://api.github.com/users/kwikteam/gists{/gist_id}","starred_url":"https://api.github.com/users/kwikteam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwikteam/subscriptions","organizations_url":"https://api.github.com/users/kwikteam/orgs","repos_url":"https://api.github.com/users/kwikteam/repos","events_url":"https://api.github.com/users/kwikteam/events{/privacy}","received_events_url":"https://api.github.com/users/kwikteam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kwikteam/phy","description":"Interactive electrophysiological data analysis package","fork":false,"url":"https://api.github.com/repos/kwikteam/phy","forks_url":"https://api.github.com/repos/kwikteam/phy/forks","keys_url":"https://api.github.com/repos/kwikteam/phy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kwikteam/phy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kwikteam/phy/teams","hooks_url":"https://api.github.com/repos/kwikteam/phy/hooks","issue_events_url":"https://api.github.com/repos/kwikteam/phy/issues/events{/number}","events_url":"https://api.github.com/repos/kwikteam/phy/events","assignees_url":"https://api.github.com/repos/kwikteam/phy/assignees{/user}","branches_url":"https://api.github.com/repos/kwikteam/phy/branches{/branch}","tags_url":"https://api.github.com/repos/kwikteam/phy/tags","blobs_url":"https://api.github.com/repos/kwikteam/phy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kwikteam/phy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kwikteam/phy/git/refs{/sha}","trees_url":"https://api.github.com/repos/kwikteam/phy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kwikteam/phy/statuses/{sha}","languages_url":"https://api.github.com/repos/kwikteam/phy/languages","stargazers_url":"https://api.github.com/repos/kwikteam/phy/stargazers","contributors_url":"https://api.github.com/repos/kwikteam/phy/contributors","subscribers_url":"https://api.github.com/repos/kwikteam/phy/subscribers","subscription_url":"https://api.github.com/repos/kwikteam/phy/subscription","commits_url":"https://api.github.com/repos/kwikteam/phy/commits{/sha}","git_commits_url":"https://api.github.com/repos/kwikteam/phy/git/commits{/sha}","comments_url":"https://api.github.com/repos/kwikteam/phy/comments{/number}","issue_comment_url":"https://api.github.com/repos/kwikteam/phy/issues/comments{/number}","contents_url":"https://api.github.com/repos/kwikteam/phy/contents/{+path}","compare_url":"https://api.github.com/repos/kwikteam/phy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kwikteam/phy/merges","archive_url":"https://api.github.com/repos/kwikteam/phy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kwikteam/phy/downloads","issues_url":"https://api.github.com/repos/kwikteam/phy/issues{/number}","pulls_url":"https://api.github.com/repos/kwikteam/phy/pulls{/number}","milestones_url":"https://api.github.com/repos/kwikteam/phy/milestones{/number}","notifications_url":"https://api.github.com/repos/kwikteam/phy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kwikteam/phy/labels{/name}","releases_url":"https://api.github.com/repos/kwikteam/phy/releases{/id}","created_at":"2014-07-30T12:26:51Z","updated_at":"2015-04-24T20:51:10Z","pushed_at":"2015-05-01T13:40:17Z","git_url":"git://github.com/kwikteam/phy.git","ssh_url":"git@github.com:kwikteam/phy.git","clone_url":"https://github.com/kwikteam/phy.git","svn_url":"https://github.com/kwikteam/phy","homepage":"","size":2374,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":67,"forks":5,"open_issues":67,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/224"},"html":{"href":"https://github.com/kwikteam/phy/pull/224"},"issue":{"href":"https://api.github.com/repos/kwikteam/phy/issues/224"},"comments":{"href":"https://api.github.com/repos/kwikteam/phy/issues/224/comments"},"review_comments":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/224/comments"},"review_comment":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kwikteam/phy/pulls/224/commits"},"statuses":{"href":"https://api.github.com/repos/kwikteam/phy/statuses/c7f0d2acf3fbc70f2f3c10c343ad7d07b64781cb"}}}}