{"action":"created","comment":{"url":"https://api.github.com/repos/soft-matter/trackpy/pulls/comments/30273307","id":30273307,"diff_hunk":"@@ -274,24 +281,29 @@ def _refine(raw_image, image, radius, coords, max_iterations,\n         mass[feat] = neighborhood.sum()\n         if not characterize:\n             continue  # short-circuit loop\n-        Rg[feat] = np.sqrt(np.sum(r_squared_mask(radius, ndim) *\n-                                  neighborhood) / mass[feat])\n+        if radius[1:] == radius[:-1]:","path":"trackpy/feature.py","position":null,"original_position":49,"commit_id":"71e379c33f56c03493c99ea4eb662c3c7889d982","original_commit_id":"f2edee1099593f38e4436707adfd4e572294a260","user":{"login":"caspervdw","id":8937919,"avatar_url":"https://avatars.githubusercontent.com/u/8937919?v=3","gravatar_id":"","url":"https://api.github.com/users/caspervdw","html_url":"https://github.com/caspervdw","followers_url":"https://api.github.com/users/caspervdw/followers","following_url":"https://api.github.com/users/caspervdw/following{/other_user}","gists_url":"https://api.github.com/users/caspervdw/gists{/gist_id}","starred_url":"https://api.github.com/users/caspervdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caspervdw/subscriptions","organizations_url":"https://api.github.com/users/caspervdw/orgs","repos_url":"https://api.github.com/users/caspervdw/repos","events_url":"https://api.github.com/users/caspervdw/events{/privacy}","received_events_url":"https://api.github.com/users/caspervdw/received_events","type":"User","site_admin":false},"body":"Probably the line numbering changed, I can't find the line you are referring to. It should be a tuple, except for the use inside `_numba_refine`, where everything is an ndarray (but only in this function).","created_at":"2015-05-13T20:38:00Z","updated_at":"2015-05-13T20:38:00Z","html_url":"https://github.com/soft-matter/trackpy/pull/239#discussion_r30273307","pull_request_url":"https://api.github.com/repos/soft-matter/trackpy/pulls/239","_links":{"self":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/comments/30273307"},"html":{"href":"https://github.com/soft-matter/trackpy/pull/239#discussion_r30273307"},"pull_request":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/239"}}},"pull_request":{"url":"https://api.github.com/repos/soft-matter/trackpy/pulls/239","id":34307434,"html_url":"https://github.com/soft-matter/trackpy/pull/239","diff_url":"https://github.com/soft-matter/trackpy/pull/239.diff","patch_url":"https://github.com/soft-matter/trackpy/pull/239.patch","issue_url":"https://api.github.com/repos/soft-matter/trackpy/issues/239","number":239,"state":"open","locked":false,"title":"ENH Anisotropic feature characterization","user":{"login":"caspervdw","id":8937919,"avatar_url":"https://avatars.githubusercontent.com/u/8937919?v=3","gravatar_id":"","url":"https://api.github.com/users/caspervdw","html_url":"https://github.com/caspervdw","followers_url":"https://api.github.com/users/caspervdw/followers","following_url":"https://api.github.com/users/caspervdw/following{/other_user}","gists_url":"https://api.github.com/users/caspervdw/gists{/gist_id}","starred_url":"https://api.github.com/users/caspervdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caspervdw/subscriptions","organizations_url":"https://api.github.com/users/caspervdw/orgs","repos_url":"https://api.github.com/users/caspervdw/repos","events_url":"https://api.github.com/users/caspervdw/events{/privacy}","received_events_url":"https://api.github.com/users/caspervdw/received_events","type":"User","site_admin":false},"body":"A number of changes that reach deep into the feature finding: please review carefully! The fixes are linked in subtle ways, that's why this is in one big commit. Please checkout [this](http://nbviewer.ipython.org/urls/dl.dropboxusercontent.com/u/36853001/Feature%20characterization%20v2.ipynb) notebook, which is a newer version that is referenced in #237, including demonstration of the new noise calculation and some tests.\r\n\r\n- Changes the behaviour of the `mass` column: it is now calculated from\r\nthe raw image. This solves the issue #237 due to the rescaling of the\r\nprocessed image and the subsequent calculation of mass on this image.\r\n- Changes the behaviour of the `signal` column: previously it was\r\ncalculated from the raw image and subsequently the `black_level` was\r\nsubtracted. Because of the high sensitivity to noise, this gives\r\nunpredictable results. It has been changed to: `signal =\r\npreprocessed_feature.max()`. The rescaling has been accounted for via an\r\nextra variable coming from `scale_to_gamut`.\r\n- eccentricity is calculated on anisotropic masks too, assuming that\r\npixels are square\r\n- size is calculated in all directions separately when an anisotropic\r\nmask is used, giving `size_x`, `size_y` columns\r\n- filtering on `maxsize` is done on sqrt(size_x^2 + size_y^2), which\r\nequals the current behaviour if sizes are equal\r\n- static error is calculated in all directions separately when an\r\nanisotropic mask is used *or* when noise_size is anisotropic, giving\r\n`ep_x`, `ep_y` columns\r\n- `preprocessing.bandpass` now calculates the background level and\r\nstandard deviation (only if needed, defaults to current behaviour)\r\n- `scale_to_gamut` returns the scale factor (only if needed, defaults to\r\ncurrent behaviour)\r\n- docstring for eccentricity: 0 is circular, not 1 as it is documented\r\nnow\r\n- characterization arrays are only initialized if needed","created_at":"2015-04-28T20:26:51Z","updated_at":"2015-05-13T20:38:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a2c42f6d2e9907aa461f4ca02ab79cd5645ba0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/soft-matter/trackpy/pulls/239/commits","review_comments_url":"https://api.github.com/repos/soft-matter/trackpy/pulls/239/comments","review_comment_url":"https://api.github.com/repos/soft-matter/trackpy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/soft-matter/trackpy/issues/239/comments","statuses_url":"https://api.github.com/repos/soft-matter/trackpy/statuses/71e379c33f56c03493c99ea4eb662c3c7889d982","head":{"label":"caspervdw:static-error","ref":"static-error","sha":"71e379c33f56c03493c99ea4eb662c3c7889d982","user":{"login":"caspervdw","id":8937919,"avatar_url":"https://avatars.githubusercontent.com/u/8937919?v=3","gravatar_id":"","url":"https://api.github.com/users/caspervdw","html_url":"https://github.com/caspervdw","followers_url":"https://api.github.com/users/caspervdw/followers","following_url":"https://api.github.com/users/caspervdw/following{/other_user}","gists_url":"https://api.github.com/users/caspervdw/gists{/gist_id}","starred_url":"https://api.github.com/users/caspervdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caspervdw/subscriptions","organizations_url":"https://api.github.com/users/caspervdw/orgs","repos_url":"https://api.github.com/users/caspervdw/repos","events_url":"https://api.github.com/users/caspervdw/events{/privacy}","received_events_url":"https://api.github.com/users/caspervdw/received_events","type":"User","site_admin":false},"repo":{"id":24537865,"name":"trackpy","full_name":"caspervdw/trackpy","owner":{"login":"caspervdw","id":8937919,"avatar_url":"https://avatars.githubusercontent.com/u/8937919?v=3","gravatar_id":"","url":"https://api.github.com/users/caspervdw","html_url":"https://github.com/caspervdw","followers_url":"https://api.github.com/users/caspervdw/followers","following_url":"https://api.github.com/users/caspervdw/following{/other_user}","gists_url":"https://api.github.com/users/caspervdw/gists{/gist_id}","starred_url":"https://api.github.com/users/caspervdw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caspervdw/subscriptions","organizations_url":"https://api.github.com/users/caspervdw/orgs","repos_url":"https://api.github.com/users/caspervdw/repos","events_url":"https://api.github.com/users/caspervdw/events{/privacy}","received_events_url":"https://api.github.com/users/caspervdw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caspervdw/trackpy","description":"Python particle tracking toolkit","fork":true,"url":"https://api.github.com/repos/caspervdw/trackpy","forks_url":"https://api.github.com/repos/caspervdw/trackpy/forks","keys_url":"https://api.github.com/repos/caspervdw/trackpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caspervdw/trackpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caspervdw/trackpy/teams","hooks_url":"https://api.github.com/repos/caspervdw/trackpy/hooks","issue_events_url":"https://api.github.com/repos/caspervdw/trackpy/issues/events{/number}","events_url":"https://api.github.com/repos/caspervdw/trackpy/events","assignees_url":"https://api.github.com/repos/caspervdw/trackpy/assignees{/user}","branches_url":"https://api.github.com/repos/caspervdw/trackpy/branches{/branch}","tags_url":"https://api.github.com/repos/caspervdw/trackpy/tags","blobs_url":"https://api.github.com/repos/caspervdw/trackpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caspervdw/trackpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caspervdw/trackpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/caspervdw/trackpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caspervdw/trackpy/statuses/{sha}","languages_url":"https://api.github.com/repos/caspervdw/trackpy/languages","stargazers_url":"https://api.github.com/repos/caspervdw/trackpy/stargazers","contributors_url":"https://api.github.com/repos/caspervdw/trackpy/contributors","subscribers_url":"https://api.github.com/repos/caspervdw/trackpy/subscribers","subscription_url":"https://api.github.com/repos/caspervdw/trackpy/subscription","commits_url":"https://api.github.com/repos/caspervdw/trackpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/caspervdw/trackpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/caspervdw/trackpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/caspervdw/trackpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/caspervdw/trackpy/contents/{+path}","compare_url":"https://api.github.com/repos/caspervdw/trackpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caspervdw/trackpy/merges","archive_url":"https://api.github.com/repos/caspervdw/trackpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caspervdw/trackpy/downloads","issues_url":"https://api.github.com/repos/caspervdw/trackpy/issues{/number}","pulls_url":"https://api.github.com/repos/caspervdw/trackpy/pulls{/number}","milestones_url":"https://api.github.com/repos/caspervdw/trackpy/milestones{/number}","notifications_url":"https://api.github.com/repos/caspervdw/trackpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caspervdw/trackpy/labels{/name}","releases_url":"https://api.github.com/repos/caspervdw/trackpy/releases{/id}","created_at":"2014-09-27T17:17:37Z","updated_at":"2015-04-15T13:21:27Z","pushed_at":"2015-05-13T20:31:59Z","git_url":"git://github.com/caspervdw/trackpy.git","ssh_url":"git@github.com:caspervdw/trackpy.git","clone_url":"https://github.com/caspervdw/trackpy.git","svn_url":"https://github.com/caspervdw/trackpy","homepage":"","size":90737,"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":"soft-matter:master","ref":"master","sha":"8d442724eb3b8781692c2f2c2bde1949fa3b3b75","user":{"login":"soft-matter","id":5857177,"avatar_url":"https://avatars.githubusercontent.com/u/5857177?v=3","gravatar_id":"","url":"https://api.github.com/users/soft-matter","html_url":"https://github.com/soft-matter","followers_url":"https://api.github.com/users/soft-matter/followers","following_url":"https://api.github.com/users/soft-matter/following{/other_user}","gists_url":"https://api.github.com/users/soft-matter/gists{/gist_id}","starred_url":"https://api.github.com/users/soft-matter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soft-matter/subscriptions","organizations_url":"https://api.github.com/users/soft-matter/orgs","repos_url":"https://api.github.com/users/soft-matter/repos","events_url":"https://api.github.com/users/soft-matter/events{/privacy}","received_events_url":"https://api.github.com/users/soft-matter/received_events","type":"Organization","site_admin":false},"repo":{"id":4744355,"name":"trackpy","full_name":"soft-matter/trackpy","owner":{"login":"soft-matter","id":5857177,"avatar_url":"https://avatars.githubusercontent.com/u/5857177?v=3","gravatar_id":"","url":"https://api.github.com/users/soft-matter","html_url":"https://github.com/soft-matter","followers_url":"https://api.github.com/users/soft-matter/followers","following_url":"https://api.github.com/users/soft-matter/following{/other_user}","gists_url":"https://api.github.com/users/soft-matter/gists{/gist_id}","starred_url":"https://api.github.com/users/soft-matter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/soft-matter/subscriptions","organizations_url":"https://api.github.com/users/soft-matter/orgs","repos_url":"https://api.github.com/users/soft-matter/repos","events_url":"https://api.github.com/users/soft-matter/events{/privacy}","received_events_url":"https://api.github.com/users/soft-matter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/soft-matter/trackpy","description":"Python particle tracking toolkit","fork":false,"url":"https://api.github.com/repos/soft-matter/trackpy","forks_url":"https://api.github.com/repos/soft-matter/trackpy/forks","keys_url":"https://api.github.com/repos/soft-matter/trackpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/soft-matter/trackpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/soft-matter/trackpy/teams","hooks_url":"https://api.github.com/repos/soft-matter/trackpy/hooks","issue_events_url":"https://api.github.com/repos/soft-matter/trackpy/issues/events{/number}","events_url":"https://api.github.com/repos/soft-matter/trackpy/events","assignees_url":"https://api.github.com/repos/soft-matter/trackpy/assignees{/user}","branches_url":"https://api.github.com/repos/soft-matter/trackpy/branches{/branch}","tags_url":"https://api.github.com/repos/soft-matter/trackpy/tags","blobs_url":"https://api.github.com/repos/soft-matter/trackpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/soft-matter/trackpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/soft-matter/trackpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/soft-matter/trackpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/soft-matter/trackpy/statuses/{sha}","languages_url":"https://api.github.com/repos/soft-matter/trackpy/languages","stargazers_url":"https://api.github.com/repos/soft-matter/trackpy/stargazers","contributors_url":"https://api.github.com/repos/soft-matter/trackpy/contributors","subscribers_url":"https://api.github.com/repos/soft-matter/trackpy/subscribers","subscription_url":"https://api.github.com/repos/soft-matter/trackpy/subscription","commits_url":"https://api.github.com/repos/soft-matter/trackpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/soft-matter/trackpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/soft-matter/trackpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/soft-matter/trackpy/issues/comments{/number}","contents_url":"https://api.github.com/repos/soft-matter/trackpy/contents/{+path}","compare_url":"https://api.github.com/repos/soft-matter/trackpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/soft-matter/trackpy/merges","archive_url":"https://api.github.com/repos/soft-matter/trackpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/soft-matter/trackpy/downloads","issues_url":"https://api.github.com/repos/soft-matter/trackpy/issues{/number}","pulls_url":"https://api.github.com/repos/soft-matter/trackpy/pulls{/number}","milestones_url":"https://api.github.com/repos/soft-matter/trackpy/milestones{/number}","notifications_url":"https://api.github.com/repos/soft-matter/trackpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/soft-matter/trackpy/labels{/name}","releases_url":"https://api.github.com/repos/soft-matter/trackpy/releases{/id}","created_at":"2012-06-21T20:56:58Z","updated_at":"2015-04-28T20:26:14Z","pushed_at":"2015-05-13T20:32:00Z","git_url":"git://github.com/soft-matter/trackpy.git","ssh_url":"git@github.com:soft-matter/trackpy.git","clone_url":"https://github.com/soft-matter/trackpy.git","svn_url":"https://github.com/soft-matter/trackpy","homepage":"http://soft-matter.github.io/trackpy","size":102109,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":27,"mirror_url":null,"open_issues_count":48,"forks":27,"open_issues":48,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/239"},"html":{"href":"https://github.com/soft-matter/trackpy/pull/239"},"issue":{"href":"https://api.github.com/repos/soft-matter/trackpy/issues/239"},"comments":{"href":"https://api.github.com/repos/soft-matter/trackpy/issues/239/comments"},"review_comments":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/239/comments"},"review_comment":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/soft-matter/trackpy/pulls/239/commits"},"statuses":{"href":"https://api.github.com/repos/soft-matter/trackpy/statuses/71e379c33f56c03493c99ea4eb662c3c7889d982"}}}}