Skip to content

Commit 84435bd

Browse files
committed
Update wfs.py
- use f_tmp / omega_tmp for the two ref contour examples only
1 parent 04361c7 commit 84435bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sfs/fd/wfs.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ def point_25d(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
225225
xref_line = 0 # reference contour is a straight line
226226
227227
lmb = 1 / 4 # m
228-
f = sfs.default.c / lmb # Hz
229-
omega = 2 * np.pi * f # rad/s
228+
f_tmp = sfs.default.c / lmb # Hz
229+
omega_tmp = 2 * np.pi * f_tmp # rad/s
230230
231231
# calc reference contour xref(x0):
232232
x0_tmp = array2.x.T[np.newaxis, :]
@@ -248,7 +248,7 @@ def point_25d(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
248248
xref = np.squeeze(xref).T
249249
250250
d, selection, secondary_source = sfs.fd.wfs.point_25d(
251-
omega, array2.x, array2.n, xs, xref=xref)
251+
omega_tmp, array2.x, array2.n, xs, xref=xref)
252252
normalize_gain = 4 * np.pi * np.linalg.norm(xs)
253253
p = sfs.fd.synthesize(d * normalize_gain,
254254
selection,
@@ -283,8 +283,8 @@ def point_25d(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
283283
xref_dist = 4 # radius for reference contour circle with origin xs
284284
285285
lmb = 1 / 4 # m
286-
f = sfs.default.c / lmb # Hz
287-
omega = 2 * np.pi * f # rad/s
286+
f_tmp = sfs.default.c / lmb # Hz
287+
omega_tmp = 2 * np.pi * f_tmp # rad/s
288288
289289
# calc reference contour xref(x0):
290290
x0_tmp = array2.x.T[np.newaxis, :]
@@ -296,7 +296,7 @@ def point_25d(omega, x0, n0, xs, xref=[0, 0, 0], c=None, omalias=None):
296296
xref = np.squeeze(xref).T
297297
298298
d, selection, secondary_source = sfs.fd.wfs.point_25d(
299-
omega, array2.x, array2.n, xs, xref=xref)
299+
omega_tmp, array2.x, array2.n, xs, xref=xref)
300300
normalize_gain = 4 * np.pi * np.linalg.norm(xs)
301301
p = sfs.fd.synthesize(d * normalize_gain,
302302
selection,

0 commit comments

Comments
 (0)