{"action":"created","comment":{"url":"https://api.github.com/repos/fatiando/fatiando/pulls/comments/58600023","id":58600023,"diff_hunk":"@@ -262,6 +263,36 @@ def tga(x, y, data, shape, method='fd'):\n     return res\n \n \n+def tilt(x, y, data, shape):\n+    \"\"\"\n+    Calculates the magnetic tilt, as defined by Miller and Singh (1994):\n+    .. math::\n+    tilt(f) = tan^{-1}(\\\\frac{\\\\frac{dT}{dz}}{\\\\sqrt{\\\\frac{dT}{dx}^2 +\n+    \\\\frac{dT}{dy}^2}})\n+    Parameters:\n+    * x, y : 1D-arrays\n+        The x and y coordinates of the grid points\n+    * data : 1D-array\n+        The potential field at the grid points\n+    * shape : tuple = (ny, nx)\n+        The shape of the grid\n+    Returns:\n+    * tilt : 1D-array\n+        The tilt angle of the total field.\n+    **References**\n+    Miller, Hugh G, and Vijay Singh. 1994. \"Potential Field Tilt --- a New\n+    Concept for Location of Potential Field Sources.\"\n+    Journal of Applied Geophysics 32 (2--3): 213-17.\n+    doi:10.1016/0926-9851(94)90022-1.\n+    \"\"\"\n+    horiz_deriv = numpy.sqrt( derivx(x, y, data, shape) +\\\n+    derivy(x, y, data, shape)","path":"fatiando/gravmag/transform.py","position":35,"original_position":35,"commit_id":"0aba2b36f06903f3cbb0d1eb39ea306b3b70e615","original_commit_id":"0aba2b36f06903f3cbb0d1eb39ea306b3b70e615","user":{"login":"leouieda","id":290082,"avatar_url":"https://avatars.githubusercontent.com/u/290082?v=3","gravatar_id":"","url":"https://api.github.com/users/leouieda","html_url":"https://github.com/leouieda","followers_url":"https://api.github.com/users/leouieda/followers","following_url":"https://api.github.com/users/leouieda/following{/other_user}","gists_url":"https://api.github.com/users/leouieda/gists{/gist_id}","starred_url":"https://api.github.com/users/leouieda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leouieda/subscriptions","organizations_url":"https://api.github.com/users/leouieda/orgs","repos_url":"https://api.github.com/users/leouieda/repos","events_url":"https://api.github.com/users/leouieda/events{/privacy}","received_events_url":"https://api.github.com/users/leouieda/received_events","type":"User","site_admin":false},"body":"Missing a `)` here. Also, if the statement is inside `()` you don't need to break the line with a `\\`. Example:\r\n\r\n    horiz_deriv = numpy.sqrt(derivx(x, y, data, shape) +\r\n                             derivy(x, y, data, shape))","created_at":"2016-04-05T19:25:31Z","updated_at":"2016-04-05T19:25:31Z","html_url":"https://github.com/fatiando/fatiando/pull/261#discussion_r58600023","pull_request_url":"https://api.github.com/repos/fatiando/fatiando/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/comments/58600023"},"html":{"href":"https://github.com/fatiando/fatiando/pull/261#discussion_r58600023"},"pull_request":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/fatiando/fatiando/pulls/261","id":63884308,"html_url":"https://github.com/fatiando/fatiando/pull/261","diff_url":"https://github.com/fatiando/fatiando/pull/261.diff","patch_url":"https://github.com/fatiando/fatiando/pull/261.patch","issue_url":"https://api.github.com/repos/fatiando/fatiando/issues/261","number":261,"state":"open","locked":false,"title":"Implement tilt filter","user":{"login":"mtb-za","id":1148889,"avatar_url":"https://avatars.githubusercontent.com/u/1148889?v=3","gravatar_id":"","url":"https://api.github.com/users/mtb-za","html_url":"https://github.com/mtb-za","followers_url":"https://api.github.com/users/mtb-za/followers","following_url":"https://api.github.com/users/mtb-za/following{/other_user}","gists_url":"https://api.github.com/users/mtb-za/gists{/gist_id}","starred_url":"https://api.github.com/users/mtb-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtb-za/subscriptions","organizations_url":"https://api.github.com/users/mtb-za/orgs","repos_url":"https://api.github.com/users/mtb-za/repos","events_url":"https://api.github.com/users/mtb-za/events{/privacy}","received_events_url":"https://api.github.com/users/mtb-za/received_events","type":"User","site_admin":false},"body":"This will create a filter to determine the tilt of a potential field, as developed by Miller and Singh (1994).\r\n\r\nI could use some suggestions on how to create a sensible test for this.\r\n\r\nThis is the first of a few potential field filters that I want to implement.\r\n\r\n## Checklist:\r\n\r\n- [ ] Make tests for new code\r\n- [x] Create/update docstrings\r\n- [x] Include relevant equations and citations in docstrings\r\n- [ ] Code follows PEP8 style conventions\r\n- [ ] Code and docs have been spellchecked\r\n- [x] Include new dependencies in docs, requirements.txt, README, and .travis.yml\r\n- [ ] Documentation builds properly\r\n- [ ] All tests pass\r\n- [ ] Can be merged\r\n- [ ] Changelog entry (leave for last)","created_at":"2016-03-23T13:49:33Z","updated_at":"2016-04-05T19:25:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cbbf9d5f06bad2b63538378db0683ab066035e3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fatiando/fatiando/pulls/261/commits","review_comments_url":"https://api.github.com/repos/fatiando/fatiando/pulls/261/comments","review_comment_url":"https://api.github.com/repos/fatiando/fatiando/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fatiando/fatiando/issues/261/comments","statuses_url":"https://api.github.com/repos/fatiando/fatiando/statuses/0aba2b36f06903f3cbb0d1eb39ea306b3b70e615","head":{"label":"mtb-za:tilt_filter","ref":"tilt_filter","sha":"0aba2b36f06903f3cbb0d1eb39ea306b3b70e615","user":{"login":"mtb-za","id":1148889,"avatar_url":"https://avatars.githubusercontent.com/u/1148889?v=3","gravatar_id":"","url":"https://api.github.com/users/mtb-za","html_url":"https://github.com/mtb-za","followers_url":"https://api.github.com/users/mtb-za/followers","following_url":"https://api.github.com/users/mtb-za/following{/other_user}","gists_url":"https://api.github.com/users/mtb-za/gists{/gist_id}","starred_url":"https://api.github.com/users/mtb-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtb-za/subscriptions","organizations_url":"https://api.github.com/users/mtb-za/orgs","repos_url":"https://api.github.com/users/mtb-za/repos","events_url":"https://api.github.com/users/mtb-za/events{/privacy}","received_events_url":"https://api.github.com/users/mtb-za/received_events","type":"User","site_admin":false},"repo":{"id":31536718,"name":"fatiando","full_name":"mtb-za/fatiando","owner":{"login":"mtb-za","id":1148889,"avatar_url":"https://avatars.githubusercontent.com/u/1148889?v=3","gravatar_id":"","url":"https://api.github.com/users/mtb-za","html_url":"https://github.com/mtb-za","followers_url":"https://api.github.com/users/mtb-za/followers","following_url":"https://api.github.com/users/mtb-za/following{/other_user}","gists_url":"https://api.github.com/users/mtb-za/gists{/gist_id}","starred_url":"https://api.github.com/users/mtb-za/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtb-za/subscriptions","organizations_url":"https://api.github.com/users/mtb-za/orgs","repos_url":"https://api.github.com/users/mtb-za/repos","events_url":"https://api.github.com/users/mtb-za/events{/privacy}","received_events_url":"https://api.github.com/users/mtb-za/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mtb-za/fatiando","description":"Python toolkit for modeling and inversion in geophysics","fork":true,"url":"https://api.github.com/repos/mtb-za/fatiando","forks_url":"https://api.github.com/repos/mtb-za/fatiando/forks","keys_url":"https://api.github.com/repos/mtb-za/fatiando/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mtb-za/fatiando/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mtb-za/fatiando/teams","hooks_url":"https://api.github.com/repos/mtb-za/fatiando/hooks","issue_events_url":"https://api.github.com/repos/mtb-za/fatiando/issues/events{/number}","events_url":"https://api.github.com/repos/mtb-za/fatiando/events","assignees_url":"https://api.github.com/repos/mtb-za/fatiando/assignees{/user}","branches_url":"https://api.github.com/repos/mtb-za/fatiando/branches{/branch}","tags_url":"https://api.github.com/repos/mtb-za/fatiando/tags","blobs_url":"https://api.github.com/repos/mtb-za/fatiando/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mtb-za/fatiando/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mtb-za/fatiando/git/refs{/sha}","trees_url":"https://api.github.com/repos/mtb-za/fatiando/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mtb-za/fatiando/statuses/{sha}","languages_url":"https://api.github.com/repos/mtb-za/fatiando/languages","stargazers_url":"https://api.github.com/repos/mtb-za/fatiando/stargazers","contributors_url":"https://api.github.com/repos/mtb-za/fatiando/contributors","subscribers_url":"https://api.github.com/repos/mtb-za/fatiando/subscribers","subscription_url":"https://api.github.com/repos/mtb-za/fatiando/subscription","commits_url":"https://api.github.com/repos/mtb-za/fatiando/commits{/sha}","git_commits_url":"https://api.github.com/repos/mtb-za/fatiando/git/commits{/sha}","comments_url":"https://api.github.com/repos/mtb-za/fatiando/comments{/number}","issue_comment_url":"https://api.github.com/repos/mtb-za/fatiando/issues/comments{/number}","contents_url":"https://api.github.com/repos/mtb-za/fatiando/contents/{+path}","compare_url":"https://api.github.com/repos/mtb-za/fatiando/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mtb-za/fatiando/merges","archive_url":"https://api.github.com/repos/mtb-za/fatiando/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mtb-za/fatiando/downloads","issues_url":"https://api.github.com/repos/mtb-za/fatiando/issues{/number}","pulls_url":"https://api.github.com/repos/mtb-za/fatiando/pulls{/number}","milestones_url":"https://api.github.com/repos/mtb-za/fatiando/milestones{/number}","notifications_url":"https://api.github.com/repos/mtb-za/fatiando/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mtb-za/fatiando/labels{/name}","releases_url":"https://api.github.com/repos/mtb-za/fatiando/releases{/id}","deployments_url":"https://api.github.com/repos/mtb-za/fatiando/deployments","created_at":"2015-03-02T11:12:42Z","updated_at":"2016-03-23T13:35:31Z","pushed_at":"2016-04-05T15:00:11Z","git_url":"git://github.com/mtb-za/fatiando.git","ssh_url":"git@github.com:mtb-za/fatiando.git","clone_url":"https://github.com/mtb-za/fatiando.git","svn_url":"https://github.com/mtb-za/fatiando","homepage":"http://www.fatiando.org","size":15934,"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":"fatiando:master","ref":"master","sha":"237ba1dd35d47ea0a5e286781faddfe60ab4d12d","user":{"login":"fatiando","id":8174113,"avatar_url":"https://avatars.githubusercontent.com/u/8174113?v=3","gravatar_id":"","url":"https://api.github.com/users/fatiando","html_url":"https://github.com/fatiando","followers_url":"https://api.github.com/users/fatiando/followers","following_url":"https://api.github.com/users/fatiando/following{/other_user}","gists_url":"https://api.github.com/users/fatiando/gists{/gist_id}","starred_url":"https://api.github.com/users/fatiando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatiando/subscriptions","organizations_url":"https://api.github.com/users/fatiando/orgs","repos_url":"https://api.github.com/users/fatiando/repos","events_url":"https://api.github.com/users/fatiando/events{/privacy}","received_events_url":"https://api.github.com/users/fatiando/received_events","type":"Organization","site_admin":false},"repo":{"id":7919054,"name":"fatiando","full_name":"fatiando/fatiando","owner":{"login":"fatiando","id":8174113,"avatar_url":"https://avatars.githubusercontent.com/u/8174113?v=3","gravatar_id":"","url":"https://api.github.com/users/fatiando","html_url":"https://github.com/fatiando","followers_url":"https://api.github.com/users/fatiando/followers","following_url":"https://api.github.com/users/fatiando/following{/other_user}","gists_url":"https://api.github.com/users/fatiando/gists{/gist_id}","starred_url":"https://api.github.com/users/fatiando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fatiando/subscriptions","organizations_url":"https://api.github.com/users/fatiando/orgs","repos_url":"https://api.github.com/users/fatiando/repos","events_url":"https://api.github.com/users/fatiando/events{/privacy}","received_events_url":"https://api.github.com/users/fatiando/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fatiando/fatiando","description":"Python toolkit for modeling and inversion in geophysics","fork":false,"url":"https://api.github.com/repos/fatiando/fatiando","forks_url":"https://api.github.com/repos/fatiando/fatiando/forks","keys_url":"https://api.github.com/repos/fatiando/fatiando/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fatiando/fatiando/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fatiando/fatiando/teams","hooks_url":"https://api.github.com/repos/fatiando/fatiando/hooks","issue_events_url":"https://api.github.com/repos/fatiando/fatiando/issues/events{/number}","events_url":"https://api.github.com/repos/fatiando/fatiando/events","assignees_url":"https://api.github.com/repos/fatiando/fatiando/assignees{/user}","branches_url":"https://api.github.com/repos/fatiando/fatiando/branches{/branch}","tags_url":"https://api.github.com/repos/fatiando/fatiando/tags","blobs_url":"https://api.github.com/repos/fatiando/fatiando/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fatiando/fatiando/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fatiando/fatiando/git/refs{/sha}","trees_url":"https://api.github.com/repos/fatiando/fatiando/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fatiando/fatiando/statuses/{sha}","languages_url":"https://api.github.com/repos/fatiando/fatiando/languages","stargazers_url":"https://api.github.com/repos/fatiando/fatiando/stargazers","contributors_url":"https://api.github.com/repos/fatiando/fatiando/contributors","subscribers_url":"https://api.github.com/repos/fatiando/fatiando/subscribers","subscription_url":"https://api.github.com/repos/fatiando/fatiando/subscription","commits_url":"https://api.github.com/repos/fatiando/fatiando/commits{/sha}","git_commits_url":"https://api.github.com/repos/fatiando/fatiando/git/commits{/sha}","comments_url":"https://api.github.com/repos/fatiando/fatiando/comments{/number}","issue_comment_url":"https://api.github.com/repos/fatiando/fatiando/issues/comments{/number}","contents_url":"https://api.github.com/repos/fatiando/fatiando/contents/{+path}","compare_url":"https://api.github.com/repos/fatiando/fatiando/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fatiando/fatiando/merges","archive_url":"https://api.github.com/repos/fatiando/fatiando/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fatiando/fatiando/downloads","issues_url":"https://api.github.com/repos/fatiando/fatiando/issues{/number}","pulls_url":"https://api.github.com/repos/fatiando/fatiando/pulls{/number}","milestones_url":"https://api.github.com/repos/fatiando/fatiando/milestones{/number}","notifications_url":"https://api.github.com/repos/fatiando/fatiando/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fatiando/fatiando/labels{/name}","releases_url":"https://api.github.com/repos/fatiando/fatiando/releases{/id}","deployments_url":"https://api.github.com/repos/fatiando/fatiando/deployments","created_at":"2013-01-30T16:57:15Z","updated_at":"2016-03-29T15:43:54Z","pushed_at":"2016-04-05T15:00:45Z","git_url":"git://github.com/fatiando/fatiando.git","ssh_url":"git@github.com:fatiando/fatiando.git","clone_url":"https://github.com/fatiando/fatiando.git","svn_url":"https://github.com/fatiando/fatiando","homepage":"http://www.fatiando.org","size":175891,"stargazers_count":51,"watchers_count":51,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":95,"forks":38,"open_issues":95,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/261"},"html":{"href":"https://github.com/fatiando/fatiando/pull/261"},"issue":{"href":"https://api.github.com/repos/fatiando/fatiando/issues/261"},"comments":{"href":"https://api.github.com/repos/fatiando/fatiando/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fatiando/fatiando/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/fatiando/fatiando/statuses/0aba2b36f06903f3cbb0d1eb39ea306b3b70e615"}}}}