{"action":"created","comment":{"url":"https://api.github.com/repos/lsst/meas_base/pulls/comments/47890014","id":47890014,"diff_hunk":"@@ -71,6 +73,72 @@\n                     TransformClass=bl.ApertureFluxTransform, executionOrder=BasePlugin.FLUX_ORDER)\n \n # --- Single-Frame Measurement Plugins ---\n+class SingleFrameFocalPlaneConfig(SingleFramePluginConfig):\n+    pass\n+\n+@register(\"base_FocalPlane\")\n+class SingleFrameFocalPlanePlugin(SingleFramePlugin):\n+    '''\n+    Algorithm to calculate position on focal plane\n+    '''\n+\n+    ConfigClass = SingleFrameFocalPlaneConfig\n+\n+    @classmethod\n+    def getExecutionOrder(cls):\n+        return cls.APCORR_ORDER\n+\n+    def __init__(self, config, name, schema, metadata):\n+        SingleFramePlugin.__init__(self, config, name, schema, metadata)\n+        self.focalValue = lsst.afw.table.Point2DKey.addFields(schema, name, \"Position on the focal plane\",\n+                \"mm\")\n+        self.focalFlag = schema.addField(name + \"_flag\", type=\"Flag\", doc=\"Set to 1 for any fatal Failure\")\n+\n+    def measure(self, measRecord, exposure):\n+        center = measRecord.getCentroid()\n+        det = exposure.getDetector()\n+        if not det:\n+            print('in first')\n+            fp = lsst.afw.geom.Point2D(numpy.nan, numpy.nan)\n+        else:\n+            posInPix = det.makeCameraPoint(center, lsst.afw.cameraGeom.PIXELS)\n+            fp = det.transform(posInPix, lsst.afw.cameraGeom.FOCAL_PLANE).getPoint()\n+        measRecord.set(self.focalValue, fp)\n+\n+    def fail(self, measRecord, error=None):\n+        measRecord.set(self.focalFlag, True)\n+\n+class SingleFrameJacobianConfig(SingleFramePluginConfig):\n+    pixelScale = lsst.pex.config.Field(dtype=float, default=0.5, doc=\"Nominal pixel size (arcsec)\")","path":"python/lsst/meas/base/plugins.py","position":49,"original_position":49,"commit_id":"f9ce718c60d3c20fd500c7bd13c3bb44355c6678","original_commit_id":"f9ce718c60d3c20fd500c7bd13c3bb44355c6678","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":"Thanks for clarifying, @PaulPrice (and kudos to @natelust for suggesting something similar OOB).\r\n\r\nIn fact, when I read a bit further and thought about what's going on here, I think the real issue is that we need a bit more documentation here. So far as I understand it, this algorithm is not actually storing the Jacobian determinant, but rather the ratio between the determinant as derived from the `Wcs` and the expectation based on the user-supplied pixel size. That's probably makes sense, but it needs to be documented as such.","created_at":"2015-12-17T10:25:12Z","updated_at":"2015-12-17T10:25:12Z","html_url":"https://github.com/lsst/meas_base/pull/29#discussion_r47890014","pull_request_url":"https://api.github.com/repos/lsst/meas_base/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/comments/47890014"},"html":{"href":"https://github.com/lsst/meas_base/pull/29#discussion_r47890014"},"pull_request":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/lsst/meas_base/pulls/29","id":52920740,"html_url":"https://github.com/lsst/meas_base/pull/29","diff_url":"https://github.com/lsst/meas_base/pull/29.diff","patch_url":"https://github.com/lsst/meas_base/pull/29.patch","issue_url":"https://api.github.com/repos/lsst/meas_base/issues/29","number":29,"state":"open","locked":false,"title":"Review for DM-4234: Jacobian and focalplane algorithms","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":":warning: This PR is against `tickets/DM-4235` rather than master! :warning:","created_at":"2015-12-08T00:09:28Z","updated_at":"2015-12-17T10:25:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95ef6c292b73dc7aa3f5db3d88e82244efa1bf45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lsst/meas_base/pulls/29/commits","review_comments_url":"https://api.github.com/repos/lsst/meas_base/pulls/29/comments","review_comment_url":"https://api.github.com/repos/lsst/meas_base/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lsst/meas_base/issues/29/comments","statuses_url":"https://api.github.com/repos/lsst/meas_base/statuses/f9ce718c60d3c20fd500c7bd13c3bb44355c6678","head":{"label":"lsst:tickets/DM-4234","ref":"tickets/DM-4234","sha":"f9ce718c60d3c20fd500c7bd13c3bb44355c6678","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":23013356,"name":"meas_base","full_name":"lsst/meas_base","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_base","description":"LSST Data Management: core astronomical measurement algorithms","fork":false,"url":"https://api.github.com/repos/lsst/meas_base","forks_url":"https://api.github.com/repos/lsst/meas_base/forks","keys_url":"https://api.github.com/repos/lsst/meas_base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_base/teams","hooks_url":"https://api.github.com/repos/lsst/meas_base/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_base/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_base/events","assignees_url":"https://api.github.com/repos/lsst/meas_base/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_base/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_base/tags","blobs_url":"https://api.github.com/repos/lsst/meas_base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_base/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_base/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_base/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_base/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_base/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_base/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_base/subscription","commits_url":"https://api.github.com/repos/lsst/meas_base/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_base/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_base/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_base/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_base/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_base/merges","archive_url":"https://api.github.com/repos/lsst/meas_base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_base/downloads","issues_url":"https://api.github.com/repos/lsst/meas_base/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_base/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_base/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_base/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_base/releases{/id}","created_at":"2014-08-16T07:45:37Z","updated_at":"2015-04-21T20:29:36Z","pushed_at":"2015-12-15T20:40:23Z","git_url":"git://github.com/lsst/meas_base.git","ssh_url":"git@github.com:lsst/meas_base.git","clone_url":"https://github.com/lsst/meas_base.git","svn_url":"https://github.com/lsst/meas_base","homepage":"http://dm.lsst.org/","size":2425,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"lsst:tickets/DM-4235","ref":"tickets/DM-4235","sha":"77ac22c2ecfd88e75f5fb6861ef79d441a71d7a9","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":23013356,"name":"meas_base","full_name":"lsst/meas_base","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_base","description":"LSST Data Management: core astronomical measurement algorithms","fork":false,"url":"https://api.github.com/repos/lsst/meas_base","forks_url":"https://api.github.com/repos/lsst/meas_base/forks","keys_url":"https://api.github.com/repos/lsst/meas_base/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lsst/meas_base/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lsst/meas_base/teams","hooks_url":"https://api.github.com/repos/lsst/meas_base/hooks","issue_events_url":"https://api.github.com/repos/lsst/meas_base/issues/events{/number}","events_url":"https://api.github.com/repos/lsst/meas_base/events","assignees_url":"https://api.github.com/repos/lsst/meas_base/assignees{/user}","branches_url":"https://api.github.com/repos/lsst/meas_base/branches{/branch}","tags_url":"https://api.github.com/repos/lsst/meas_base/tags","blobs_url":"https://api.github.com/repos/lsst/meas_base/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lsst/meas_base/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lsst/meas_base/git/refs{/sha}","trees_url":"https://api.github.com/repos/lsst/meas_base/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lsst/meas_base/statuses/{sha}","languages_url":"https://api.github.com/repos/lsst/meas_base/languages","stargazers_url":"https://api.github.com/repos/lsst/meas_base/stargazers","contributors_url":"https://api.github.com/repos/lsst/meas_base/contributors","subscribers_url":"https://api.github.com/repos/lsst/meas_base/subscribers","subscription_url":"https://api.github.com/repos/lsst/meas_base/subscription","commits_url":"https://api.github.com/repos/lsst/meas_base/commits{/sha}","git_commits_url":"https://api.github.com/repos/lsst/meas_base/git/commits{/sha}","comments_url":"https://api.github.com/repos/lsst/meas_base/comments{/number}","issue_comment_url":"https://api.github.com/repos/lsst/meas_base/issues/comments{/number}","contents_url":"https://api.github.com/repos/lsst/meas_base/contents/{+path}","compare_url":"https://api.github.com/repos/lsst/meas_base/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lsst/meas_base/merges","archive_url":"https://api.github.com/repos/lsst/meas_base/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lsst/meas_base/downloads","issues_url":"https://api.github.com/repos/lsst/meas_base/issues{/number}","pulls_url":"https://api.github.com/repos/lsst/meas_base/pulls{/number}","milestones_url":"https://api.github.com/repos/lsst/meas_base/milestones{/number}","notifications_url":"https://api.github.com/repos/lsst/meas_base/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lsst/meas_base/labels{/name}","releases_url":"https://api.github.com/repos/lsst/meas_base/releases{/id}","created_at":"2014-08-16T07:45:37Z","updated_at":"2015-04-21T20:29:36Z","pushed_at":"2015-12-15T20:40:23Z","git_url":"git://github.com/lsst/meas_base.git","ssh_url":"git@github.com:lsst/meas_base.git","clone_url":"https://github.com/lsst/meas_base.git","svn_url":"https://github.com/lsst/meas_base","homepage":"http://dm.lsst.org/","size":2425,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/29"},"html":{"href":"https://github.com/lsst/meas_base/pull/29"},"issue":{"href":"https://api.github.com/repos/lsst/meas_base/issues/29"},"comments":{"href":"https://api.github.com/repos/lsst/meas_base/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lsst/meas_base/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/lsst/meas_base/statuses/f9ce718c60d3c20fd500c7bd13c3bb44355c6678"}}}}