|
60 | 60 | " sfs.plot2d.amplitude(p, grid, vmax=2, vmin=-2, ax=ax_amp)\n",
|
61 | 61 | " sfs.plot2d.level(p, grid, vmax=6, vmin=-6, ax=ax_lvl)\n",
|
62 | 62 | " sfs.plot2d.level_contour(p, grid, levels=[0], colors='w', ax=ax_lvl)\n",
|
63 |
| - " if xref.shape[0] != N:\n", |
64 |
| - " xref = np.broadcast_to(xref, (N, 3))\n", |
| 63 | + " xref = np.broadcast_to(xref, array.x.shape)\n", |
65 | 64 | " for ax in ax_amp, ax_lvl:\n",
|
66 | 65 | " sfs.plot2d.loudspeakers(array.x, array.n, selection, size=0.125, ax=ax)\n",
|
67 | 66 | " ax_lvl.scatter(*xref[selection, :2].T, marker='o', s=20, c='lightsalmon',\n",
|
|
177 | 176 | " omega, array.x, array.n, xs)\n",
|
178 | 177 | "p_point = sound_field(\n",
|
179 | 178 | " d * normalize_gain, selection, array, secondary_source,\n",
|
180 |
| - " grid, np.array([[0, 0, 0]]))" |
| 179 | + " grid, [0, 0, 0])" |
181 | 180 | ]
|
182 | 181 | },
|
183 | 182 | {
|
|
208 | 207 | " omega, array.x, array.n, xs, xref=xref)\n",
|
209 | 208 | "p_point = sound_field(\n",
|
210 | 209 | " d * normalize_gain, selection, array, secondary_source,\n",
|
211 |
| - " grid, np.array([xref]))\n", |
| 210 | + " grid, xref)\n", |
212 | 211 | "\n",
|
213 | 212 | "# plot stationary phase rays\n",
|
214 | 213 | "# one ray connects the virtual source with one activate loudspeaker\n",
|
|
0 commit comments