{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/meas_deblender/pulls/comments/26602704","id":26602704,"diff_hunk":"@@ -0,0 +1,131 @@\n+#!/usr/bin/env python\n+#\n+# LSST Data Management System\n+# Copyright 2008-2015 LSST Corporation.\n+#\n+# This product includes software developed by the\n+# LSST Project (http://www.lsst.org/).\n+#\n+# This program is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation, either version 3 of the License, or\n+# (at your option) any later version.\n+#\n+# This program is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the LSST License Statement and\n+# the GNU General Public License along with this program.  If not,\n+# see <http://www.lsstcorp.org/LegalNotices/>.\n+#\n+\n+import os\n+import numpy as np\n+import unittest\n+\n+import lsst.utils.tests\n+import lsst.afw.image as afwImage\n+import lsst.afw.table as afwTable\n+import lsst.afw.display.ds9 as ds9\n+import lsst.meas.algorithms as measAlg\n+from lsst.meas.algorithms.detection import SourceDetectionTask\n+from lsst.meas.base import SingleFrameMeasurementTask\n+import lsst.meas.deblender as measDeb\n+\n+try:\n+    type(display)\n+except NameError:\n+    display = False\n+\n+DATA_DIR = os.path.join(os.environ[\"MEAS_DEBLENDER_DIR\"], \"tests\", \"data\")\n+\n+#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\n+class IncludeTestCase(lsst.utils.tests.TestCase):\n+    \"\"\" Test case for DM-1738: test that include method successfully\n+    expands footprint to include the union of itself and all others provided.\n+\n+    In the current version of meas_deblender, children's Footprints can extend outside\n+    that of the parent.  The replace-by-noise code thus fails to reinstate the pixels\n+    that are outside the parent but within the children.  Calling include() prior\n+    to noise replacement solves this issue.\n+\n+    The test data used here (./data/ticket1738.fits) is a cutout of an HSC observed M31\n+    field in which this pathology occured:\n+    --id field=M31 dateObs=2014-11-24 visit=14770 ccd=27\n+    bbox = afwGeom.Box2I(afwGeom.Point2I(720, 460), afwGeom.Extent2I(301, 301))\n+\n+    See data/ticket1738_noInclude.png or data/ticket1738_noInclude.fits for a visual\n+    of this pathology).\n+\n+    \"\"\"\n+\n+    def setUp(self):\n+        self.calexpOrig = afwImage.ExposureF(os.path.join(DATA_DIR, \"ticket1738.fits\"))\n+        self.calexp = afwImage.ExposureF(os.path.join(DATA_DIR, \"ticket1738.fits\"))\n+        self.psf = self.calexp.getPsf()","path":"tests/testInclude.py","position":67,"original_position":67,"commit_id":"1de2f16c1d0a1773950b5d7ec888e2e28f9822f4","original_commit_id":"1de2f16c1d0a1773950b5d7ec888e2e28f9822f4","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":"Do you really want this reference to the psf? It's not doing any real harm, but as far as I can see it only saves you 7 characters at line 102, but costs you this line, a line in `tearDown`, and means you need to remember to tear it down.","created_at":"2015-03-17T18:41:22Z","updated_at":"2015-03-17T18:41:22Z","html_url":"https://github.com/lsst/meas_deblender/pull/1#discussion_r26602704","pull_request_url":"https://api.github.com/repos/lsst/meas_deblender/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/comments/26602704"},"html":{"href":"https://github.com/lsst/meas_deblender/pull/1#discussion_r26602704"},"pull_request":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/meas_deblender/pulls/1","id":31364576,"html_url":"https://github.com/lsst/meas_deblender/pull/1","diff_url":"https://github.com/lsst/meas_deblender/pull/1.diff","patch_url":"https://github.com/lsst/meas_deblender/pull/1.patch","issue_url":"https://api.github.com/repos/lsst/meas_deblender/issues/1","number":1,"state":"open","locked":false,"title":"U/lauren/dm 1738","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":"PR for review.","created_at":"2015-03-17T18:36:06Z","updated_at":"2015-03-17T18:41:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"969e02cd7cd3ea4106db8095281a257a0d02bc16","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/meas_deblender/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lsst/meas_deblender/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lsst/meas_deblender/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/meas_deblender/issues/1/comments","statuses_url":"https://api.github.com/repos/lsst/meas_deblender/statuses/1de2f16c1d0a1773950b5d7ec888e2e28f9822f4","head":{"label":"lsst:u/lauren/DM-1738","ref":"u/lauren/DM-1738","sha":"1de2f16c1d0a1773950b5d7ec888e2e28f9822f4","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":23013360,"name":"meas_deblender","full_name":"lsst/meas_deblender","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/meas_deblender","description":"LSST Data Management: astronomical source deblender","fork":false,"url":"https://api.github.com/repos/lsst/meas_deblender","forks_url":"https://api.github.com/repos/lsst/meas_deblender/forks","keys_url":"https://api.github.com/repos/lsst/meas_deblender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_deblender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_deblender/teams","hooks_url":"https://api.github.com/repos/lsst/meas_deblender/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_deblender/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_deblender/events","assignees_url":"https://api.github.com/repos/lsst/meas_deblender/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_deblender/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_deblender/tags","blobs_url":"https://api.github.com/repos/lsst/meas_deblender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_deblender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_deblender/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_deblender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_deblender/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_deblender/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_deblender/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_deblender/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_deblender/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_deblender/subscription","commits_url":"https://api.github.com/repos/lsst/meas_deblender/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_deblender/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_deblender/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_deblender/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_deblender/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_deblender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_deblender/merges","archive_url":"https://api.github.com/repos/lsst/meas_deblender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_deblender/downloads","issues_url":"https://api.github.com/repos/lsst/meas_deblender/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_deblender/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_deblender/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_deblender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_deblender/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_deblender/releases{/id}","created_at":"2014-08-16T07:45:49Z","updated_at":"2015-03-17T05:24:18Z","pushed_at":"2015-03-17T15:18:47Z","git_url":"git://github.com/lsst/meas_deblender.git","ssh_url":"git@github.com:lsst/meas_deblender.git","clone_url":"https://github.com/lsst/meas_deblender.git","svn_url":"https://github.com/lsst/meas_deblender","homepage":"http://dm.lsst.org/","size":15401,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:master","ref":"master","sha":"3a0abdfe934cb1d454cec692e072bca4d31aea7f","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":23013360,"name":"meas_deblender","full_name":"lsst/meas_deblender","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/meas_deblender","description":"LSST Data Management: astronomical source deblender","fork":false,"url":"https://api.github.com/repos/lsst/meas_deblender","forks_url":"https://api.github.com/repos/lsst/meas_deblender/forks","keys_url":"https://api.github.com/repos/lsst/meas_deblender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_deblender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_deblender/teams","hooks_url":"https://api.github.com/repos/lsst/meas_deblender/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_deblender/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_deblender/events","assignees_url":"https://api.github.com/repos/lsst/meas_deblender/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_deblender/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_deblender/tags","blobs_url":"https://api.github.com/repos/lsst/meas_deblender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_deblender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_deblender/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_deblender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_deblender/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_deblender/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_deblender/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_deblender/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_deblender/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_deblender/subscription","commits_url":"https://api.github.com/repos/lsst/meas_deblender/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_deblender/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_deblender/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_deblender/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_deblender/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_deblender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_deblender/merges","archive_url":"https://api.github.com/repos/lsst/meas_deblender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_deblender/downloads","issues_url":"https://api.github.com/repos/lsst/meas_deblender/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_deblender/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_deblender/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_deblender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_deblender/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_deblender/releases{/id}","created_at":"2014-08-16T07:45:49Z","updated_at":"2015-03-17T05:24:18Z","pushed_at":"2015-03-17T15:18:47Z","git_url":"git://github.com/lsst/meas_deblender.git","ssh_url":"git@github.com:lsst/meas_deblender.git","clone_url":"https://github.com/lsst/meas_deblender.git","svn_url":"https://github.com/lsst/meas_deblender","homepage":"http://dm.lsst.org/","size":15401,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/1"},"html":{"href":"https://github.com/lsst/meas_deblender/pull/1"},"issue":{"href":"https://api.github.com/repos/lsst/meas_deblender/issues/1"},"comments":{"href":"https://api.github.com/repos/lsst/meas_deblender/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/meas_deblender/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/meas_deblender/statuses/1de2f16c1d0a1773950b5d7ec888e2e28f9822f4"}}}}