Skip to content

Commit

Permalink
add ESA driving functions docstring examples for monopoles for new ha…
Browse files Browse the repository at this point in the history
…ndling
  • Loading branch information
fs446 committed Mar 11, 2019
1 parent 8bb6387 commit 23368d8
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions sfs/mono/drivingfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,17 @@ def esa_edge_2d_plane(omega, x0, n=[0, 1, 0], alpha=3/2*np.pi, Nc=None,
(N,) numpy.ndarray
Complex weights of secondary sources.
Examples
--------
.. plot::
:context: close-figs
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
d, selection, secondary_source = (
sfs.mono.drivingfunction.esa_edge_2d_plane(
omega, array.x, npw, alpha=3/2*np.pi))
plot(np.nan_to_num(d), selection, secondary_source)
"""
x0 = np.asarray(x0)
n = util.normalize_vector(n)
Expand Down Expand Up @@ -633,6 +644,17 @@ def esa_edge_2d_line(omega, x0, xs, alpha=3/2*np.pi, Nc=None, c=None):
(N,) numpy.ndarray
Complex weights of secondary sources.
Examples
--------
.. plot::
:context: close-figs
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
d, selection, secondary_source = (
sfs.mono.drivingfunction.esa_edge_2d_line(
omega, array.x, xs, alpha=3/2*np.pi))
plot(np.nan_to_num(d), selection, secondary_source)
"""
x0 = np.asarray(x0)
k = util.wavenumber(omega, c)
Expand Down Expand Up @@ -698,6 +720,17 @@ def esa_edge_25d_point(omega, x0, xs, xref=[2, -2, 0], alpha=3/2*np.pi,
(N,) numpy.ndarray
Complex weights of secondary sources.
Examples
--------
.. plot::
:context: close-figs
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
d, selection, secondary_source = (
sfs.mono.drivingfunction.esa_edge_25d_point(
omega, array.x, xs, xref=[2, -2, 0], alpha=3/2*np.pi))
plot(np.nan_to_num(d), selection, secondary_source)
"""
x0 = np.asarray(x0)
xs = np.asarray(xs)
Expand Down

0 comments on commit 23368d8

Please sign in to comment.