{"action":"created","comment":{"url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/comments/83873252","pull_request_review_id":4687305,"id":83873252,"diff_hunk":"@@ -0,0 +1,308 @@\n+from itertools import combinations,permutations\n+\n+import numpy as np\n+\n+from scipy.optimize import minimize\n+\n+from astropy import units as u\n+u.dimless = u.dimensionless_unscaled\n+\n+from ctapipe.utils import linalg\n+\n+from ctapipe.reco.reco_algorithms import RecoShowerGeomAlgorithm\n+from ctapipe.io.containers import RecoShowerGeom\n+\n+\n+\n+__all__ = [\"FitGammaHillas\"]\n+\n+\n+\n+\n+def guessPixDirection(pix_x, pix_y, tel_phi, tel_theta, tel_foclen, camera_rotation=-100.893 * u.degree):\n+    # TODO replace with proper implementation\n+    # beta is the pixel's angular distance to the centre according to beta / tel_view = r / maxR\n+    # alpha is the polar angle between the y-axis and the pixel\n+    # to find the direction the pixel is looking at, \n+    #  - the pixel direction is set to the telescope direction\n+    #  - offset by beta towards up\n+    #  - rotated around the telescope direction by the angle alpha\n+    \n+    pix_alpha = np.arctan2(pix_x, pix_y)\n+    pix_beta  = (pix_x**2 + pix_y**2)**.5\n+\n+    pix_beta  = pix_beta / tel_foclen * u.rad ","path":"ctapipe/reco/FitGammaHillas.py","position":34,"original_position":34,"commit_id":"d15159189f671464c1cac7eb6c5c2a8a2a76a226","original_commit_id":"9ed412b447fd850ef8c897a4fce550b3de377365","user":{"login":"kosack","id":11677812,"avatar_url":"https://avatars.githubusercontent.com/u/11677812?v=3","gravatar_id":"","url":"https://api.github.com/users/kosack","html_url":"https://github.com/kosack","followers_url":"https://api.github.com/users/kosack/followers","following_url":"https://api.github.com/users/kosack/following{/other_user}","gists_url":"https://api.github.com/users/kosack/gists{/gist_id}","starred_url":"https://api.github.com/users/kosack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosack/subscriptions","organizations_url":"https://api.github.com/users/kosack/orgs","repos_url":"https://api.github.com/users/kosack/repos","events_url":"https://api.github.com/users/kosack/events{/privacy}","received_events_url":"https://api.github.com/users/kosack/received_events","type":"User","site_admin":false},"body":"perhaps mark it as deprecated so there is no confusion.  So far we have no specific decorator for that, but you can use the astropy one for now:\r\n```python\r\nfrom astropy.utils.decorators import deprecated\r\n\r\n@deprecated(0.1, \"will be replaced with real coord transform\")\r\ndef func():\r\n    ...\r\n```\r\n","created_at":"2016-10-18T14:56:09Z","updated_at":"2016-10-18T14:56:09Z","html_url":"https://github.com/cta-observatory/ctapipe/pull/233#discussion_r83873252","pull_request_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233","_links":{"self":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/comments/83873252"},"html":{"href":"https://github.com/cta-observatory/ctapipe/pull/233#discussion_r83873252"},"pull_request":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233"}}},"pull_request":{"url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233","id":89780942,"html_url":"https://github.com/cta-observatory/ctapipe/pull/233","diff_url":"https://github.com/cta-observatory/ctapipe/pull/233.diff","patch_url":"https://github.com/cta-observatory/ctapipe/pull/233.patch","issue_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/233","number":233,"state":"open","locked":false,"title":"Shower reco","user":{"login":"TarekHC","id":7864276,"avatar_url":"https://avatars.githubusercontent.com/u/7864276?v=3","gravatar_id":"","url":"https://api.github.com/users/TarekHC","html_url":"https://github.com/TarekHC","followers_url":"https://api.github.com/users/TarekHC/followers","following_url":"https://api.github.com/users/TarekHC/following{/other_user}","gists_url":"https://api.github.com/users/TarekHC/gists{/gist_id}","starred_url":"https://api.github.com/users/TarekHC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TarekHC/subscriptions","organizations_url":"https://api.github.com/users/TarekHC/orgs","repos_url":"https://api.github.com/users/TarekHC/repos","events_url":"https://api.github.com/users/TarekHC/events{/privacy}","received_events_url":"https://api.github.com/users/TarekHC/received_events","type":"User","site_admin":false},"body":"Hi @kosack, @MaxNoe, @tino-michael, please continue discussion (#208) here.\r\n\r\nPull request containing:\r\n- @tino-michael's reconstruction algorithms\r\n- New containers with \"standardised\" outputs\r\n- New base class for reco algorithms (needs to be improved)","created_at":"2016-10-18T09:48:40Z","updated_at":"2016-10-18T14:56:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"893a903e49e9dbd2cb604510525281e821846130","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233/commits","review_comments_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233/comments","review_comment_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/233/comments","statuses_url":"https://api.github.com/repos/cta-observatory/ctapipe/statuses/d15159189f671464c1cac7eb6c5c2a8a2a76a226","head":{"label":"cta-observatory:shower_reco","ref":"shower_reco","sha":"d15159189f671464c1cac7eb6c5c2a8a2a76a226","user":{"login":"cta-observatory","id":13019529,"avatar_url":"https://avatars.githubusercontent.com/u/13019529?v=3","gravatar_id":"","url":"https://api.github.com/users/cta-observatory","html_url":"https://github.com/cta-observatory","followers_url":"https://api.github.com/users/cta-observatory/followers","following_url":"https://api.github.com/users/cta-observatory/following{/other_user}","gists_url":"https://api.github.com/users/cta-observatory/gists{/gist_id}","starred_url":"https://api.github.com/users/cta-observatory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cta-observatory/subscriptions","organizations_url":"https://api.github.com/users/cta-observatory/orgs","repos_url":"https://api.github.com/users/cta-observatory/repos","events_url":"https://api.github.com/users/cta-observatory/events{/privacy}","received_events_url":"https://api.github.com/users/cta-observatory/received_events","type":"Organization","site_admin":false},"repo":{"id":37927055,"name":"ctapipe","full_name":"cta-observatory/ctapipe","owner":{"login":"cta-observatory","id":13019529,"avatar_url":"https://avatars.githubusercontent.com/u/13019529?v=3","gravatar_id":"","url":"https://api.github.com/users/cta-observatory","html_url":"https://github.com/cta-observatory","followers_url":"https://api.github.com/users/cta-observatory/followers","following_url":"https://api.github.com/users/cta-observatory/following{/other_user}","gists_url":"https://api.github.com/users/cta-observatory/gists{/gist_id}","starred_url":"https://api.github.com/users/cta-observatory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cta-observatory/subscriptions","organizations_url":"https://api.github.com/users/cta-observatory/orgs","repos_url":"https://api.github.com/users/cta-observatory/repos","events_url":"https://api.github.com/users/cta-observatory/events{/privacy}","received_events_url":"https://api.github.com/users/cta-observatory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cta-observatory/ctapipe","description":"CTA Python pipeline experimental version","fork":false,"url":"https://api.github.com/repos/cta-observatory/ctapipe","forks_url":"https://api.github.com/repos/cta-observatory/ctapipe/forks","keys_url":"https://api.github.com/repos/cta-observatory/ctapipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cta-observatory/ctapipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cta-observatory/ctapipe/teams","hooks_url":"https://api.github.com/repos/cta-observatory/ctapipe/hooks","issue_events_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/events{/number}","events_url":"https://api.github.com/repos/cta-observatory/ctapipe/events","assignees_url":"https://api.github.com/repos/cta-observatory/ctapipe/assignees{/user}","branches_url":"https://api.github.com/repos/cta-observatory/ctapipe/branches{/branch}","tags_url":"https://api.github.com/repos/cta-observatory/ctapipe/tags","blobs_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cta-observatory/ctapipe/statuses/{sha}","languages_url":"https://api.github.com/repos/cta-observatory/ctapipe/languages","stargazers_url":"https://api.github.com/repos/cta-observatory/ctapipe/stargazers","contributors_url":"https://api.github.com/repos/cta-observatory/ctapipe/contributors","subscribers_url":"https://api.github.com/repos/cta-observatory/ctapipe/subscribers","subscription_url":"https://api.github.com/repos/cta-observatory/ctapipe/subscription","commits_url":"https://api.github.com/repos/cta-observatory/ctapipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/cta-observatory/ctapipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/cta-observatory/ctapipe/contents/{+path}","compare_url":"https://api.github.com/repos/cta-observatory/ctapipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cta-observatory/ctapipe/merges","archive_url":"https://api.github.com/repos/cta-observatory/ctapipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cta-observatory/ctapipe/downloads","issues_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues{/number}","pulls_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls{/number}","milestones_url":"https://api.github.com/repos/cta-observatory/ctapipe/milestones{/number}","notifications_url":"https://api.github.com/repos/cta-observatory/ctapipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cta-observatory/ctapipe/labels{/name}","releases_url":"https://api.github.com/repos/cta-observatory/ctapipe/releases{/id}","deployments_url":"https://api.github.com/repos/cta-observatory/ctapipe/deployments","created_at":"2015-06-23T15:18:48Z","updated_at":"2016-08-31T21:54:13Z","pushed_at":"2016-10-18T14:44:46Z","git_url":"git://github.com/cta-observatory/ctapipe.git","ssh_url":"git@github.com:cta-observatory/ctapipe.git","clone_url":"https://github.com/cta-observatory/ctapipe.git","svn_url":"https://github.com/cta-observatory/ctapipe","homepage":"https://cta-observatory.github.io/ctapipe/","size":15755,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":51,"mirror_url":null,"open_issues_count":52,"forks":51,"open_issues":52,"watchers":7,"default_branch":"master"}},"base":{"label":"cta-observatory:master","ref":"master","sha":"f814e9d702e91da4f44c145fc33debfdb164ceea","user":{"login":"cta-observatory","id":13019529,"avatar_url":"https://avatars.githubusercontent.com/u/13019529?v=3","gravatar_id":"","url":"https://api.github.com/users/cta-observatory","html_url":"https://github.com/cta-observatory","followers_url":"https://api.github.com/users/cta-observatory/followers","following_url":"https://api.github.com/users/cta-observatory/following{/other_user}","gists_url":"https://api.github.com/users/cta-observatory/gists{/gist_id}","starred_url":"https://api.github.com/users/cta-observatory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cta-observatory/subscriptions","organizations_url":"https://api.github.com/users/cta-observatory/orgs","repos_url":"https://api.github.com/users/cta-observatory/repos","events_url":"https://api.github.com/users/cta-observatory/events{/privacy}","received_events_url":"https://api.github.com/users/cta-observatory/received_events","type":"Organization","site_admin":false},"repo":{"id":37927055,"name":"ctapipe","full_name":"cta-observatory/ctapipe","owner":{"login":"cta-observatory","id":13019529,"avatar_url":"https://avatars.githubusercontent.com/u/13019529?v=3","gravatar_id":"","url":"https://api.github.com/users/cta-observatory","html_url":"https://github.com/cta-observatory","followers_url":"https://api.github.com/users/cta-observatory/followers","following_url":"https://api.github.com/users/cta-observatory/following{/other_user}","gists_url":"https://api.github.com/users/cta-observatory/gists{/gist_id}","starred_url":"https://api.github.com/users/cta-observatory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cta-observatory/subscriptions","organizations_url":"https://api.github.com/users/cta-observatory/orgs","repos_url":"https://api.github.com/users/cta-observatory/repos","events_url":"https://api.github.com/users/cta-observatory/events{/privacy}","received_events_url":"https://api.github.com/users/cta-observatory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cta-observatory/ctapipe","description":"CTA Python pipeline experimental version","fork":false,"url":"https://api.github.com/repos/cta-observatory/ctapipe","forks_url":"https://api.github.com/repos/cta-observatory/ctapipe/forks","keys_url":"https://api.github.com/repos/cta-observatory/ctapipe/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cta-observatory/ctapipe/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cta-observatory/ctapipe/teams","hooks_url":"https://api.github.com/repos/cta-observatory/ctapipe/hooks","issue_events_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/events{/number}","events_url":"https://api.github.com/repos/cta-observatory/ctapipe/events","assignees_url":"https://api.github.com/repos/cta-observatory/ctapipe/assignees{/user}","branches_url":"https://api.github.com/repos/cta-observatory/ctapipe/branches{/branch}","tags_url":"https://api.github.com/repos/cta-observatory/ctapipe/tags","blobs_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/refs{/sha}","trees_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cta-observatory/ctapipe/statuses/{sha}","languages_url":"https://api.github.com/repos/cta-observatory/ctapipe/languages","stargazers_url":"https://api.github.com/repos/cta-observatory/ctapipe/stargazers","contributors_url":"https://api.github.com/repos/cta-observatory/ctapipe/contributors","subscribers_url":"https://api.github.com/repos/cta-observatory/ctapipe/subscribers","subscription_url":"https://api.github.com/repos/cta-observatory/ctapipe/subscription","commits_url":"https://api.github.com/repos/cta-observatory/ctapipe/commits{/sha}","git_commits_url":"https://api.github.com/repos/cta-observatory/ctapipe/git/commits{/sha}","comments_url":"https://api.github.com/repos/cta-observatory/ctapipe/comments{/number}","issue_comment_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues/comments{/number}","contents_url":"https://api.github.com/repos/cta-observatory/ctapipe/contents/{+path}","compare_url":"https://api.github.com/repos/cta-observatory/ctapipe/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cta-observatory/ctapipe/merges","archive_url":"https://api.github.com/repos/cta-observatory/ctapipe/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cta-observatory/ctapipe/downloads","issues_url":"https://api.github.com/repos/cta-observatory/ctapipe/issues{/number}","pulls_url":"https://api.github.com/repos/cta-observatory/ctapipe/pulls{/number}","milestones_url":"https://api.github.com/repos/cta-observatory/ctapipe/milestones{/number}","notifications_url":"https://api.github.com/repos/cta-observatory/ctapipe/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cta-observatory/ctapipe/labels{/name}","releases_url":"https://api.github.com/repos/cta-observatory/ctapipe/releases{/id}","deployments_url":"https://api.github.com/repos/cta-observatory/ctapipe/deployments","created_at":"2015-06-23T15:18:48Z","updated_at":"2016-08-31T21:54:13Z","pushed_at":"2016-10-18T14:44:46Z","git_url":"git://github.com/cta-observatory/ctapipe.git","ssh_url":"git@github.com:cta-observatory/ctapipe.git","clone_url":"https://github.com/cta-observatory/ctapipe.git","svn_url":"https://github.com/cta-observatory/ctapipe","homepage":"https://cta-observatory.github.io/ctapipe/","size":15755,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":51,"mirror_url":null,"open_issues_count":52,"forks":51,"open_issues":52,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233"},"html":{"href":"https://github.com/cta-observatory/ctapipe/pull/233"},"issue":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/issues/233"},"comments":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/issues/233/comments"},"review_comments":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233/comments"},"review_comment":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/pulls/233/commits"},"statuses":{"href":"https://api.github.com/repos/cta-observatory/ctapipe/statuses/d15159189f671464c1cac7eb6c5c2a8a2a76a226"}}}}
{"actor":{"display_login":"kosack"}}