Skip to content

Commit 1b26997

Browse files
committed
add ESA driving functions docstring examples for monopoles for new handling
1 parent ce48b42 commit 1b26997

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

sfs/mono/drivingfunction.py

+33
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,17 @@ def esa_edge_2d_plane(omega, x0, n=[0, 1, 0], alpha=3/2*np.pi, Nc=None,
10331033
10341034
Derived from :cite:`Spors2016`
10351035
1036+
Examples
1037+
--------
1038+
.. plot::
1039+
:context: close-figs
1040+
1041+
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
1042+
d, selection, secondary_source = (
1043+
sfs.mono.drivingfunction.esa_edge_2d_plane(
1044+
omega, array.x, npw, alpha=3/2*np.pi))
1045+
plot(np.nan_to_num(d), selection, secondary_source)
1046+
10361047
"""
10371048
x0 = np.asarray(x0)
10381049
n = util.normalize_vector(n)
@@ -1171,6 +1182,17 @@ def esa_edge_2d_line(omega, x0, xs, alpha=3/2*np.pi, Nc=None, c=None):
11711182
11721183
Derived from :cite:`Spors2016`
11731184
1185+
Examples
1186+
--------
1187+
.. plot::
1188+
:context: close-figs
1189+
1190+
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
1191+
d, selection, secondary_source = (
1192+
sfs.mono.drivingfunction.esa_edge_2d_line(
1193+
omega, array.x, xs, alpha=3/2*np.pi))
1194+
plot(np.nan_to_num(d), selection, secondary_source)
1195+
11741196
"""
11751197
x0 = np.asarray(x0)
11761198
k = util.wavenumber(omega, c)
@@ -1245,6 +1267,17 @@ def esa_edge_dipole_2d_line(omega, x0, xs, alpha=3/2*np.pi, Nc=None, c=None):
12451267
12461268
Derived from :cite:`Spors2016`
12471269
1270+
Examples
1271+
--------
1272+
.. plot::
1273+
:context: close-figs
1274+
1275+
array = sfs.array.edge(2**6, 0.2, center=[0, 0, 0], orientation=[0, -1, 0])
1276+
d, selection, secondary_source = (
1277+
sfs.mono.drivingfunction.esa_edge_25d_point(
1278+
omega, array.x, xs, xref=[2, -2, 0], alpha=3/2*np.pi))
1279+
plot(np.nan_to_num(d), selection, secondary_source)
1280+
12481281
"""
12491282
x0 = np.asarray(x0)
12501283
k = util.wavenumber(omega, c)

0 commit comments

Comments
 (0)