{"action":"created","comment":{"url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/comments/192822800","pull_request_review_id":125668831,"id":192822800,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjgyMjgwMA==","diff_hunk":"@@ -176,10 +177,45 @@ def select_ri_guide_stars(ra, dec, cone_stars):\n     return G_RI_CAT_CACHE[id_key]\n \n \n-def t_lose_star(mag, ref_mag=10.3, ref_tccd=-11.5, scale_4c=None):\n+def guide_count(mags, tccd=-10.2):\n+    \"\"\"\n+    Given mags from guide stars and a temperature, calculate a guide star\n+    count using signal-to-noise scaled mag thresholds.\n+    \"\"\"\n+    thresh1 = snr_mag_for_tccd(tccd, ref_mag=10.0)\n+    thresh2 = snr_mag_for_tccd(tccd, ref_mag=10.2)\n+    thresh3 = snr_mag_for_tccd(tccd, ref_mag=10.3)\n+    counts = np.zeros_like(mags)\n+    counts[mags <= thresh1] = 1.0\n+    counts[(mags <= thresh2) & (mags > thresh1)] = 0.75\n+    counts[(mags <= thresh3) & (mags > thresh2)] = 0.5\n+    return np.sum(counts)\n+\n+\n+def snr_mag_for_tccd(tccd, ref_mag=10.3, ref_tccd=-10.2, scale_4c=None):","path":"aca_lts_eval.py","position":28,"original_position":28,"commit_id":"175624ca28297e263c324e7fc05cb7067236825e","original_commit_id":"175624ca28297e263c324e7fc05cb7067236825e","user":{"login":"taldcroft","id":348089,"node_id":"MDQ6VXNlcjM0ODA4OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/348089?v=4","gravatar_id":"","url":"https://api.github.com/users/taldcroft","html_url":"https://github.com/taldcroft","followers_url":"https://api.github.com/users/taldcroft/followers","following_url":"https://api.github.com/users/taldcroft/following{/other_user}","gists_url":"https://api.github.com/users/taldcroft/gists{/gist_id}","starred_url":"https://api.github.com/users/taldcroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/taldcroft/subscriptions","organizations_url":"https://api.github.com/users/taldcroft/orgs","repos_url":"https://api.github.com/users/taldcroft/repos","events_url":"https://api.github.com/users/taldcroft/events{/privacy}","received_events_url":"https://api.github.com/users/taldcroft/received_events","type":"User","site_admin":false},"body":"Same comment before, better to not have kwarg defaults for `ref_mag` and `ref_t_ccd` since they aren't unique and it is better to have calling code always provide values.","created_at":"2018-06-04T17:37:32Z","updated_at":"2018-06-04T17:43:50Z","html_url":"https://github.com/sot/aca_lts_eval/pull/44#discussion_r192822800","pull_request_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/comments/192822800"},"html":{"href":"https://github.com/sot/aca_lts_eval/pull/44#discussion_r192822800"},"pull_request":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44"}}},"pull_request":{"url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44","id":190165878,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwMTY1ODc4","html_url":"https://github.com/sot/aca_lts_eval/pull/44","diff_url":"https://github.com/sot/aca_lts_eval/pull/44.diff","patch_url":"https://github.com/sot/aca_lts_eval/pull/44.patch","issue_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/44","number":44,"state":"open","locked":false,"title":"Use scaled/snr star counts as guide star metric","user":{"login":"jeanconn","id":791508,"node_id":"MDQ6VXNlcjc5MTUwOA==","avatar_url":"https://avatars1.githubusercontent.com/u/791508?v=4","gravatar_id":"","url":"https://api.github.com/users/jeanconn","html_url":"https://github.com/jeanconn","followers_url":"https://api.github.com/users/jeanconn/followers","following_url":"https://api.github.com/users/jeanconn/following{/other_user}","gists_url":"https://api.github.com/users/jeanconn/gists{/gist_id}","starred_url":"https://api.github.com/users/jeanconn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeanconn/subscriptions","organizations_url":"https://api.github.com/users/jeanconn/orgs","repos_url":"https://api.github.com/users/jeanconn/repos","events_url":"https://api.github.com/users/jeanconn/events{/privacy}","received_events_url":"https://api.github.com/users/jeanconn/received_events","type":"User","site_admin":false},"body":"Use a guide star fractional count based on temperature scaled mag thresholds to determine a \"warmest allowed\" temperature for the guide star catalog.","created_at":"2018-05-24T04:19:00Z","updated_at":"2018-06-04T17:43:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6c9ede9c18c4a7d2cc8943903a45026042c5487","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44/commits","review_comments_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44/comments","review_comment_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/44/comments","statuses_url":"https://api.github.com/repos/sot/aca_lts_eval/statuses/175624ca28297e263c324e7fc05cb7067236825e","head":{"label":"sot:star_counts","ref":"star_counts","sha":"175624ca28297e263c324e7fc05cb7067236825e","user":{"login":"sot","id":781587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MTU4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/781587?v=4","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":39213939,"node_id":"MDEwOlJlcG9zaXRvcnkzOTIxMzkzOQ==","name":"aca_lts_eval","full_name":"sot/aca_lts_eval","owner":{"login":"sot","id":781587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MTU4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/781587?v=4","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/aca_lts_eval","description":null,"fork":false,"url":"https://api.github.com/repos/sot/aca_lts_eval","forks_url":"https://api.github.com/repos/sot/aca_lts_eval/forks","keys_url":"https://api.github.com/repos/sot/aca_lts_eval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/aca_lts_eval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/aca_lts_eval/teams","hooks_url":"https://api.github.com/repos/sot/aca_lts_eval/hooks","issue_events_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/events{/number}","events_url":"https://api.github.com/repos/sot/aca_lts_eval/events","assignees_url":"https://api.github.com/repos/sot/aca_lts_eval/assignees{/user}","branches_url":"https://api.github.com/repos/sot/aca_lts_eval/branches{/branch}","tags_url":"https://api.github.com/repos/sot/aca_lts_eval/tags","blobs_url":"https://api.github.com/repos/sot/aca_lts_eval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/aca_lts_eval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/aca_lts_eval/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/aca_lts_eval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/aca_lts_eval/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/aca_lts_eval/languages","stargazers_url":"https://api.github.com/repos/sot/aca_lts_eval/stargazers","contributors_url":"https://api.github.com/repos/sot/aca_lts_eval/contributors","subscribers_url":"https://api.github.com/repos/sot/aca_lts_eval/subscribers","subscription_url":"https://api.github.com/repos/sot/aca_lts_eval/subscription","commits_url":"https://api.github.com/repos/sot/aca_lts_eval/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/aca_lts_eval/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/aca_lts_eval/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/aca_lts_eval/contents/{+path}","compare_url":"https://api.github.com/repos/sot/aca_lts_eval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/aca_lts_eval/merges","archive_url":"https://api.github.com/repos/sot/aca_lts_eval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/aca_lts_eval/downloads","issues_url":"https://api.github.com/repos/sot/aca_lts_eval/issues{/number}","pulls_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/aca_lts_eval/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/aca_lts_eval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/aca_lts_eval/labels{/name}","releases_url":"https://api.github.com/repos/sot/aca_lts_eval/releases{/id}","deployments_url":"https://api.github.com/repos/sot/aca_lts_eval/deployments","created_at":"2015-07-16T18:38:10Z","updated_at":"2018-04-27T14:25:22Z","pushed_at":"2018-06-04T17:15:17Z","git_url":"git://github.com/sot/aca_lts_eval.git","ssh_url":"git@github.com:sot/aca_lts_eval.git","clone_url":"https://github.com/sot/aca_lts_eval.git","svn_url":"https://github.com/sot/aca_lts_eval","homepage":null,"size":165,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"base":{"label":"sot:master","ref":"master","sha":"6db801cf20accba6829bc106c8a245711eece503","user":{"login":"sot","id":781587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MTU4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/781587?v=4","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"repo":{"id":39213939,"node_id":"MDEwOlJlcG9zaXRvcnkzOTIxMzkzOQ==","name":"aca_lts_eval","full_name":"sot/aca_lts_eval","owner":{"login":"sot","id":781587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc4MTU4Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/781587?v=4","gravatar_id":"","url":"https://api.github.com/users/sot","html_url":"https://github.com/sot","followers_url":"https://api.github.com/users/sot/followers","following_url":"https://api.github.com/users/sot/following{/other_user}","gists_url":"https://api.github.com/users/sot/gists{/gist_id}","starred_url":"https://api.github.com/users/sot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sot/subscriptions","organizations_url":"https://api.github.com/users/sot/orgs","repos_url":"https://api.github.com/users/sot/repos","events_url":"https://api.github.com/users/sot/events{/privacy}","received_events_url":"https://api.github.com/users/sot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sot/aca_lts_eval","description":null,"fork":false,"url":"https://api.github.com/repos/sot/aca_lts_eval","forks_url":"https://api.github.com/repos/sot/aca_lts_eval/forks","keys_url":"https://api.github.com/repos/sot/aca_lts_eval/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sot/aca_lts_eval/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sot/aca_lts_eval/teams","hooks_url":"https://api.github.com/repos/sot/aca_lts_eval/hooks","issue_events_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/events{/number}","events_url":"https://api.github.com/repos/sot/aca_lts_eval/events","assignees_url":"https://api.github.com/repos/sot/aca_lts_eval/assignees{/user}","branches_url":"https://api.github.com/repos/sot/aca_lts_eval/branches{/branch}","tags_url":"https://api.github.com/repos/sot/aca_lts_eval/tags","blobs_url":"https://api.github.com/repos/sot/aca_lts_eval/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sot/aca_lts_eval/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sot/aca_lts_eval/git/refs{/sha}","trees_url":"https://api.github.com/repos/sot/aca_lts_eval/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sot/aca_lts_eval/statuses/{sha}","languages_url":"https://api.github.com/repos/sot/aca_lts_eval/languages","stargazers_url":"https://api.github.com/repos/sot/aca_lts_eval/stargazers","contributors_url":"https://api.github.com/repos/sot/aca_lts_eval/contributors","subscribers_url":"https://api.github.com/repos/sot/aca_lts_eval/subscribers","subscription_url":"https://api.github.com/repos/sot/aca_lts_eval/subscription","commits_url":"https://api.github.com/repos/sot/aca_lts_eval/commits{/sha}","git_commits_url":"https://api.github.com/repos/sot/aca_lts_eval/git/commits{/sha}","comments_url":"https://api.github.com/repos/sot/aca_lts_eval/comments{/number}","issue_comment_url":"https://api.github.com/repos/sot/aca_lts_eval/issues/comments{/number}","contents_url":"https://api.github.com/repos/sot/aca_lts_eval/contents/{+path}","compare_url":"https://api.github.com/repos/sot/aca_lts_eval/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sot/aca_lts_eval/merges","archive_url":"https://api.github.com/repos/sot/aca_lts_eval/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sot/aca_lts_eval/downloads","issues_url":"https://api.github.com/repos/sot/aca_lts_eval/issues{/number}","pulls_url":"https://api.github.com/repos/sot/aca_lts_eval/pulls{/number}","milestones_url":"https://api.github.com/repos/sot/aca_lts_eval/milestones{/number}","notifications_url":"https://api.github.com/repos/sot/aca_lts_eval/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sot/aca_lts_eval/labels{/name}","releases_url":"https://api.github.com/repos/sot/aca_lts_eval/releases{/id}","deployments_url":"https://api.github.com/repos/sot/aca_lts_eval/deployments","created_at":"2015-07-16T18:38:10Z","updated_at":"2018-04-27T14:25:22Z","pushed_at":"2018-06-04T17:15:17Z","git_url":"git://github.com/sot/aca_lts_eval.git","ssh_url":"git@github.com:sot/aca_lts_eval.git","clone_url":"https://github.com/sot/aca_lts_eval.git","svn_url":"https://github.com/sot/aca_lts_eval","homepage":null,"size":165,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":12,"license":null,"forks":0,"open_issues":12,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44"},"html":{"href":"https://github.com/sot/aca_lts_eval/pull/44"},"issue":{"href":"https://api.github.com/repos/sot/aca_lts_eval/issues/44"},"comments":{"href":"https://api.github.com/repos/sot/aca_lts_eval/issues/44/comments"},"review_comments":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44/comments"},"review_comment":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sot/aca_lts_eval/pulls/44/commits"},"statuses":{"href":"https://api.github.com/repos/sot/aca_lts_eval/statuses/175624ca28297e263c324e7fc05cb7067236825e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"taldcroft"}}