GitHub PullRequestReviewCommentEvent at 2014-12-15 23:34:41
Repository: astropy
Actor: mhvk
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/21867094","id":21867094,"diff_hunk":"@@ -871,3 +871,93 @@ def bootstrap(data, bootnum=100, samples=None, bootfunc=None):\n             boot[i] = bootfunc(data[bootarr])\n \n     return boot\n+\n+\n+def mad_std(data):\n+    \"\"\"\n+    Calculate a robust standard deviation using the `median absolute\n+    deviation (MAD)\n+    <http://en.wikipedia.org/wiki/Median_absolute_deviation>`_.\n+\n+    The standard deviation estimator is given by:\n+\n+    .. math::\n+\n+        \\\\sigma \\\\approx \\\\frac{\\\\textrm{MAD}}{\\Phi^{-1}(3/4)} \\\\approx 1.4826 \\ \\\\textrm{MAD}\n+\n+    where :math:`\\Phi^{-1}(P)` is the normal inverse cumulative\n+    distribution function evaulated at probability :math:`P = 3/4`.\n+\n+    Parameters\n+    ----------\n+    data : array-like\n+        2D data array","path":"astropy/stats/funcs.py","position":35,"original_position":35,"commit_id":"d95f15456b3dd03e96d03afe858687b00b37b90c","original_commit_id":"d95f15456b3dd03e96d03afe858687b00b37b90c","user":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"body":"Why should this be a 2D data array?","created_at":"2014-12-15T23:34:41Z","updated_at":"2014-12-15T23:34:41Z","html_url":"https://github.com/astropy/astropy/pull/3208#discussion_r21867094","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/3208","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/21867094"},"html":{"href":"https://github.com/astropy/astropy/pull/3208#discussion_r21867094"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3208"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/3208","id":26103345,"html_url":"https://github.com/astropy/astropy/pull/3208","diff_url":"https://github.com/astropy/astropy/pull/3208.diff","patch_url":"https://github.com/astropy/astropy/pull/3208.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/3208","number":3208,"state":"open","locked":false,"title":"Add mad_std, fwhm_to_sigma, and sigma_to_fwhm functions","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"body":"This PR adds a standard deviation estimator using MAD, and two simple functions to convert between Gaussian FWHM and sigma.  These calculations were often repeated in `photutils`.\r\n\r\nCC: @cdeil, @astrofrog ","created_at":"2014-12-15T21:34:37Z","updated_at":"2014-12-15T23:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf93e4c0827d47e982f71024345c9b615096ed8c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/3208/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/3208/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/3208/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/d95f15456b3dd03e96d03afe858687b00b37b90c","head":{"label":"larrybradley:stats","ref":"stats","sha":"d95f15456b3dd03e96d03afe858687b00b37b90c","user":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"repo":{"id":13567623,"name":"astropy","full_name":"larrybradley/astropy","owner":{"login":"larrybradley","id":4992897,"avatar_url":"https://avatars.githubusercontent.com/u/4992897?v=3","gravatar_id":"","url":"https://api.github.com/users/larrybradley","html_url":"https://github.com/larrybradley","followers_url":"https://api.github.com/users/larrybradley/followers","following_url":"https://api.github.com/users/larrybradley/following{/other_user}","gists_url":"https://api.github.com/users/larrybradley/gists{/gist_id}","starred_url":"https://api.github.com/users/larrybradley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larrybradley/subscriptions","organizations_url":"https://api.github.com/users/larrybradley/orgs","repos_url":"https://api.github.com/users/larrybradley/repos","events_url":"https://api.github.com/users/larrybradley/events{/privacy}","received_events_url":"https://api.github.com/users/larrybradley/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larrybradley/astropy","description":"Main Astropy repository","fork":true,"url":"https://api.github.com/repos/larrybradley/astropy","forks_url":"https://api.github.com/repos/larrybradley/astropy/forks","keys_url":"https://api.github.com/repos/larrybradley/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larrybradley/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larrybradley/astropy/teams","hooks_url":"https://api.github.com/repos/larrybradley/astropy/hooks","issue_events_url":"https://api.github.com/repos/larrybradley/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/larrybradley/astropy/events","assignees_url":"https://api.github.com/repos/larrybradley/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/larrybradley/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/larrybradley/astropy/tags","blobs_url":"https://api.github.com/repos/larrybradley/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larrybradley/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larrybradley/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/larrybradley/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larrybradley/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/larrybradley/astropy/languages","stargazers_url":"https://api.github.com/repos/larrybradley/astropy/stargazers","contributors_url":"https://api.github.com/repos/larrybradley/astropy/contributors","subscribers_url":"https://api.github.com/repos/larrybradley/astropy/subscribers","subscription_url":"https://api.github.com/repos/larrybradley/astropy/subscription","commits_url":"https://api.github.com/repos/larrybradley/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/larrybradley/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/larrybradley/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/larrybradley/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/larrybradley/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/larrybradley/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larrybradley/astropy/merges","archive_url":"https://api.github.com/repos/larrybradley/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larrybradley/astropy/downloads","issues_url":"https://api.github.com/repos/larrybradley/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/larrybradley/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/larrybradley/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/larrybradley/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larrybradley/astropy/labels{/name}","releases_url":"https://api.github.com/repos/larrybradley/astropy/releases{/id}","created_at":"2013-10-14T17:09:24Z","updated_at":"2014-12-15T22:46:59Z","pushed_at":"2014-12-15T22:46:59Z","git_url":"git://github.com/larrybradley/astropy.git","ssh_url":"git@github.com:larrybradley/astropy.git","clone_url":"https://github.com/larrybradley/astropy.git","svn_url":"https://github.com/larrybradley/astropy","homepage":"astropy.org","size":31425,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"ba6ba97496cbe18a21949bad6f9c41064965ae7f","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments/{number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","created_at":"2011-07-21T01:33:49Z","updated_at":"2014-12-15T23:12:37Z","pushed_at":"2014-12-15T23:12:37Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":62337,"stargazers_count":476,"watchers_count":476,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":324,"mirror_url":null,"open_issues_count":423,"forks":324,"open_issues":423,"watchers":476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3208"},"html":{"href":"https://github.com/astropy/astropy/pull/3208"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/3208"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/3208/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3208/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/3208/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/d95f15456b3dd03e96d03afe858687b00b37b90c"}}}}