Skip to content

Commit c0fd5bf

Browse files
committed
Update to new sfs plotting API
Done by the following commands: grep -rli "plot.soundfield" * | xargs -i@ \ sed -i "s/plot\.soundfield/plot2d\.amplitude/" @ grep -rli "plot.secondarysource_2d" * | xargs -i@ \ sed -i "s/plot\.secondarysource_2d/plot2d\.secondary_sources/" @
1 parent 412e9ef commit c0fd5bf

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

d_nfchoa/index.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ Plane Wave
3535
sfs.fd.nfchoa.plane_25d(omega, array.x, R0, nk)
3636
twin = sfs.tapering.none(selection)
3737
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
38-
sfs.plot.soundfield(p, grid)
39-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
38+
sfs.plot2d.amplitude(p, grid)
39+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
4040

4141
.. plot::
4242
:context:
@@ -154,8 +154,8 @@ Point Source
154154
twin = sfs.tapering.none(selection)
155155
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
156156
normalization = 20
157-
sfs.plot.soundfield(normalization * p, grid)
158-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
157+
sfs.plot2d.amplitude(normalization * p, grid)
158+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
159159

160160
.. plot::
161161
:context:

d_wfs/index.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Plane Wave
3030
sfs.fd.wfs.plane_25d(omega, array.x, array.n, npw, xref)
3131
twin = sfs.tapering.tukey(selection, .3)
3232
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
33-
sfs.plot.soundfield(p, grid, xref)
34-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
33+
sfs.plot2d.amplitude(p, grid, xref)
34+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
3535

3636
.. plot::
3737
:context:
@@ -135,8 +135,8 @@ Point Source
135135
sfs.fd.wfs.point_25d(omega, array.x, array.n, xs, xref)
136136
twin = sfs.tapering.tukey(selection, .3)
137137
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
138-
sfs.plot.soundfield(p, grid)
139-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
138+
sfs.plot2d.amplitude(p, grid)
139+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
140140

141141
.. plot::
142142
:context:
@@ -289,8 +289,8 @@ Line Source
289289
twin = sfs.tapering.tukey(selection, .3)
290290
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
291291
normalization = 7
292-
sfs.plot.soundfield(normalization * p, grid)
293-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
292+
sfs.plot2d.amplitude(normalization * p, grid)
293+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
294294

295295
.. plot::
296296
:context:
@@ -397,8 +397,8 @@ Focused Source
397397
sfs.fd.wfs.focused_25d(omega, array.x, array.n, xs, ns, xref)
398398
twin = sfs.tapering.tukey(selection, .3)
399399
p = sfs.fd.synthesize(d, twin, array, secondary_source, grid=grid)
400-
sfs.plot.soundfield(p, grid)
401-
sfs.plot.secondarysource_2d(array.x, array.n, grid)
400+
sfs.plot2d.amplitude(p, grid)
401+
sfs.plot2d.secondary_sources(array.x, array.n, grid)
402402

403403
.. plot::
404404
:context:

sources/index.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Plane Wave
3131
omega = 2 * np.pi * 800 # frequency
3232
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
3333
p = sfs.fd.source.plane(omega, xs, nk, grid)
34-
sfs.plot.soundfield(p, grid)
34+
sfs.plot2d.amplitude(p, grid)
3535

3636
.. plot::
3737
:context:
@@ -117,7 +117,7 @@ Point Source
117117
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
118118
p = sfs.fd.source.point(omega, xs, grid)
119119
normalization = 4 * np.pi
120-
sfs.plot.soundfield(normalization * p, grid)
120+
sfs.plot2d.amplitude(normalization * p, grid)
121121

122122
.. plot::
123123
:context:
@@ -197,7 +197,7 @@ Dipole Point Source
197197
omega = 2 * np.pi * 800 # frequency
198198
grid = sfs.util.xyz_grid([-1.75, 1.75], [-1.75, 1.75], 0, spacing=0.02)
199199
p = sfs.fd.source.point_dipole(omega, xs, ns, grid)
200-
sfs.plot.soundfield(p, grid)
200+
sfs.plot2d.amplitude(p, grid)
201201

202202
.. plot::
203203
:context:
@@ -261,7 +261,7 @@ Line Source
261261
p = sfs.fd.source.line(omega, xs, grid)
262262
normalization = (np.sqrt(8 * np.pi * omega / sfs.default.c)
263263
* np.exp(1j * np.pi / 4))
264-
sfs.plot.soundfield(normalization * p, grid)
264+
sfs.plot2d.amplitude(normalization * p, grid)
265265

266266
.. plot::
267267
:context:

0 commit comments

Comments
 (0)