{"action":"created","comment":{"url":"https://api.github.com/repos/metoppv/improver/pulls/comments/199447099","pull_request_review_id":133563346,"id":199447099,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTQ0NzA5OQ==","diff_hunk":"@@ -163,34 +197,60 @@ def complex_to_deg(complex_in):\n \n         return angle\n \n-    @staticmethod\n-    def find_r_values(complex_in):\n+    def wind_dir_mean(self):\n+        \"\"\"Find the mean wind direction using complex average which actually\n+           signifies a point between all of the data points in POLAR\n+           coordinates - NOT the average DEGREE ANGLE.\n+\n+        Uses:\n+            self.wdir_complex (np.ndarray or float):\n+                3D array or float - wind direction angles in degrees.\n+            self.realization_axis (int):\n+                Axis to collapse over.\n+\n+        Defines:\n+            self.wdir_mean_complex (np.ndarray or float):\n+                3D array or float - wind direction angles as complex numbers\n+                collapsed along an axis using np.mean().\n+            self.wdir_slice_mean (np.ndarray or float):\n+                3D array or float - wind direction angles in degrees collapsed\n+                along an axis using np.mean().\n+        \"\"\"\n+        self.wdir_mean_complex = np.mean(self.wdir_complex,\n+                                         axis=self.realization_axis)\n+        self.wdir_slice_mean.data = self.complex_to_deg(self.wdir_mean_complex)\n+        return","path":"lib/improver/wind_direction.py","position":83,"original_position":83,"commit_id":"471bf2cfbebaba1403c279fc31bb9a538ae58f83","original_commit_id":"471bf2cfbebaba1403c279fc31bb9a538ae58f83","user":{"login":"cgsandford","id":35029690,"node_id":"MDQ6VXNlcjM1MDI5Njkw","avatar_url":"https://avatars1.githubusercontent.com/u/35029690?v=4","gravatar_id":"","url":"https://api.github.com/users/cgsandford","html_url":"https://github.com/cgsandford","followers_url":"https://api.github.com/users/cgsandford/followers","following_url":"https://api.github.com/users/cgsandford/following{/other_user}","gists_url":"https://api.github.com/users/cgsandford/gists{/gist_id}","starred_url":"https://api.github.com/users/cgsandford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgsandford/subscriptions","organizations_url":"https://api.github.com/users/cgsandford/orgs","repos_url":"https://api.github.com/users/cgsandford/repos","events_url":"https://api.github.com/users/cgsandford/events{/privacy}","received_events_url":"https://api.github.com/users/cgsandford/received_events","type":"User","site_admin":false},"body":"You've got a null \"return\" value here, with no \"return\" statement in some other functions.  Please choose one style or the other - most of IMPROVER I think goes with no return statement, so that's probably the better option.","created_at":"2018-07-02T10:08:51Z","updated_at":"2018-07-02T10:31:03Z","html_url":"https://github.com/metoppv/improver/pull/592#discussion_r199447099","pull_request_url":"https://api.github.com/repos/metoppv/improver/pulls/592","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/metoppv/improver/pulls/comments/199447099"},"html":{"href":"https://github.com/metoppv/improver/pull/592#discussion_r199447099"},"pull_request":{"href":"https://api.github.com/repos/metoppv/improver/pulls/592"}}},"pull_request":{"url":"https://api.github.com/repos/metoppv/improver/pulls/592","id":198343686,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MzQzNjg2","html_url":"https://github.com/metoppv/improver/pull/592","diff_url":"https://github.com/metoppv/improver/pull/592.diff","patch_url":"https://github.com/metoppv/improver/pull/592.patch","issue_url":"https://api.github.com/repos/metoppv/improver/issues/592","number":592,"state":"open","locked":false,"title":"Refactors wind direction code to make implementation of IMPRO 598 easier","user":{"login":"MoseleyS","id":23079172,"node_id":"MDQ6VXNlcjIzMDc5MTcy","avatar_url":"https://avatars0.githubusercontent.com/u/23079172?v=4","gravatar_id":"","url":"https://api.github.com/users/MoseleyS","html_url":"https://github.com/MoseleyS","followers_url":"https://api.github.com/users/MoseleyS/followers","following_url":"https://api.github.com/users/MoseleyS/following{/other_user}","gists_url":"https://api.github.com/users/MoseleyS/gists{/gist_id}","starred_url":"https://api.github.com/users/MoseleyS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoseleyS/subscriptions","organizations_url":"https://api.github.com/users/MoseleyS/orgs","repos_url":"https://api.github.com/users/MoseleyS/repos","events_url":"https://api.github.com/users/MoseleyS/events{/privacy}","received_events_url":"https://api.github.com/users/MoseleyS/received_events","type":"User","site_admin":false},"body":"Addresses #495 \r\n\r\nRefactors wind direction code to make implementation of IMPRO 598 easier.\r\n\r\nOne unit test is slightly modified at the 3rd significant figure, otherwise functionality is unchanged.\r\n\r\nTesting:\r\n - [X] Ran tests and they passed OK\r\n - [X] Added new tests for the new feature(s)\r\n\r\n","created_at":"2018-06-29T15:01:26Z","updated_at":"2018-07-02T10:31:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e27210baea8c75eac7a6045091cbc33672ea137","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/metoppv/improver/pulls/592/commits","review_comments_url":"https://api.github.com/repos/metoppv/improver/pulls/592/comments","review_comment_url":"https://api.github.com/repos/metoppv/improver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/metoppv/improver/issues/592/comments","statuses_url":"https://api.github.com/repos/metoppv/improver/statuses/471bf2cfbebaba1403c279fc31bb9a538ae58f83","head":{"label":"MoseleyS:IMPRO-598-wind_dir","ref":"IMPRO-598-wind_dir","sha":"471bf2cfbebaba1403c279fc31bb9a538ae58f83","user":{"login":"MoseleyS","id":23079172,"node_id":"MDQ6VXNlcjIzMDc5MTcy","avatar_url":"https://avatars0.githubusercontent.com/u/23079172?v=4","gravatar_id":"","url":"https://api.github.com/users/MoseleyS","html_url":"https://github.com/MoseleyS","followers_url":"https://api.github.com/users/MoseleyS/followers","following_url":"https://api.github.com/users/MoseleyS/following{/other_user}","gists_url":"https://api.github.com/users/MoseleyS/gists{/gist_id}","starred_url":"https://api.github.com/users/MoseleyS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoseleyS/subscriptions","organizations_url":"https://api.github.com/users/MoseleyS/orgs","repos_url":"https://api.github.com/users/MoseleyS/repos","events_url":"https://api.github.com/users/MoseleyS/events{/privacy}","received_events_url":"https://api.github.com/users/MoseleyS/received_events","type":"User","site_admin":false},"repo":{"id":93065633,"node_id":"MDEwOlJlcG9zaXRvcnk5MzA2NTYzMw==","name":"improver","full_name":"MoseleyS/improver","owner":{"login":"MoseleyS","id":23079172,"node_id":"MDQ6VXNlcjIzMDc5MTcy","avatar_url":"https://avatars0.githubusercontent.com/u/23079172?v=4","gravatar_id":"","url":"https://api.github.com/users/MoseleyS","html_url":"https://github.com/MoseleyS","followers_url":"https://api.github.com/users/MoseleyS/followers","following_url":"https://api.github.com/users/MoseleyS/following{/other_user}","gists_url":"https://api.github.com/users/MoseleyS/gists{/gist_id}","starred_url":"https://api.github.com/users/MoseleyS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoseleyS/subscriptions","organizations_url":"https://api.github.com/users/MoseleyS/orgs","repos_url":"https://api.github.com/users/MoseleyS/repos","events_url":"https://api.github.com/users/MoseleyS/events{/privacy}","received_events_url":"https://api.github.com/users/MoseleyS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MoseleyS/improver","description":"IMPROVER","fork":true,"url":"https://api.github.com/repos/MoseleyS/improver","forks_url":"https://api.github.com/repos/MoseleyS/improver/forks","keys_url":"https://api.github.com/repos/MoseleyS/improver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MoseleyS/improver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MoseleyS/improver/teams","hooks_url":"https://api.github.com/repos/MoseleyS/improver/hooks","issue_events_url":"https://api.github.com/repos/MoseleyS/improver/issues/events{/number}","events_url":"https://api.github.com/repos/MoseleyS/improver/events","assignees_url":"https://api.github.com/repos/MoseleyS/improver/assignees{/user}","branches_url":"https://api.github.com/repos/MoseleyS/improver/branches{/branch}","tags_url":"https://api.github.com/repos/MoseleyS/improver/tags","blobs_url":"https://api.github.com/repos/MoseleyS/improver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MoseleyS/improver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MoseleyS/improver/git/refs{/sha}","trees_url":"https://api.github.com/repos/MoseleyS/improver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MoseleyS/improver/statuses/{sha}","languages_url":"https://api.github.com/repos/MoseleyS/improver/languages","stargazers_url":"https://api.github.com/repos/MoseleyS/improver/stargazers","contributors_url":"https://api.github.com/repos/MoseleyS/improver/contributors","subscribers_url":"https://api.github.com/repos/MoseleyS/improver/subscribers","subscription_url":"https://api.github.com/repos/MoseleyS/improver/subscription","commits_url":"https://api.github.com/repos/MoseleyS/improver/commits{/sha}","git_commits_url":"https://api.github.com/repos/MoseleyS/improver/git/commits{/sha}","comments_url":"https://api.github.com/repos/MoseleyS/improver/comments{/number}","issue_comment_url":"https://api.github.com/repos/MoseleyS/improver/issues/comments{/number}","contents_url":"https://api.github.com/repos/MoseleyS/improver/contents/{+path}","compare_url":"https://api.github.com/repos/MoseleyS/improver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MoseleyS/improver/merges","archive_url":"https://api.github.com/repos/MoseleyS/improver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MoseleyS/improver/downloads","issues_url":"https://api.github.com/repos/MoseleyS/improver/issues{/number}","pulls_url":"https://api.github.com/repos/MoseleyS/improver/pulls{/number}","milestones_url":"https://api.github.com/repos/MoseleyS/improver/milestones{/number}","notifications_url":"https://api.github.com/repos/MoseleyS/improver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MoseleyS/improver/labels{/name}","releases_url":"https://api.github.com/repos/MoseleyS/improver/releases{/id}","deployments_url":"https://api.github.com/repos/MoseleyS/improver/deployments","created_at":"2017-06-01T14:24:26Z","updated_at":"2018-06-29T08:10:26Z","pushed_at":"2018-07-02T07:57:27Z","git_url":"git://github.com/MoseleyS/improver.git","ssh_url":"git@github.com:MoseleyS/improver.git","clone_url":"https://github.com/MoseleyS/improver.git","svn_url":"https://github.com/MoseleyS/improver","homepage":null,"size":3627,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"metoppv:master","ref":"master","sha":"1e763178fb97ae8bcdd080b778617d0b8f214431","user":{"login":"metoppv","id":26465485,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NDY1NDg1","avatar_url":"https://avatars2.githubusercontent.com/u/26465485?v=4","gravatar_id":"","url":"https://api.github.com/users/metoppv","html_url":"https://github.com/metoppv","followers_url":"https://api.github.com/users/metoppv/followers","following_url":"https://api.github.com/users/metoppv/following{/other_user}","gists_url":"https://api.github.com/users/metoppv/gists{/gist_id}","starred_url":"https://api.github.com/users/metoppv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metoppv/subscriptions","organizations_url":"https://api.github.com/users/metoppv/orgs","repos_url":"https://api.github.com/users/metoppv/repos","events_url":"https://api.github.com/users/metoppv/events{/privacy}","received_events_url":"https://api.github.com/users/metoppv/received_events","type":"Organization","site_admin":false},"repo":{"id":85334761,"node_id":"MDEwOlJlcG9zaXRvcnk4NTMzNDc2MQ==","name":"improver","full_name":"metoppv/improver","owner":{"login":"metoppv","id":26465485,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2NDY1NDg1","avatar_url":"https://avatars2.githubusercontent.com/u/26465485?v=4","gravatar_id":"","url":"https://api.github.com/users/metoppv","html_url":"https://github.com/metoppv","followers_url":"https://api.github.com/users/metoppv/followers","following_url":"https://api.github.com/users/metoppv/following{/other_user}","gists_url":"https://api.github.com/users/metoppv/gists{/gist_id}","starred_url":"https://api.github.com/users/metoppv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/metoppv/subscriptions","organizations_url":"https://api.github.com/users/metoppv/orgs","repos_url":"https://api.github.com/users/metoppv/repos","events_url":"https://api.github.com/users/metoppv/events{/privacy}","received_events_url":"https://api.github.com/users/metoppv/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/metoppv/improver","description":"IMPROVER is a library of algorithms for meteorological post-processing and verification.","fork":false,"url":"https://api.github.com/repos/metoppv/improver","forks_url":"https://api.github.com/repos/metoppv/improver/forks","keys_url":"https://api.github.com/repos/metoppv/improver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/metoppv/improver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/metoppv/improver/teams","hooks_url":"https://api.github.com/repos/metoppv/improver/hooks","issue_events_url":"https://api.github.com/repos/metoppv/improver/issues/events{/number}","events_url":"https://api.github.com/repos/metoppv/improver/events","assignees_url":"https://api.github.com/repos/metoppv/improver/assignees{/user}","branches_url":"https://api.github.com/repos/metoppv/improver/branches{/branch}","tags_url":"https://api.github.com/repos/metoppv/improver/tags","blobs_url":"https://api.github.com/repos/metoppv/improver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/metoppv/improver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/metoppv/improver/git/refs{/sha}","trees_url":"https://api.github.com/repos/metoppv/improver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/metoppv/improver/statuses/{sha}","languages_url":"https://api.github.com/repos/metoppv/improver/languages","stargazers_url":"https://api.github.com/repos/metoppv/improver/stargazers","contributors_url":"https://api.github.com/repos/metoppv/improver/contributors","subscribers_url":"https://api.github.com/repos/metoppv/improver/subscribers","subscription_url":"https://api.github.com/repos/metoppv/improver/subscription","commits_url":"https://api.github.com/repos/metoppv/improver/commits{/sha}","git_commits_url":"https://api.github.com/repos/metoppv/improver/git/commits{/sha}","comments_url":"https://api.github.com/repos/metoppv/improver/comments{/number}","issue_comment_url":"https://api.github.com/repos/metoppv/improver/issues/comments{/number}","contents_url":"https://api.github.com/repos/metoppv/improver/contents/{+path}","compare_url":"https://api.github.com/repos/metoppv/improver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/metoppv/improver/merges","archive_url":"https://api.github.com/repos/metoppv/improver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/metoppv/improver/downloads","issues_url":"https://api.github.com/repos/metoppv/improver/issues{/number}","pulls_url":"https://api.github.com/repos/metoppv/improver/pulls{/number}","milestones_url":"https://api.github.com/repos/metoppv/improver/milestones{/number}","notifications_url":"https://api.github.com/repos/metoppv/improver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/metoppv/improver/labels{/name}","releases_url":"https://api.github.com/repos/metoppv/improver/releases{/id}","deployments_url":"https://api.github.com/repos/metoppv/improver/deployments","created_at":"2017-03-17T16:51:29Z","updated_at":"2018-07-02T09:45:06Z","pushed_at":"2018-07-02T09:45:03Z","git_url":"git://github.com/metoppv/improver.git","ssh_url":"git@github.com:metoppv/improver.git","clone_url":"https://github.com/metoppv/improver.git","svn_url":"https://github.com/metoppv/improver","homepage":"http://improver.readthedocs.io/en/latest/","size":3552,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":112,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":28,"open_issues":112,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/metoppv/improver/pulls/592"},"html":{"href":"https://github.com/metoppv/improver/pull/592"},"issue":{"href":"https://api.github.com/repos/metoppv/improver/issues/592"},"comments":{"href":"https://api.github.com/repos/metoppv/improver/issues/592/comments"},"review_comments":{"href":"https://api.github.com/repos/metoppv/improver/pulls/592/comments"},"review_comment":{"href":"https://api.github.com/repos/metoppv/improver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/metoppv/improver/pulls/592/commits"},"statuses":{"href":"https://api.github.com/repos/metoppv/improver/statuses/471bf2cfbebaba1403c279fc31bb9a538ae58f83"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cgsandford"}}