{"action":"created","comment":{"url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/comments/49612827","id":49612827,"diff_hunk":"@@ -79,6 +81,57 @@ def point_velocity(omega, x0, n0, grid, c=None):\n     return util.XyzComponents([v * o / r for o in offset])\n \n \n+def point_dipole(omega, x0, n0, grid, c=None):\n+    \"\"\"Point source with dipole characteristics.\n+\n+    Parameters\n+    ----------\n+    omega : float\n+        Frequency of source.\n+    x0 : (3,) tripple of array_like\n+        Position of source.\n+    n0 : (3,) tripple of array_like\n+        Normal vector (direction) of dipole.\n+    grid : triple of numpy.ndarray\n+        The grid that is used for the sound field calculations.\n+        See :func:`sfs.util.xyz_grid`.\n+    c : float, optional\n+        Speed of sound.\n+\n+    Returns\n+    -------\n+    numpy.ndarray\n+        Sound pressure at positions given by `grid`.\n+\n+    Notes\n+    -----\n+    ::\n+\n+         d                1   / iw       1    \\   (x-x0) n0\n+        ---- G(x-x0,w) = --- | ----- + ------- | ----------- e^(-i w/c |x-x0|)\n+        d ns             4pi  \\  c     |x-x0| /   |x-x0|^2\n+\n+    Examples\n+    --------\n+    .. plot::\n+        :context: close-figs\n+\n+        n0 = [0, 1, 0]\n+        p = sfs.mono.source.point_dipole(omega, x0, n0, grid)\n+        sfs.plot.soundfield(p, grid)\n+        plt.title(\"Dipole Point Source at {} m\".format(x0))","path":"sfs/mono/source.py","position":51,"original_position":51,"commit_id":"1d569a4e7c4268e2ba879a350c850a7ff640e678","original_commit_id":"1d569a4e7c4268e2ba879a350c850a7ff640e678","user":{"login":"mgeier","id":705404,"avatar_url":"https://avatars.githubusercontent.com/u/705404?v=3","gravatar_id":"","url":"https://api.github.com/users/mgeier","html_url":"https://github.com/mgeier","followers_url":"https://api.github.com/users/mgeier/followers","following_url":"https://api.github.com/users/mgeier/following{/other_user}","gists_url":"https://api.github.com/users/mgeier/gists{/gist_id}","starred_url":"https://api.github.com/users/mgeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgeier/subscriptions","organizations_url":"https://api.github.com/users/mgeier/orgs","repos_url":"https://api.github.com/users/mgeier/repos","events_url":"https://api.github.com/users/mgeier/events{/privacy}","received_events_url":"https://api.github.com/users/mgeier/received_events","type":"User","site_admin":false},"body":"The docstring should end with an empty line","created_at":"2016-01-13T16:26:49Z","updated_at":"2016-01-13T16:26:49Z","html_url":"https://github.com/sfstoolbox/sfs-python/pull/6#discussion_r49612827","pull_request_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/comments/49612827"},"html":{"href":"https://github.com/sfstoolbox/sfs-python/pull/6#discussion_r49612827"},"pull_request":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6","id":55869122,"html_url":"https://github.com/sfstoolbox/sfs-python/pull/6","diff_url":"https://github.com/sfstoolbox/sfs-python/pull/6.diff","patch_url":"https://github.com/sfstoolbox/sfs-python/pull/6.patch","issue_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/6","number":6,"state":"open","locked":false,"title":"New mono dipol point source","user":{"login":"hagenw","id":173624,"avatar_url":"https://avatars.githubusercontent.com/u/173624?v=3","gravatar_id":"","url":"https://api.github.com/users/hagenw","html_url":"https://github.com/hagenw","followers_url":"https://api.github.com/users/hagenw/followers","following_url":"https://api.github.com/users/hagenw/following{/other_user}","gists_url":"https://api.github.com/users/hagenw/gists{/gist_id}","starred_url":"https://api.github.com/users/hagenw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hagenw/subscriptions","organizations_url":"https://api.github.com/users/hagenw/orgs","repos_url":"https://api.github.com/users/hagenw/repos","events_url":"https://api.github.com/users/hagenw/events{/privacy}","received_events_url":"https://api.github.com/users/hagenw/received_events","type":"User","site_admin":false},"body":"I added a dipol point source after the [Matlab implementation from Fiete](https://github.com/sfstoolbox/sfs/blob/master/SFS_monochromatic/greens_function_mono.m#L89).\r\n\r\n","created_at":"2016-01-13T08:54:16Z","updated_at":"2016-01-13T16:26:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b8e222ef841dae037e10327381d6ff2cfdfcc94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6/commits","review_comments_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6/comments","review_comment_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/6/comments","statuses_url":"https://api.github.com/repos/sfstoolbox/sfs-python/statuses/1d569a4e7c4268e2ba879a350c850a7ff640e678","head":{"label":"sfstoolbox:point_dipol","ref":"point_dipol","sha":"1d569a4e7c4268e2ba879a350c850a7ff640e678","user":{"login":"sfstoolbox","id":2727328,"avatar_url":"https://avatars.githubusercontent.com/u/2727328?v=3","gravatar_id":"","url":"https://api.github.com/users/sfstoolbox","html_url":"https://github.com/sfstoolbox","followers_url":"https://api.github.com/users/sfstoolbox/followers","following_url":"https://api.github.com/users/sfstoolbox/following{/other_user}","gists_url":"https://api.github.com/users/sfstoolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/sfstoolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfstoolbox/subscriptions","organizations_url":"https://api.github.com/users/sfstoolbox/orgs","repos_url":"https://api.github.com/users/sfstoolbox/repos","events_url":"https://api.github.com/users/sfstoolbox/events{/privacy}","received_events_url":"https://api.github.com/users/sfstoolbox/received_events","type":"Organization","site_admin":false},"repo":{"id":25463824,"name":"sfs-python","full_name":"sfstoolbox/sfs-python","owner":{"login":"sfstoolbox","id":2727328,"avatar_url":"https://avatars.githubusercontent.com/u/2727328?v=3","gravatar_id":"","url":"https://api.github.com/users/sfstoolbox","html_url":"https://github.com/sfstoolbox","followers_url":"https://api.github.com/users/sfstoolbox/followers","following_url":"https://api.github.com/users/sfstoolbox/following{/other_user}","gists_url":"https://api.github.com/users/sfstoolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/sfstoolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfstoolbox/subscriptions","organizations_url":"https://api.github.com/users/sfstoolbox/orgs","repos_url":"https://api.github.com/users/sfstoolbox/repos","events_url":"https://api.github.com/users/sfstoolbox/events{/privacy}","received_events_url":"https://api.github.com/users/sfstoolbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sfstoolbox/sfs-python","description":"Python implementation of SFS","fork":false,"url":"https://api.github.com/repos/sfstoolbox/sfs-python","forks_url":"https://api.github.com/repos/sfstoolbox/sfs-python/forks","keys_url":"https://api.github.com/repos/sfstoolbox/sfs-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfstoolbox/sfs-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfstoolbox/sfs-python/teams","hooks_url":"https://api.github.com/repos/sfstoolbox/sfs-python/hooks","issue_events_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/events{/number}","events_url":"https://api.github.com/repos/sfstoolbox/sfs-python/events","assignees_url":"https://api.github.com/repos/sfstoolbox/sfs-python/assignees{/user}","branches_url":"https://api.github.com/repos/sfstoolbox/sfs-python/branches{/branch}","tags_url":"https://api.github.com/repos/sfstoolbox/sfs-python/tags","blobs_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfstoolbox/sfs-python/statuses/{sha}","languages_url":"https://api.github.com/repos/sfstoolbox/sfs-python/languages","stargazers_url":"https://api.github.com/repos/sfstoolbox/sfs-python/stargazers","contributors_url":"https://api.github.com/repos/sfstoolbox/sfs-python/contributors","subscribers_url":"https://api.github.com/repos/sfstoolbox/sfs-python/subscribers","subscription_url":"https://api.github.com/repos/sfstoolbox/sfs-python/subscription","commits_url":"https://api.github.com/repos/sfstoolbox/sfs-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfstoolbox/sfs-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfstoolbox/sfs-python/contents/{+path}","compare_url":"https://api.github.com/repos/sfstoolbox/sfs-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfstoolbox/sfs-python/merges","archive_url":"https://api.github.com/repos/sfstoolbox/sfs-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfstoolbox/sfs-python/downloads","issues_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues{/number}","pulls_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls{/number}","milestones_url":"https://api.github.com/repos/sfstoolbox/sfs-python/milestones{/number}","notifications_url":"https://api.github.com/repos/sfstoolbox/sfs-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfstoolbox/sfs-python/labels{/name}","releases_url":"https://api.github.com/repos/sfstoolbox/sfs-python/releases{/id}","created_at":"2014-10-20T11:43:40Z","updated_at":"2015-09-25T10:37:10Z","pushed_at":"2016-01-13T16:14:39Z","git_url":"git://github.com/sfstoolbox/sfs-python.git","ssh_url":"git@github.com:sfstoolbox/sfs-python.git","clone_url":"https://github.com/sfstoolbox/sfs-python.git","svn_url":"https://github.com/sfstoolbox/sfs-python","homepage":null,"size":407,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"base":{"label":"sfstoolbox:master","ref":"master","sha":"962f22c01641cdb5db1b34854f963e7d44a4497f","user":{"login":"sfstoolbox","id":2727328,"avatar_url":"https://avatars.githubusercontent.com/u/2727328?v=3","gravatar_id":"","url":"https://api.github.com/users/sfstoolbox","html_url":"https://github.com/sfstoolbox","followers_url":"https://api.github.com/users/sfstoolbox/followers","following_url":"https://api.github.com/users/sfstoolbox/following{/other_user}","gists_url":"https://api.github.com/users/sfstoolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/sfstoolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfstoolbox/subscriptions","organizations_url":"https://api.github.com/users/sfstoolbox/orgs","repos_url":"https://api.github.com/users/sfstoolbox/repos","events_url":"https://api.github.com/users/sfstoolbox/events{/privacy}","received_events_url":"https://api.github.com/users/sfstoolbox/received_events","type":"Organization","site_admin":false},"repo":{"id":25463824,"name":"sfs-python","full_name":"sfstoolbox/sfs-python","owner":{"login":"sfstoolbox","id":2727328,"avatar_url":"https://avatars.githubusercontent.com/u/2727328?v=3","gravatar_id":"","url":"https://api.github.com/users/sfstoolbox","html_url":"https://github.com/sfstoolbox","followers_url":"https://api.github.com/users/sfstoolbox/followers","following_url":"https://api.github.com/users/sfstoolbox/following{/other_user}","gists_url":"https://api.github.com/users/sfstoolbox/gists{/gist_id}","starred_url":"https://api.github.com/users/sfstoolbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfstoolbox/subscriptions","organizations_url":"https://api.github.com/users/sfstoolbox/orgs","repos_url":"https://api.github.com/users/sfstoolbox/repos","events_url":"https://api.github.com/users/sfstoolbox/events{/privacy}","received_events_url":"https://api.github.com/users/sfstoolbox/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sfstoolbox/sfs-python","description":"Python implementation of SFS","fork":false,"url":"https://api.github.com/repos/sfstoolbox/sfs-python","forks_url":"https://api.github.com/repos/sfstoolbox/sfs-python/forks","keys_url":"https://api.github.com/repos/sfstoolbox/sfs-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sfstoolbox/sfs-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sfstoolbox/sfs-python/teams","hooks_url":"https://api.github.com/repos/sfstoolbox/sfs-python/hooks","issue_events_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/events{/number}","events_url":"https://api.github.com/repos/sfstoolbox/sfs-python/events","assignees_url":"https://api.github.com/repos/sfstoolbox/sfs-python/assignees{/user}","branches_url":"https://api.github.com/repos/sfstoolbox/sfs-python/branches{/branch}","tags_url":"https://api.github.com/repos/sfstoolbox/sfs-python/tags","blobs_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sfstoolbox/sfs-python/statuses/{sha}","languages_url":"https://api.github.com/repos/sfstoolbox/sfs-python/languages","stargazers_url":"https://api.github.com/repos/sfstoolbox/sfs-python/stargazers","contributors_url":"https://api.github.com/repos/sfstoolbox/sfs-python/contributors","subscribers_url":"https://api.github.com/repos/sfstoolbox/sfs-python/subscribers","subscription_url":"https://api.github.com/repos/sfstoolbox/sfs-python/subscription","commits_url":"https://api.github.com/repos/sfstoolbox/sfs-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/sfstoolbox/sfs-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/sfstoolbox/sfs-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/sfstoolbox/sfs-python/contents/{+path}","compare_url":"https://api.github.com/repos/sfstoolbox/sfs-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sfstoolbox/sfs-python/merges","archive_url":"https://api.github.com/repos/sfstoolbox/sfs-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sfstoolbox/sfs-python/downloads","issues_url":"https://api.github.com/repos/sfstoolbox/sfs-python/issues{/number}","pulls_url":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls{/number}","milestones_url":"https://api.github.com/repos/sfstoolbox/sfs-python/milestones{/number}","notifications_url":"https://api.github.com/repos/sfstoolbox/sfs-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sfstoolbox/sfs-python/labels{/name}","releases_url":"https://api.github.com/repos/sfstoolbox/sfs-python/releases{/id}","created_at":"2014-10-20T11:43:40Z","updated_at":"2015-09-25T10:37:10Z","pushed_at":"2016-01-13T16:14:39Z","git_url":"git://github.com/sfstoolbox/sfs-python.git","ssh_url":"git@github.com:sfstoolbox/sfs-python.git","clone_url":"https://github.com/sfstoolbox/sfs-python.git","svn_url":"https://github.com/sfstoolbox/sfs-python","homepage":null,"size":407,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6"},"html":{"href":"https://github.com/sfstoolbox/sfs-python/pull/6"},"issue":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/6"},"comments":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/sfstoolbox/sfs-python/statuses/1d569a4e7c4268e2ba879a350c850a7ff640e678"}}}}