Inverse Stationary Wavelet Transform¶
Inverse stationary wavelet transforms are provided.
Note: These inverse transforms are not yet optimized for speed. Only, the
ndimensional inverse transform currently has axes
support.
Multilevel 1D iswt
¶

pywt.
iswt
(coeffs, wavelet, norm=False)¶ Multilevel 1D inverse discrete stationary wavelet transform.
Parameters:  coeffs : array_like
Coefficients list of tuples:
[(cAn, cDn), ..., (cA2, cD2), (cA1, cD1)]
where cA is approximation, cD is details. Index 1 corresponds to
start_level
frompywt.swt
. wavelet : Wavelet object or name string
Wavelet to use
 norm : bool, optional
Controls the normalization used by the inverse transform. This must be set equal to the value that was used by
pywt.swt
to preserve the energy of a roundtrip transform.
Returns:  1D array of reconstructed data.
Examples
>>> import pywt >>> coeffs = pywt.swt([1,2,3,4,5,6,7,8], 'db2', level=2) >>> pywt.iswt(coeffs, 'db2') array([ 1., 2., 3., 4., 5., 6., 7., 8.])
Multilevel 2D iswt2
¶

pywt.
iswt2
(coeffs, wavelet, norm=False)¶ Multilevel 2D inverse discrete stationary wavelet transform.
Parameters:  coeffs : list
Approximation and details coefficients:
[ (cA_n, (cH_n, cV_n, cD_n) ), ..., (cA_2, (cH_2, cV_2, cD_2) ), (cA_1, (cH_1, cV_1, cD_1) ) ]
where cA is approximation, cH is horizontal details, cV is vertical details, cD is diagonal details and n is the number of levels. Index 1 corresponds to
start_level
frompywt.swt2
. wavelet : Wavelet object or name string, or 2tuple of wavelets
Wavelet to use. This can also be a 2tuple of wavelets to apply per axis.
 norm : bool, optional
Controls the normalization used by the inverse transform. This must be set equal to the value that was used by
pywt.swt2
to preserve the energy of a roundtrip transform.
Returns:  2D array of reconstructed data.
Examples
>>> import pywt >>> coeffs = pywt.swt2([[1,2,3,4],[5,6,7,8], ... [9,10,11,12],[13,14,15,16]], ... 'db1', level=2) >>> pywt.iswt2(coeffs, 'db1') array([[ 1., 2., 3., 4.], [ 5., 6., 7., 8.], [ 9., 10., 11., 12.], [ 13., 14., 15., 16.]])
Multilevel ndimensional iswtn
¶

pywt.
iswtn
(coeffs, wavelet, axes=None, norm=False)¶ Multilevel nD inverse discrete stationary wavelet transform.
Parameters:  coeffs : list
[{coeffs_level_n}, …, {coeffs_level_1}]: list of dict
 wavelet : Wavelet object or name string, or tuple of wavelets
Wavelet to use. This can also be a tuple of wavelets to apply per axis in
axes
. axes : sequence of ints, optional
Axes over which to compute the inverse SWT. Axes may not be repeated. The default is
None
, which means transform all axes (axes = range(data.ndim)
). norm : bool, optional
Controls the normalization used by the inverse transform. This must be set equal to the value that was used by
pywt.swtn
to preserve the energy of a roundtrip transform.
Returns:  nD array of reconstructed data.
Examples
>>> import pywt >>> coeffs = pywt.swtn([[1,2,3,4],[5,6,7,8], ... [9,10,11,12],[13,14,15,16]], ... 'db1', level=2) >>> pywt.iswtn(coeffs, 'db1') array([[ 1., 2., 3., 4.], [ 5., 6., 7., 8.], [ 9., 10., 11., 12.], [ 13., 14., 15., 16.]])