{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/comments/58091293","id":58091293,"diff_hunk":"@@ -0,0 +1,100 @@\n+#\n+# LSST Data Management System\n+# See COPYRIGHT file at the top of the source tree.\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 unittest\n+\n+import lsst.utils.tests\n+import lsst.meas.base.tests\n+from lsst.meas.base.tests import AlgorithmTestCase\n+from lsst.meas.extensions.simpleShape import SimpleShapeResultKey\n+\n+class SimpleShpaeMFTestCase(AlgorithmTestCase):\n+    def setUp(self):\n+        self.bbox = lsst.afw.geom.Box2I(lsst.afw.geom.Point2I(-20, -30),\n+                                        lsst.afw.geom.Extent2I(240, 160))\n+        self.dataset = lsst.meas.base.tests.TestDataset(self.bbox)\n+        self.dataset.addSource(100000.0, lsst.afw.geom.Point2D(149.9, 50.3),\n+                               lsst.afw.geom.ellipses.Quadrupole(8, 9, 3))\n+\n+        self.expectedKeys = ['ext_simpleShape_SimpleShape_IxSigma',\n+                             'ext_simpleShape_SimpleShape_Ix_Iy_Cov',\n+                             'ext_simpleShape_SimpleShape_IxxSigma',\n+                             'ext_simpleShape_SimpleShape_Ixx_Ix_Cov',\n+                             'ext_simpleShape_SimpleShape_Ixx_Ixy_Cov',\n+                             'ext_simpleShape_SimpleShape_Ixx_Iy_Cov',\n+                             'ext_simpleShape_SimpleShape_Ixx_Iyy_Cov',\n+                             'ext_simpleShape_SimpleShape_IxySigma',\n+                             'ext_simpleShape_SimpleShape_Ixy_Ix_Cov',\n+                             'ext_simpleShape_SimpleShape_Ixy_Iy_Cov',\n+                             'ext_simpleShape_SimpleShape_IySigma',\n+                             'ext_simpleShape_SimpleShape_IyySigma',\n+                             'ext_simpleShape_SimpleShape_Iyy_Ix_Cov',\n+                             'ext_simpleShape_SimpleShape_Iyy_Ixy_Cov',\n+                             'ext_simpleShape_SimpleShape_Iyy_Iy_Cov',\n+                             'ext_simpleShape_SimpleShape_flag',\n+                             'ext_simpleShape_SimpleShape_x',\n+                             'ext_simpleShape_SimpleShape_xx',\n+                             'ext_simpleShape_SimpleShape_xy',\n+                             'ext_simpleShape_SimpleShape_y',\n+                             'ext_simpleShape_SimpleShape_yy']\n+\n+        def tearDown(self):\n+            del self.bbox\n+            del self.dataset\n+\n+        def testKeys(self):\n+            \"\"\"\n+            Test that Simple shape will run as a plugin, a functor key can be\n+            created, and result object can be created. Testing of the algorithm\n+            is left to testSimpleShape.py\n+            \"\"\"\n+\n+            task = self.makeSingleFrameMeasurementTask(\"ext_simpleShape_SimpleShape\")\n+            exposure, catalog = self.dataset.realize(10.0, task.schema)\n+            # Check the keys are in the schema\n+            schemaKeys = catalog.schema.getNames()\n+            self.assertTrue(sum([x in schemaKeys for x in self.expectedKeys]) == len(self.expectedKeys))","path":"tests/testMeasurementFramework.py","position":75,"original_position":75,"commit_id":"dc40601b436a9d43bf6171be8d1ce4d06fcc6814","original_commit_id":"dc40601b436a9d43bf6171be8d1ce4d06fcc6814","user":{"login":"natelust","id":6371766,"avatar_url":"https://avatars.githubusercontent.com/u/6371766?v=3","gravatar_id":"","url":"https://api.github.com/users/natelust","html_url":"https://github.com/natelust","followers_url":"https://api.github.com/users/natelust/followers","following_url":"https://api.github.com/users/natelust/following{/other_user}","gists_url":"https://api.github.com/users/natelust/gists{/gist_id}","starred_url":"https://api.github.com/users/natelust/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natelust/subscriptions","organizations_url":"https://api.github.com/users/natelust/orgs","repos_url":"https://api.github.com/users/natelust/repos","events_url":"https://api.github.com/users/natelust/events{/privacy}","received_events_url":"https://api.github.com/users/natelust/received_events","type":"User","site_admin":false},"body":"This is a really great way of doing this, I altered the test to use this code","created_at":"2016-03-31T17:13:37Z","updated_at":"2016-03-31T17:13:37Z","html_url":"https://github.com/lsst/meas_extensions_simpleShape/pull/1#discussion_r58091293","pull_request_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/comments/58091293"},"html":{"href":"https://github.com/lsst/meas_extensions_simpleShape/pull/1#discussion_r58091293"},"pull_request":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1","id":64520440,"html_url":"https://github.com/lsst/meas_extensions_simpleShape/pull/1","diff_url":"https://github.com/lsst/meas_extensions_simpleShape/pull/1.diff","patch_url":"https://github.com/lsst/meas_extensions_simpleShape/pull/1.patch","issue_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/1","number":1,"state":"open","locked":false,"title":"DM-5284","user":{"login":"r-owen","id":874176,"avatar_url":"https://avatars.githubusercontent.com/u/874176?v=3","gravatar_id":"","url":"https://api.github.com/users/r-owen","html_url":"https://github.com/r-owen","followers_url":"https://api.github.com/users/r-owen/followers","following_url":"https://api.github.com/users/r-owen/following{/other_user}","gists_url":"https://api.github.com/users/r-owen/gists{/gist_id}","starred_url":"https://api.github.com/users/r-owen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-owen/subscriptions","organizations_url":"https://api.github.com/users/r-owen/orgs","repos_url":"https://api.github.com/users/r-owen/repos","events_url":"https://api.github.com/users/r-owen/events{/privacy}","received_events_url":"https://api.github.com/users/r-owen/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-29T19:31:50Z","updated_at":"2016-03-31T17:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3912ba6366ca0b972d4be92bf7a683f09b6833fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1/commits","review_comments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1/comments","review_comment_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/1/comments","statuses_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/statuses/dc40601b436a9d43bf6171be8d1ce4d06fcc6814","head":{"label":"lsst:tickets/DM-5284","ref":"tickets/DM-5284","sha":"dc40601b436a9d43bf6171be8d1ce4d06fcc6814","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":37222794,"name":"meas_extensions_simpleShape","full_name":"lsst/meas_extensions_simpleShape","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_extensions_simpleShape","description":"LSST Data Management: Measure second moments with a pre-defined circular Gaussian weighting","fork":false,"url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape","forks_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/forks","keys_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/teams","hooks_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/events","assignees_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/tags","blobs_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/subscription","commits_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/merges","archive_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/downloads","issues_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/deployments","created_at":"2015-06-10T21:09:30Z","updated_at":"2016-03-24T17:43:43Z","pushed_at":"2016-03-29T19:31:51Z","git_url":"git://github.com/lsst/meas_extensions_simpleShape.git","ssh_url":"git@github.com:lsst/meas_extensions_simpleShape.git","clone_url":"https://github.com/lsst/meas_extensions_simpleShape.git","svn_url":"https://github.com/lsst/meas_extensions_simpleShape","homepage":"http://dm.lsst.org/","size":24,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"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":"556670ae1ca6d4c6fbbef52c4837fafb245c00c3","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":37222794,"name":"meas_extensions_simpleShape","full_name":"lsst/meas_extensions_simpleShape","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_extensions_simpleShape","description":"LSST Data Management: Measure second moments with a pre-defined circular Gaussian weighting","fork":false,"url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape","forks_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/forks","keys_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/teams","hooks_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/events","assignees_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/tags","blobs_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/subscription","commits_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/merges","archive_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/downloads","issues_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/releases{/id}","deployments_url":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/deployments","created_at":"2015-06-10T21:09:30Z","updated_at":"2016-03-24T17:43:43Z","pushed_at":"2016-03-29T19:31:51Z","git_url":"git://github.com/lsst/meas_extensions_simpleShape.git","ssh_url":"git@github.com:lsst/meas_extensions_simpleShape.git","clone_url":"https://github.com/lsst/meas_extensions_simpleShape.git","svn_url":"https://github.com/lsst/meas_extensions_simpleShape","homepage":"http://dm.lsst.org/","size":24,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"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_extensions_simpleShape/pulls/1"},"html":{"href":"https://github.com/lsst/meas_extensions_simpleShape/pull/1"},"issue":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/1"},"comments":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/meas_extensions_simpleShape/statuses/dc40601b436a9d43bf6171be8d1ce4d06fcc6814"}}}}