{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/comments/77102440","id":77102440,"diff_hunk":"@@ -108,3 +109,84 @@ def threshold_mask(images, threshold, mask=None):\n         if len(bad_pixels[0]) != 0:\n             mask[bad_pixels] = 0\n         yield mask\n+\n+\n+def margin_mask(img_shape, edge_size):\n+    \"\"\"\n+    Mask the edge of an image\n+\n+    Parameters\n+    -----------\n+    img_shape: tuple\n+        The shape of the image\n+    edge_size: int\n+        Number of pixels to mask from the edge\n+\n+    Returns\n+    --------\n+    2darray:\n+        The mask array, bad pixels are 0\n+    \"\"\"\n+    mask = np.zeros(img_shape, dtype=bool)\n+    mask[edge_size:-edge_size, edge_size:-edge_size] = True\n+    return mask\n+\n+\n+def ring_blur_mask(img, r, alpha, bins, mask=None):","path":"skbeam/core/mask.py","position":35,"original_position":35,"commit_id":"a250ab21395c33f0e452ed9d2710c585b3932e7c","original_commit_id":"98e60ec95f8af88b9202a835bb8ae5e064274d60","user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"body":"Maybe @ericdill has thoughts on a function name?","created_at":"2016-09-01T01:37:50Z","updated_at":"2016-09-01T01:37:50Z","html_url":"https://github.com/scikit-beam/scikit-beam/pull/435#discussion_r77102440","pull_request_url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435","_links":{"self":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/comments/77102440"},"html":{"href":"https://github.com/scikit-beam/scikit-beam/pull/435#discussion_r77102440"},"pull_request":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435","id":65294885,"html_url":"https://github.com/scikit-beam/scikit-beam/pull/435","diff_url":"https://github.com/scikit-beam/scikit-beam/pull/435.diff","patch_url":"https://github.com/scikit-beam/scikit-beam/pull/435.patch","issue_url":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/435","number":435,"state":"open","locked":false,"title":"ENH: Add edge and ring blur masks to scikit-beam","user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"body":"This PR should be better.","created_at":"2016-04-05T12:20:55Z","updated_at":"2016-09-01T01:37:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fa7c8cad4511cbec579c645014931788e177518","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435/commits","review_comments_url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435/comments","review_comment_url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/435/comments","statuses_url":"https://api.github.com/repos/scikit-beam/scikit-beam/statuses/a250ab21395c33f0e452ed9d2710c585b3932e7c","head":{"label":"CJ-Wright:mask2","ref":"mask2","sha":"a250ab21395c33f0e452ed9d2710c585b3932e7c","user":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"repo":{"id":37494816,"name":"scikit-beam","full_name":"CJ-Wright/scikit-beam","owner":{"login":"CJ-Wright","id":6740689,"avatar_url":"https://avatars.githubusercontent.com/u/6740689?v=3","gravatar_id":"","url":"https://api.github.com/users/CJ-Wright","html_url":"https://github.com/CJ-Wright","followers_url":"https://api.github.com/users/CJ-Wright/followers","following_url":"https://api.github.com/users/CJ-Wright/following{/other_user}","gists_url":"https://api.github.com/users/CJ-Wright/gists{/gist_id}","starred_url":"https://api.github.com/users/CJ-Wright/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CJ-Wright/subscriptions","organizations_url":"https://api.github.com/users/CJ-Wright/orgs","repos_url":"https://api.github.com/users/CJ-Wright/repos","events_url":"https://api.github.com/users/CJ-Wright/events{/privacy}","received_events_url":"https://api.github.com/users/CJ-Wright/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CJ-Wright/scikit-beam","description":"Data analysis tools for X-ray science","fork":true,"url":"https://api.github.com/repos/CJ-Wright/scikit-beam","forks_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/forks","keys_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/teams","hooks_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/hooks","issue_events_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/issues/events{/number}","events_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/events","assignees_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/assignees{/user}","branches_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/branches{/branch}","tags_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/tags","blobs_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/languages","stargazers_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/stargazers","contributors_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/contributors","subscribers_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/subscribers","subscription_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/subscription","commits_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/contents/{+path}","compare_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/merges","archive_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/downloads","issues_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/issues{/number}","pulls_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/labels{/name}","releases_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/releases{/id}","deployments_url":"https://api.github.com/repos/CJ-Wright/scikit-beam/deployments","created_at":"2015-06-15T22:30:56Z","updated_at":"2016-05-17T18:49:41Z","pushed_at":"2016-08-26T20:19:57Z","git_url":"git://github.com/CJ-Wright/scikit-beam.git","ssh_url":"git@github.com:CJ-Wright/scikit-beam.git","clone_url":"https://github.com/CJ-Wright/scikit-beam.git","svn_url":"https://github.com/CJ-Wright/scikit-beam","homepage":"","size":3715,"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":"scikit-beam:master","ref":"master","sha":"1e2476a5e230758e55877258b36e8deef5f90d06","user":{"login":"scikit-beam","id":16195776,"avatar_url":"https://avatars.githubusercontent.com/u/16195776?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-beam","html_url":"https://github.com/scikit-beam","followers_url":"https://api.github.com/users/scikit-beam/followers","following_url":"https://api.github.com/users/scikit-beam/following{/other_user}","gists_url":"https://api.github.com/users/scikit-beam/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-beam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-beam/subscriptions","organizations_url":"https://api.github.com/users/scikit-beam/orgs","repos_url":"https://api.github.com/users/scikit-beam/repos","events_url":"https://api.github.com/users/scikit-beam/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-beam/received_events","type":"Organization","site_admin":false},"repo":{"id":21679569,"name":"scikit-beam","full_name":"scikit-beam/scikit-beam","owner":{"login":"scikit-beam","id":16195776,"avatar_url":"https://avatars.githubusercontent.com/u/16195776?v=3","gravatar_id":"","url":"https://api.github.com/users/scikit-beam","html_url":"https://github.com/scikit-beam","followers_url":"https://api.github.com/users/scikit-beam/followers","following_url":"https://api.github.com/users/scikit-beam/following{/other_user}","gists_url":"https://api.github.com/users/scikit-beam/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-beam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-beam/subscriptions","organizations_url":"https://api.github.com/users/scikit-beam/orgs","repos_url":"https://api.github.com/users/scikit-beam/repos","events_url":"https://api.github.com/users/scikit-beam/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-beam/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scikit-beam/scikit-beam","description":"Data analysis tools for X-Ray, Neutron and Electron sciences","fork":false,"url":"https://api.github.com/repos/scikit-beam/scikit-beam","forks_url":"https://api.github.com/repos/scikit-beam/scikit-beam/forks","keys_url":"https://api.github.com/repos/scikit-beam/scikit-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-beam/scikit-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-beam/scikit-beam/teams","hooks_url":"https://api.github.com/repos/scikit-beam/scikit-beam/hooks","issue_events_url":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-beam/scikit-beam/events","assignees_url":"https://api.github.com/repos/scikit-beam/scikit-beam/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-beam/scikit-beam/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-beam/scikit-beam/tags","blobs_url":"https://api.github.com/repos/scikit-beam/scikit-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-beam/scikit-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-beam/scikit-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-beam/scikit-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-beam/scikit-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-beam/scikit-beam/languages","stargazers_url":"https://api.github.com/repos/scikit-beam/scikit-beam/stargazers","contributors_url":"https://api.github.com/repos/scikit-beam/scikit-beam/contributors","subscribers_url":"https://api.github.com/repos/scikit-beam/scikit-beam/subscribers","subscription_url":"https://api.github.com/repos/scikit-beam/scikit-beam/subscription","commits_url":"https://api.github.com/repos/scikit-beam/scikit-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-beam/scikit-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-beam/scikit-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-beam/scikit-beam/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-beam/scikit-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-beam/scikit-beam/merges","archive_url":"https://api.github.com/repos/scikit-beam/scikit-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-beam/scikit-beam/downloads","issues_url":"https://api.github.com/repos/scikit-beam/scikit-beam/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-beam/scikit-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-beam/scikit-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-beam/scikit-beam/labels{/name}","releases_url":"https://api.github.com/repos/scikit-beam/scikit-beam/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-beam/scikit-beam/deployments","created_at":"2014-07-10T04:44:35Z","updated_at":"2016-08-16T15:49:44Z","pushed_at":"2016-08-31T17:51:16Z","git_url":"git://github.com/scikit-beam/scikit-beam.git","ssh_url":"git@github.com:scikit-beam/scikit-beam.git","clone_url":"https://github.com/scikit-beam/scikit-beam.git","svn_url":"https://github.com/scikit-beam/scikit-beam","homepage":"","size":50041,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":42,"mirror_url":null,"open_issues_count":70,"forks":42,"open_issues":70,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435"},"html":{"href":"https://github.com/scikit-beam/scikit-beam/pull/435"},"issue":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/435"},"comments":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/issues/435/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/pulls/435/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-beam/scikit-beam/statuses/a250ab21395c33f0e452ed9d2710c585b3932e7c"}}}}
{"actor":{"display_login":"CJ-Wright"}}