diff --git a/ltfatpy/fourier/dcti.py b/ltfatpy/fourier/dcti.py index c5c0a1424b7da4d3617d2970a8b9a608134798df..de8f304803df66e3da6ff11912f06e78a80bc751 100644 --- a/ltfatpy/fourier/dcti.py +++ b/ltfatpy/fourier/dcti.py @@ -115,7 +115,7 @@ def dcti(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\text{ or }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{ or }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dctii.py b/ltfatpy/fourier/dctii.py index 123c1fc20af05a99b3c350bbadbf569af837fafa..c8303f20a4631249175e9b505555c02b8520c929 100644 --- a/ltfatpy/fourier/dctii.py +++ b/ltfatpy/fourier/dctii.py @@ -107,7 +107,7 @@ def dctii(f, L=None, dim=None): The transform is real (output is real if input is real) and it is orthonormal. - This is the inverse of \|dctiii\|. + This is the inverse of \\|dctiii\\|. Let f be a signal of length **L**, let :math:`c=dctii(f)` and define the vector **w** of length **L** by @@ -117,7 +117,7 @@ def dctii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\\ 1 & \\text{otherwise}\\end{cases} + \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dctiii.py b/ltfatpy/fourier/dctiii.py index 7c0542dfc1c74437b8a12d1be5773d2ef89b8fa3..506a78df0c1334c754464ff7ec1b3b97a735c080 100644 --- a/ltfatpy/fourier/dctiii.py +++ b/ltfatpy/fourier/dctiii.py @@ -105,7 +105,7 @@ def dctiii(f, L=None, dim=None): The transform is real (output is real if input is real) and it is orthonormal. - This is the inverse of \|dctii\|. + This is the inverse of \\|dctii\\|. Let f be a signal of length **L**, let :math:`c=dctiii(f)` and define the vector **w** of length **L** by @@ -115,7 +115,7 @@ def dctiii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\text{ or }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{ or }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dstii.py b/ltfatpy/fourier/dstii.py index 800c544777e634ffdc82da1ab2cb9249c7d90ea7..f0348427d20b38cd0681fac5345f73dc2dd22eee 100644 --- a/ltfatpy/fourier/dstii.py +++ b/ltfatpy/fourier/dstii.py @@ -103,7 +103,7 @@ def dstii(f, L=None, dim=None): The transform is real (output is real if input is real) and orthonormal. - The inverse transform of \\|dstii\| is \\|dstiii\|. + The inverse transform of \\|dstii\\| is \\|dstiii\\|. Let **f** be a signal of length **L**, let ``c=dstii(f)`` and define the vector **w** of length **L** by @@ -113,7 +113,7 @@ def dstii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & - \\text{if }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{if }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dstiii.py b/ltfatpy/fourier/dstiii.py index 0a0359e4e9e9db2e36e3b5edadab3e32be1ea35d..a0ce139a23ba5f2fe65867171da4a4a7fc57e314 100644 --- a/ltfatpy/fourier/dstiii.py +++ b/ltfatpy/fourier/dstiii.py @@ -113,7 +113,7 @@ def dstiii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & - \\text{if }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{if }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/psech.py b/ltfatpy/fourier/psech.py index 58cfd3cc0f1f572de8e53720effd92e5c6da8c00..aff6dc9fa8080115dece2fc183f78e5a0ea97019 100644 --- a/ltfatpy/fourier/psech.py +++ b/ltfatpy/fourier/psech.py @@ -91,7 +91,7 @@ def psech(L, tfr=None, s=None, **kwargs): ``psech(L,tfr)`` computes samples of a periodized hyperbolic secant. The function returns a regular sampling of the periodization - of the function :math:`sech(\pi\cdot x)` + of the function :math:`sech(\\pi\\cdot x)` The returned function has norm equal to 1. diff --git a/ltfatpy/gabor/dgt.py b/ltfatpy/gabor/dgt.py index 8be57a9c226a2f52f08e4f0df5b45b123aedf8f2..1f01630d9dc9da1ad31fc7aa9966e171d015d414 100644 --- a/ltfatpy/gabor/dgt.py +++ b/ltfatpy/gabor/dgt.py @@ -173,7 +173,7 @@ def dgt(f, g, a, M, L=None, pt='freqinv'): c\\left(m+1,n+1\\right)=\\sum_{l=0}^{L-1}f(l+1)\\overline{g(l-an+1)} e^{-2\\pi ilm/M} - where :math:`m=0,\ldots,M-1`, :math:`n=0, \\ldots,N-1` and :math:`l-an` + where :math:`m=0,\\ldots,M-1`, :math:`n=0, \\ldots,N-1` and :math:`l-an` are computed modulo **L**. - Additional parameters: diff --git a/ltfatpy/gabor/idgt.py b/ltfatpy/gabor/idgt.py index df7da923da9a08640aeb650bf8de4da60dc79672..35f8cb1a1a185e6d4a916aa551de59b23b687501 100644 --- a/ltfatpy/gabor/idgt.py +++ b/ltfatpy/gabor/idgt.py @@ -117,7 +117,7 @@ def idgt(coef, g, a, Ls=None, pt='freqinv'): one column vector for each of the TF-planes in **c**. Assume that ``f=idgt(c, g, a, L)`` for an array **c** of size - :math:`M \times N`. Then the following holds for :math:`k=0,\ldots,L-1`: + :math:`M \\times N`. Then the following holds for :math:`k=0,\\ldots,L-1`: .. math:: diff --git a/ltfatpy/gabor/phaselock.py b/ltfatpy/gabor/phaselock.py index 5e5d5443cdf0ace9a63fa2d2cf8034b95c3459f1..5a4a47291c08563c6d7b46b8a6fda7f1dbcc0f52 100644 --- a/ltfatpy/gabor/phaselock.py +++ b/ltfatpy/gabor/phaselock.py @@ -103,8 +103,8 @@ def phaselock(c, a): c(m+1,n+1) = sum f(l+1)*exp(-2*pi*i*m*(l-n*a)/M)*conj(g(l-a*n+1)), l=0 - .. math:: c\\left(m+1,n+1\\right)=\sum_{l=0}^{L-1}f(l+1) - e^{-2\pi im(l-na)/M}\overline{g(l-an+1)}, + .. math:: c\\left(m+1,n+1\\right)=\\sum_{l=0}^{L-1}f(l+1) + e^{-2\\pi im(l-na)/M}\\overline{g(l-an+1)}, where ``m = 0,..., M-1`` and ``n = 0,..., N-1`` and ``l-a*n`` are computed modulo ``L``. diff --git a/ltfatpy/gabor/tfplot.py b/ltfatpy/gabor/tfplot.py index a5aa845e57df12a53526bdaeb7f8a231dbea68ee..670d054de7da55398a33f83dadea6999451ae85e 100644 --- a/ltfatpy/gabor/tfplot.py +++ b/ltfatpy/gabor/tfplot.py @@ -123,12 +123,12 @@ def tfplot(coef, step, yr, fs=None, dynrange=None, normalization='db', Possible values for **normalization**: ============ ========================================================== - ``'db'`` Apply :math:`20*\log_{10}` to the coefficients. This makes + ``'db'`` Apply :math:`20*\\log_{10}` to the coefficients. This makes it possible to see very weak phenomena, but it might show too much noise. A logarithmic scale is more adapted to perception of sound. This is the default. - ``'dbsq'`` Apply :math:`10*\log_{10}` to the coefficients. Same as + ``'dbsq'`` Apply :math:`10*\\log_{10}` to the coefficients. Same as the ``'db'`` option, but assume that the input is already squared. diff --git a/ltfatpy/sigproc/normalize.py b/ltfatpy/sigproc/normalize.py index 5c4b08958b1cfe13364ee3642d4ed747fd1eb9e6..7d2971dea4a2fa4fcc65c6a6d146a43d759b9486 100644 --- a/ltfatpy/sigproc/normalize.py +++ b/ltfatpy/sigproc/normalize.py @@ -145,10 +145,10 @@ def normalize(f, norm='2', dim=None): fnorm[ii] = LA.norm(f[:, ii], np.inf) f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 'rms': - fnorm[ii] = rms(f[:, ii]) + fnorm[ii] = rms(f[:, ii]).item() f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 's0': - fnorm[ii] = s0norm(f[:, ii]) + fnorm[ii] = s0norm(f[:, ii]).item() f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 'wav': if np.issubdtype(f.dtype, np.floating):