-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Description
At the moment we can change the frequency of the resulting sound field of a plane wave by using non unity vectors for specifying the direction. I don't know if this is desired behavior, but I would suggest to change it to at least raise a warning or an error. Or maybe to some automatic normalization of the directional vector.
import numpy as np
import matplotlib.pyplot as plt
import sfs
grid = sfs.util.xyz_grid([-2, 2], [-2, 2], 0, spacing=0.01)
x0 = 0, 0, 0
npw = 0, -1, 0
f = 1000
omega = 2 * np.pi * f
p_plane = sfs.mono.source.plane(omega, x0, npw, grid);
sfs.plot.soundfield(p_plane, grid);
plt.title('Plane wave with npw = {}'.format(npw));
plt.savefig('pw1.png')
npw = 0, -2, 0
p_plane = sfs.mono.source.plane(omega, x0, npw, grid);
sfs.plot.soundfield(p_plane, grid);
plt.title('Plane wave with npw = {}'.format(npw));
plt.savefig('pw2.png')Metadata
Metadata
Assignees
Labels
No labels

