Skip to content

Commit c9dce87

Browse files
committed
Secondary source selection for focused source
1 parent 6116a5e commit c9dce87

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

sfs/mono/drivingfunction.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,20 @@ def source_selection_line(n0, x0, xs):
164164
return source_selection_point(n0, x0, xs)
165165

166166

167-
def source_selection_focused(ns, xdef source_selection_all(N):
167+
def source_selection_focused(ns, x0, xs):
168+
"""Secondary source selection for a focused source.
169+
170+
Eq.(2.78) from [Wierstorf, 2014]
171+
172+
"""
173+
x0 = np.asarray(x0)
174+
xs = np.squeeze(np.asarray(xs))
175+
ns = np.squeeze(np.asarray(ns))
176+
ds = xs - x0
177+
return inner1d(ns, ds) >= defs.selection_tolerance
178+
179+
180+
def source_selection_all(N):
168181
"""Select all secondary sources."""
169182
return np.ones(N) >= 0
170183

0 commit comments

Comments
 (0)