55
66
77def spherical_pw (N , k , r , setup ):
8- r"""Radial coefficients for a plane wave
8+ r"""Radial coefficients for a plane wave.
99
1010 Computes the radial component of the spherical harmonics expansion of a
1111 plane wave impinging on a spherical array.
@@ -18,7 +18,7 @@ def spherical_pw(N, k, r, setup):
1818 ----------
1919 N : int
2020 Maximum order.
21- k : array_like
21+ k : (M,) array_like
2222 Wavenumber.
2323 r : float
2424 Radius of microphone array.
@@ -27,7 +27,7 @@ def spherical_pw(N, k, r, setup):
2727
2828 Returns
2929 -------
30- numpy.ndarray
30+ bn : (M, N+1) numpy.ndarray
3131 Radial weights for all orders up to N and the given wavenumbers.
3232 """
3333 kr = util .asarray_1d (k * r )
@@ -40,7 +40,7 @@ def spherical_pw(N, k, r, setup):
4040
4141
4242def spherical_ps (N , k , r , rs , setup ):
43- r"""Radial coefficients for a point source
43+ r"""Radial coefficients for a point source.
4444
4545 Computes the radial component of the spherical harmonics expansion of a
4646 point source impinging on a spherical array.
@@ -53,7 +53,7 @@ def spherical_ps(N, k, r, rs, setup):
5353 ----------
5454 N : int
5555 Maximum order.
56- k : array_like
56+ k : (M,) array_like
5757 Wavenumber.
5858 r : float
5959 Radius of microphone array.
@@ -64,7 +64,7 @@ def spherical_ps(N, k, r, rs, setup):
6464
6565 Returns
6666 -------
67- numpy.ndarray
67+ bn : (M, N+1) numpy.ndarray
6868 Radial weights for all orders up to N and the given wavenumbers.
6969 """
7070 k = util .asarray_1d (k )
@@ -80,7 +80,7 @@ def spherical_ps(N, k, r, rs, setup):
8080
8181
8282def weights (N , kr , setup ):
83- r"""Radial weighing functions
83+ r"""Radial weighing functions.
8484
8585 Computes the radial weighting functions for diferent array types
8686 (cf. eq.(2.62), Rafaely 2015).
@@ -95,14 +95,14 @@ def weights(N, kr, setup):
9595 ----------
9696 N : int
9797 Maximum order.
98- kr : array_like
98+ kr : (M,) array_like
9999 Wavenumber * radius.
100100 setup : {'open', 'card', 'rigid'}
101101 Array configuration (open, cardioids, rigid).
102102
103103 Returns
104104 -------
105- numpy.ndarray
105+ bn : (M, N+1) numpy.ndarray
106106 Radial weights for all orders up to N and the given wavenumbers.
107107
108108 """
@@ -126,7 +126,28 @@ def weights(N, kr, setup):
126126
127127
128128def regularize (dn , a0 , method ):
129- """(cf. Rettberg, Spors : DAGA 2014)"""
129+ """Regularization (amplitude limitation) of radial filters.
130+
131+ Amplitude limitation of radial filter coefficients, methods according
132+ to (cf. Rettberg, Spors : DAGA 2014)
133+
134+ Parameters
135+ ----------
136+ dn : numpy.ndarray
137+ Values to be regularized
138+ a0 : float
139+ Parameter for regularization (not required for all methods)
140+ method : {'none', 'discard', 'softclip', 'Tikh', 'wng'}
141+ Method used for regularization/amplitude limitation
142+ (none, discard, hardclip, Tikhonov, White Noise Gain).
143+
144+ Returns
145+ -------
146+ dn : numpy.ndarray
147+ Regularized values.
148+ hn : array_like
149+
150+ """
130151
131152 idx = np .abs (dn ) > a0
132153
@@ -161,6 +182,20 @@ def regularize(dn, a0, method):
161182
162183
163184def diagonal_mode_mat (bk ):
185+ """Diagonal matrix of radial coefficients for all modes/wavenumbers.
186+
187+ Parameters
188+ ----------
189+ bk : (M, N+1) numpy.ndarray
190+ Vector containing values for all wavenumbers :math:`M` and modes up to
191+ order :math:`N`
192+
193+ Returns
194+ -------
195+ Bk : (M, (N+1)**2, (N+1)**2) numpy.ndarray
196+ Multidimensional array containing diagnonal matrices with input
197+ vector on main diagonal.
198+ """
164199 bk = _repeat_n_m (bk )
165200 if len (bk .shape ) == 1 :
166201 bk = bk [np .newaxis , :]
0 commit comments