{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/comments/53668904","id":53668904,"diff_hunk":"@@ -234,22 +234,40 @@ def cosmicRay(self, exposure, keepCRs=None):\n         except Exception:\n             pass\n \n-        mi = exposure.getMaskedImage()\n-        bg = afwMath.makeStatistics(mi, afwMath.MEDIAN).getValue()\n+        exposure0 = exposure            # initial value of exposure\n+        binSize = self.config.cosmicray.background.binSize\n+        nx, ny = exposure.getWidth()/binSize, exposure.getHeight()/binSize\n+        if nx*ny <= 1:\n+            bg = afwMath.makeStatistics(exposure.getMaskedImage(), afwMath.MEDIAN).getValue()\n+            bkgd = None","path":"python/lsst/pipe/tasks/repair.py","position":11,"original_position":11,"commit_id":"87d22ef59c244d378448e4aab34f5ca16953cc84","original_commit_id":"87d22ef59c244d378448e4aab34f5ca16953cc84","user":{"login":"jdswinbank","id":460854,"avatar_url":"https://avatars.githubusercontent.com/u/460854?v=3","gravatar_id":"","url":"https://api.github.com/users/jdswinbank","html_url":"https://github.com/jdswinbank","followers_url":"https://api.github.com/users/jdswinbank/followers","following_url":"https://api.github.com/users/jdswinbank/following{/other_user}","gists_url":"https://api.github.com/users/jdswinbank/gists{/gist_id}","starred_url":"https://api.github.com/users/jdswinbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdswinbank/subscriptions","organizations_url":"https://api.github.com/users/jdswinbank/orgs","repos_url":"https://api.github.com/users/jdswinbank/repos","events_url":"https://api.github.com/users/jdswinbank/events{/privacy}","received_events_url":"https://api.github.com/users/jdswinbank/received_events","type":"User","site_admin":false},"body":"Could we find better names for these (``medianBg`` and ``modelBg``, maybe)?","created_at":"2016-02-22T18:31:13Z","updated_at":"2016-02-22T18:31:13Z","html_url":"https://github.com/lsst/pipe_tasks/pull/29#discussion_r53668904","pull_request_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/comments/53668904"},"html":{"href":"https://github.com/lsst/pipe_tasks/pull/29#discussion_r53668904"},"pull_request":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29","id":60216339,"html_url":"https://github.com/lsst/pipe_tasks/pull/29","diff_url":"https://github.com/lsst/pipe_tasks/pull/29.diff","patch_url":"https://github.com/lsst/pipe_tasks/pull/29.patch","issue_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/29","number":29,"state":"open","locked":false,"title":"Review for DM-5161: Support a full background model when detecting cosmic rays ","user":{"login":"jdswinbank","id":460854,"avatar_url":"https://avatars.githubusercontent.com/u/460854?v=3","gravatar_id":"","url":"https://api.github.com/users/jdswinbank","html_url":"https://github.com/jdswinbank","followers_url":"https://api.github.com/users/jdswinbank/followers","following_url":"https://api.github.com/users/jdswinbank/following{/other_user}","gists_url":"https://api.github.com/users/jdswinbank/gists{/gist_id}","starred_url":"https://api.github.com/users/jdswinbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdswinbank/subscriptions","organizations_url":"https://api.github.com/users/jdswinbank/orgs","repos_url":"https://api.github.com/users/jdswinbank/repos","events_url":"https://api.github.com/users/jdswinbank/events{/privacy}","received_events_url":"https://api.github.com/users/jdswinbank/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-22T18:15:50Z","updated_at":"2016-02-22T18:31:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c05418c7bdab59f0e5f1cfbdd043cb9c53450d1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29/commits","review_comments_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29/comments","review_comment_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/29/comments","statuses_url":"https://api.github.com/repos/lsst/pipe_tasks/statuses/87d22ef59c244d378448e4aab34f5ca16953cc84","head":{"label":"lsst:u/lauren/DM-5161","ref":"u/lauren/DM-5161","sha":"87d22ef59c244d378448e4aab34f5ca16953cc84","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013457,"name":"pipe_tasks","full_name":"lsst/pipe_tasks","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/pipe_tasks","description":"LSST Data Management: astronomical data processing tasks","fork":false,"url":"https://api.github.com/repos/lsst/pipe_tasks","forks_url":"https://api.github.com/repos/lsst/pipe_tasks/forks","keys_url":"https://api.github.com/repos/lsst/pipe_tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/pipe_tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/pipe_tasks/teams","hooks_url":"https://api.github.com/repos/lsst/pipe_tasks/hooks","issue_events_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/pipe_tasks/events","assignees_url":"https://api.github.com/repos/lsst/pipe_tasks/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/pipe_tasks/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/pipe_tasks/tags","blobs_url":"https://api.github.com/repos/lsst/pipe_tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/pipe_tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/pipe_tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/pipe_tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/pipe_tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/pipe_tasks/languages","stargazers_url":"https://api.github.com/repos/lsst/pipe_tasks/stargazers","contributors_url":"https://api.github.com/repos/lsst/pipe_tasks/contributors","subscribers_url":"https://api.github.com/repos/lsst/pipe_tasks/subscribers","subscription_url":"https://api.github.com/repos/lsst/pipe_tasks/subscription","commits_url":"https://api.github.com/repos/lsst/pipe_tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/pipe_tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/pipe_tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/pipe_tasks/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/pipe_tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/pipe_tasks/merges","archive_url":"https://api.github.com/repos/lsst/pipe_tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/pipe_tasks/downloads","issues_url":"https://api.github.com/repos/lsst/pipe_tasks/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/pipe_tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/pipe_tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/pipe_tasks/labels{/name}","releases_url":"https://api.github.com/repos/lsst/pipe_tasks/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/pipe_tasks/deployments","created_at":"2014-08-16T07:50:15Z","updated_at":"2016-01-11T18:54:32Z","pushed_at":"2016-02-22T18:18:17Z","git_url":"git://github.com/lsst/pipe_tasks.git","ssh_url":"git@github.com:lsst/pipe_tasks.git","clone_url":"https://github.com/lsst/pipe_tasks.git","svn_url":"https://github.com/lsst/pipe_tasks","homepage":"http://dm.lsst.org/","size":11420,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"43ab5efd4cb9cde24c2fbc7470081c57abd95c8b","user":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"repo":{"id":23013457,"name":"pipe_tasks","full_name":"lsst/pipe_tasks","owner":{"login":"lsst","id":1134504,"avatar_url":"https://avatars.githubusercontent.com/u/1134504?v=3","gravatar_id":"","url":"https://api.github.com/users/lsst","html_url":"https://github.com/lsst","followers_url":"https://api.github.com/users/lsst/followers","following_url":"https://api.github.com/users/lsst/following{/other_user}","gists_url":"https://api.github.com/users/lsst/gists{/gist_id}","starred_url":"https://api.github.com/users/lsst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lsst/subscriptions","organizations_url":"https://api.github.com/users/lsst/orgs","repos_url":"https://api.github.com/users/lsst/repos","events_url":"https://api.github.com/users/lsst/events{/privacy}","received_events_url":"https://api.github.com/users/lsst/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lsst/pipe_tasks","description":"LSST Data Management: astronomical data processing tasks","fork":false,"url":"https://api.github.com/repos/lsst/pipe_tasks","forks_url":"https://api.github.com/repos/lsst/pipe_tasks/forks","keys_url":"https://api.github.com/repos/lsst/pipe_tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/pipe_tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/pipe_tasks/teams","hooks_url":"https://api.github.com/repos/lsst/pipe_tasks/hooks","issue_events_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/pipe_tasks/events","assignees_url":"https://api.github.com/repos/lsst/pipe_tasks/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/pipe_tasks/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/pipe_tasks/tags","blobs_url":"https://api.github.com/repos/lsst/pipe_tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/pipe_tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/pipe_tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/pipe_tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/pipe_tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/pipe_tasks/languages","stargazers_url":"https://api.github.com/repos/lsst/pipe_tasks/stargazers","contributors_url":"https://api.github.com/repos/lsst/pipe_tasks/contributors","subscribers_url":"https://api.github.com/repos/lsst/pipe_tasks/subscribers","subscription_url":"https://api.github.com/repos/lsst/pipe_tasks/subscription","commits_url":"https://api.github.com/repos/lsst/pipe_tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/pipe_tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/pipe_tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/pipe_tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/pipe_tasks/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/pipe_tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/pipe_tasks/merges","archive_url":"https://api.github.com/repos/lsst/pipe_tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/pipe_tasks/downloads","issues_url":"https://api.github.com/repos/lsst/pipe_tasks/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/pipe_tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/pipe_tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/pipe_tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/pipe_tasks/labels{/name}","releases_url":"https://api.github.com/repos/lsst/pipe_tasks/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/pipe_tasks/deployments","created_at":"2014-08-16T07:50:15Z","updated_at":"2016-01-11T18:54:32Z","pushed_at":"2016-02-22T18:18:17Z","git_url":"git://github.com/lsst/pipe_tasks.git","ssh_url":"git@github.com:lsst/pipe_tasks.git","clone_url":"https://github.com/lsst/pipe_tasks.git","svn_url":"https://github.com/lsst/pipe_tasks","homepage":"http://dm.lsst.org/","size":11420,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":8,"forks":4,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29"},"html":{"href":"https://github.com/lsst/pipe_tasks/pull/29"},"issue":{"href":"https://api.github.com/repos/lsst/pipe_tasks/issues/29"},"comments":{"href":"https://api.github.com/repos/lsst/pipe_tasks/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/pipe_tasks/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/pipe_tasks/statuses/87d22ef59c244d378448e4aab34f5ca16953cc84"}}}}