Skip to content

Commit 1acd362

Browse files
committed
remove and fix docstrings
1 parent 859c043 commit 1acd362

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

micarray/modal/radial.py

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def circular_pw(N, k, r, setup):
239239
240240
.. math::
241241
242-
\mathring{P}_n(k) = i^{-n} b_n(kr)
242+
\mathring{P}_n(k) = i^n b_n(kr)
243243
244244
Parameters
245245
----------
@@ -254,14 +254,14 @@ def circular_pw(N, k, r, setup):
254254
255255
Returns
256256
-------
257-
bn : (M, N+1) numpy.ndarray
257+
bn : (M, 2*N+1) numpy.ndarray
258258
Radial weights for all orders up to N and the given wavenumbers.
259259
"""
260260
kr = util.asarray_1d(k*r)
261261
n = np.roll(np.arange(-N, N+1), -N)
262262

263263
bn = circ_radial_weights(N, kr, setup)
264-
return (1j)**(n) * bn
264+
return 1j**n * bn
265265

266266

267267
def circular_ls(N, k, r, rs, setup):
@@ -289,7 +289,7 @@ def circular_ls(N, k, r, rs, setup):
289289
290290
Returns
291291
-------
292-
bn : (M, N+1) numpy.ndarray
292+
bn : (M, 2*N+1) numpy.ndarray
293293
Radial weights for all orders up to N and the given wavenumbers.
294294
"""
295295
k = util.asarray_1d(k)
@@ -301,8 +301,8 @@ def circular_ls(N, k, r, rs, setup):
301301
bn = bn[np.newaxis, :]
302302
for i, x in enumerate(krs):
303303
Hn = special.hankel2(n, x)
304-
bn[i, :] = bn[i, :] * -1j/4 * Hn
305-
return np.squeeze(bn)
304+
bn[i, :] = bn[i, :] * Hn
305+
return -1j/4 * np.squeeze(bn)
306306

307307

308308
def circ_radial_weights(N, kr, setup):
@@ -327,7 +327,7 @@ def circ_radial_weights(N, kr, setup):
327327
328328
Returns
329329
-------
330-
bn : (M, N+1) numpy.ndarray
330+
bn : (M, 2*N+1) numpy.ndarray
331331
Radial weights for all orders up to N and the given wavenumbers.
332332
333333
"""
@@ -374,27 +374,3 @@ def circ_diagonal_mode_mat(bk):
374374
for k in range(K):
375375
Bk[k, :, :] = np.diag(bk[k, :])
376376
return np.squeeze(Bk)
377-
378-
379-
def mirror_vec(v):
380-
"""Mirror elements in a vector.
381-
382-
Returns a vector of length *2*len(v)-1* with symmetric elements.
383-
The first *len(v)* elements are the same as *v* and the last *len(v)-1*
384-
elements are *v[:0:-1]*. The function can be used to order the circular
385-
harmonic coefficients. If *v* is a matrix, it is treated as a stack of
386-
vectors residing in the last index and broadcast accordingly.
387-
388-
Parameters
389-
----------
390-
v : (, N+1) numpy.ndarray
391-
Input vector of stack of input vectors
392-
393-
Returns
394-
-------
395-
: (, 2*N+1) numpy.ndarray
396-
Vector of stack of vectors containing mirrored elements
397-
"""
398-
if len(v.shape) == 1:
399-
v = v[np.newaxis, :]
400-
return np.concatenate((v, v[:, :0:-1]), axis=1)

0 commit comments

Comments
 (0)