{"action":"created","comment":{"url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments/79200303","id":79200303,"diff_hunk":"@@ -66,3 +70,190 @@ def calculate_snr_from_reflectivity(\n     snr_dict = get_metadata(snr_field)\n     snr_dict['data'] = pseudo_power - noise_floor_estimate\n     return snr_dict\n+\n+\n+def compute_noisedBZ(nrays, noisedBZ_val, range, ref_dist,\n+                     noise_field=None):\n+    \"\"\"\n+    Computes noise in dBZ from reference noise value.\n+\n+    Parameters\n+    ----------\n+    nrays: int\n+        number of rays in the reflectivity field\n+\n+    noisedBZ_val: float\n+        Estimated noise value in dBZ at reference distance\n+\n+    range: np array of floats\n+        range vector in m\n+\n+    ref_dist: float\n+        reference distance in Km\n+\n+    noise_field: str\n+        name of the noise field to use\n+\n+    Returns\n+    -------\n+    noisedBZ : dict\n+        the noise field\n+\n+    \"\"\"\n+    # parse the field parameters\n+    if noise_field is None:\n+        noise_field = get_field_name('noisedBZ_hh')\n+\n+    noisedBZ_vec = noisedBZ_val+20.*np.ma.log10(1e-3*range/ref_dist)\n+\n+    noisedBZ = get_metadata(noise_field)\n+    noisedBZ['data'] = np.tile(noisedBZ_vec, (nrays, 1))\n+#    noisedBZ['data'].set_fill_value(get_fillvalue())","path":"pyart/retrieve/simple_moment_calculations.py","position":60,"original_position":60,"commit_id":"bebccd18c29482c8ebcda14d307283e0ab104ea3","original_commit_id":"bebccd18c29482c8ebcda14d307283e0ab104ea3","user":{"login":"jjhelmus","id":1050278,"avatar_url":"https://avatars.githubusercontent.com/u/1050278?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"body":"Can you remove this line, dead code is not good to include.","created_at":"2016-09-16T16:06:12Z","updated_at":"2016-09-16T16:06:12Z","html_url":"https://github.com/ARM-DOE/pyart/pull/583#discussion_r79200303","pull_request_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583","_links":{"self":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments/79200303"},"html":{"href":"https://github.com/ARM-DOE/pyart/pull/583#discussion_r79200303"},"pull_request":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583"}}},"pull_request":{"url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583","id":82683829,"html_url":"https://github.com/ARM-DOE/pyart/pull/583","diff_url":"https://github.com/ARM-DOE/pyart/pull/583.diff","patch_url":"https://github.com/ARM-DOE/pyart/pull/583.patch","issue_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/583","number":583,"state":"open","locked":false,"title":"Computation of secondary moments, noise correction of RhoHV and pseudo-PPI from RHI volume","user":{"login":"jfigui","id":20207535,"avatar_url":"https://avatars.githubusercontent.com/u/20207535?v=3","gravatar_id":"","url":"https://api.github.com/users/jfigui","html_url":"https://github.com/jfigui","followers_url":"https://api.github.com/users/jfigui/followers","following_url":"https://api.github.com/users/jfigui/following{/other_user}","gists_url":"https://api.github.com/users/jfigui/gists{/gist_id}","starred_url":"https://api.github.com/users/jfigui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfigui/subscriptions","organizations_url":"https://api.github.com/users/jfigui/orgs","repos_url":"https://api.github.com/users/jfigui/repos","events_url":"https://api.github.com/users/jfigui/events{/privacy}","received_events_url":"https://api.github.com/users/jfigui/received_events","type":"User","site_admin":false},"body":"Dear Py-ART users,\r\n\r\nI have added the following functionalities to Py-ART:\r\n- A correction of RhoHV for noise in correct/noise.py\r\n- The computation of the new fields: noise in dBZ, signal to noise ratio, logarithmic RhoHv (L parameter), and circular depolarization ratio in retrieve/simple_moment_calculations.\r\n- A cross-section of a volume of RHIs along particular azimuths (pseudo-PPI) in util/xsect.py\r\n\r\n@jjhelmus, I think we should set standard names for the new fields.\r\n\r\nLet me know if you think these new functionalities can be implemented in Py-ART and are up to standard.\r\n\r\nGreetings from Switzerland,\r\n\r\n\r\nJordi\r\n","created_at":"2016-08-25T09:16:28Z","updated_at":"2016-09-16T16:06:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4483d05a7ffa1aa3a8431c77a7901ca590e808f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583/commits","review_comments_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583/comments","review_comment_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/583/comments","statuses_url":"https://api.github.com/repos/ARM-DOE/pyart/statuses/bebccd18c29482c8ebcda14d307283e0ab104ea3","head":{"label":"meteoswiss-mdr:master","ref":"master","sha":"bebccd18c29482c8ebcda14d307283e0ab104ea3","user":{"login":"meteoswiss-mdr","id":16132533,"avatar_url":"https://avatars.githubusercontent.com/u/16132533?v=3","gravatar_id":"","url":"https://api.github.com/users/meteoswiss-mdr","html_url":"https://github.com/meteoswiss-mdr","followers_url":"https://api.github.com/users/meteoswiss-mdr/followers","following_url":"https://api.github.com/users/meteoswiss-mdr/following{/other_user}","gists_url":"https://api.github.com/users/meteoswiss-mdr/gists{/gist_id}","starred_url":"https://api.github.com/users/meteoswiss-mdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteoswiss-mdr/subscriptions","organizations_url":"https://api.github.com/users/meteoswiss-mdr/orgs","repos_url":"https://api.github.com/users/meteoswiss-mdr/repos","events_url":"https://api.github.com/users/meteoswiss-mdr/events{/privacy}","received_events_url":"https://api.github.com/users/meteoswiss-mdr/received_events","type":"User","site_admin":false},"repo":{"id":62229206,"name":"pyart","full_name":"meteoswiss-mdr/pyart","owner":{"login":"meteoswiss-mdr","id":16132533,"avatar_url":"https://avatars.githubusercontent.com/u/16132533?v=3","gravatar_id":"","url":"https://api.github.com/users/meteoswiss-mdr","html_url":"https://github.com/meteoswiss-mdr","followers_url":"https://api.github.com/users/meteoswiss-mdr/followers","following_url":"https://api.github.com/users/meteoswiss-mdr/following{/other_user}","gists_url":"https://api.github.com/users/meteoswiss-mdr/gists{/gist_id}","starred_url":"https://api.github.com/users/meteoswiss-mdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meteoswiss-mdr/subscriptions","organizations_url":"https://api.github.com/users/meteoswiss-mdr/orgs","repos_url":"https://api.github.com/users/meteoswiss-mdr/repos","events_url":"https://api.github.com/users/meteoswiss-mdr/events{/privacy}","received_events_url":"https://api.github.com/users/meteoswiss-mdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/meteoswiss-mdr/pyart","description":"The Python-ARM Radar Toolkit. A data model driven interactive toolkit for working with weather radar data. ","fork":true,"url":"https://api.github.com/repos/meteoswiss-mdr/pyart","forks_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/forks","keys_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/teams","hooks_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/hooks","issue_events_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/issues/events{/number}","events_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/events","assignees_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/assignees{/user}","branches_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/branches{/branch}","tags_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/tags","blobs_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/git/refs{/sha}","trees_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/statuses/{sha}","languages_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/languages","stargazers_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/stargazers","contributors_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/contributors","subscribers_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/subscribers","subscription_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/subscription","commits_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/commits{/sha}","git_commits_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/git/commits{/sha}","comments_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/comments{/number}","issue_comment_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/issues/comments{/number}","contents_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/contents/{+path}","compare_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/merges","archive_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/downloads","issues_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/issues{/number}","pulls_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/pulls{/number}","milestones_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/milestones{/number}","notifications_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/labels{/name}","releases_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/releases{/id}","deployments_url":"https://api.github.com/repos/meteoswiss-mdr/pyart/deployments","created_at":"2016-06-29T13:46:13Z","updated_at":"2016-08-25T13:47:57Z","pushed_at":"2016-09-16T13:50:17Z","git_url":"git://github.com/meteoswiss-mdr/pyart.git","ssh_url":"git@github.com:meteoswiss-mdr/pyart.git","clone_url":"https://github.com/meteoswiss-mdr/pyart.git","svn_url":"https://github.com/meteoswiss-mdr/pyart","homepage":"http://arm-doe.github.io/pyart/","size":67587,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"ARM-DOE:master","ref":"master","sha":"dc37975ed9cb6c12c3f278c64190e05f3cb68292","user":{"login":"ARM-DOE","id":2540600,"avatar_url":"https://avatars.githubusercontent.com/u/2540600?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-DOE","html_url":"https://github.com/ARM-DOE","followers_url":"https://api.github.com/users/ARM-DOE/followers","following_url":"https://api.github.com/users/ARM-DOE/following{/other_user}","gists_url":"https://api.github.com/users/ARM-DOE/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-DOE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-DOE/subscriptions","organizations_url":"https://api.github.com/users/ARM-DOE/orgs","repos_url":"https://api.github.com/users/ARM-DOE/repos","events_url":"https://api.github.com/users/ARM-DOE/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-DOE/received_events","type":"Organization","site_admin":false},"repo":{"id":6248645,"name":"pyart","full_name":"ARM-DOE/pyart","owner":{"login":"ARM-DOE","id":2540600,"avatar_url":"https://avatars.githubusercontent.com/u/2540600?v=3","gravatar_id":"","url":"https://api.github.com/users/ARM-DOE","html_url":"https://github.com/ARM-DOE","followers_url":"https://api.github.com/users/ARM-DOE/followers","following_url":"https://api.github.com/users/ARM-DOE/following{/other_user}","gists_url":"https://api.github.com/users/ARM-DOE/gists{/gist_id}","starred_url":"https://api.github.com/users/ARM-DOE/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARM-DOE/subscriptions","organizations_url":"https://api.github.com/users/ARM-DOE/orgs","repos_url":"https://api.github.com/users/ARM-DOE/repos","events_url":"https://api.github.com/users/ARM-DOE/events{/privacy}","received_events_url":"https://api.github.com/users/ARM-DOE/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARM-DOE/pyart","description":"The Python-ARM Radar Toolkit. A data model driven interactive toolkit for working with weather radar data. ","fork":false,"url":"https://api.github.com/repos/ARM-DOE/pyart","forks_url":"https://api.github.com/repos/ARM-DOE/pyart/forks","keys_url":"https://api.github.com/repos/ARM-DOE/pyart/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARM-DOE/pyart/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARM-DOE/pyart/teams","hooks_url":"https://api.github.com/repos/ARM-DOE/pyart/hooks","issue_events_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/events{/number}","events_url":"https://api.github.com/repos/ARM-DOE/pyart/events","assignees_url":"https://api.github.com/repos/ARM-DOE/pyart/assignees{/user}","branches_url":"https://api.github.com/repos/ARM-DOE/pyart/branches{/branch}","tags_url":"https://api.github.com/repos/ARM-DOE/pyart/tags","blobs_url":"https://api.github.com/repos/ARM-DOE/pyart/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARM-DOE/pyart/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARM-DOE/pyart/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARM-DOE/pyart/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARM-DOE/pyart/statuses/{sha}","languages_url":"https://api.github.com/repos/ARM-DOE/pyart/languages","stargazers_url":"https://api.github.com/repos/ARM-DOE/pyart/stargazers","contributors_url":"https://api.github.com/repos/ARM-DOE/pyart/contributors","subscribers_url":"https://api.github.com/repos/ARM-DOE/pyart/subscribers","subscription_url":"https://api.github.com/repos/ARM-DOE/pyart/subscription","commits_url":"https://api.github.com/repos/ARM-DOE/pyart/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARM-DOE/pyart/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARM-DOE/pyart/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARM-DOE/pyart/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARM-DOE/pyart/contents/{+path}","compare_url":"https://api.github.com/repos/ARM-DOE/pyart/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARM-DOE/pyart/merges","archive_url":"https://api.github.com/repos/ARM-DOE/pyart/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARM-DOE/pyart/downloads","issues_url":"https://api.github.com/repos/ARM-DOE/pyart/issues{/number}","pulls_url":"https://api.github.com/repos/ARM-DOE/pyart/pulls{/number}","milestones_url":"https://api.github.com/repos/ARM-DOE/pyart/milestones{/number}","notifications_url":"https://api.github.com/repos/ARM-DOE/pyart/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARM-DOE/pyart/labels{/name}","releases_url":"https://api.github.com/repos/ARM-DOE/pyart/releases{/id}","deployments_url":"https://api.github.com/repos/ARM-DOE/pyart/deployments","created_at":"2012-10-16T17:51:30Z","updated_at":"2016-09-14T02:54:38Z","pushed_at":"2016-09-15T08:43:39Z","git_url":"git://github.com/ARM-DOE/pyart.git","ssh_url":"git@github.com:ARM-DOE/pyart.git","clone_url":"https://github.com/ARM-DOE/pyart.git","svn_url":"https://github.com/ARM-DOE/pyart","homepage":"http://arm-doe.github.io/pyart/","size":69276,"stargazers_count":77,"watchers_count":77,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":63,"mirror_url":null,"open_issues_count":45,"forks":63,"open_issues":45,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583"},"html":{"href":"https://github.com/ARM-DOE/pyart/pull/583"},"issue":{"href":"https://api.github.com/repos/ARM-DOE/pyart/issues/583"},"comments":{"href":"https://api.github.com/repos/ARM-DOE/pyart/issues/583/comments"},"review_comments":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583/comments"},"review_comment":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARM-DOE/pyart/pulls/583/commits"},"statuses":{"href":"https://api.github.com/repos/ARM-DOE/pyart/statuses/bebccd18c29482c8ebcda14d307283e0ab104ea3"}}}}
{"actor":{"display_login":"jjhelmus"}}