tfmri.signal.dwt
tfmri.signal.dwt¶
- dwt(data, wavelet, mode='symmetric', axes=None)[source]¶
Single-level N-dimensional discrete wavelet transform (DWT).
- Parameters
data – A tf.Tensor of real or complex type.
wavelet –
A str or a pywt.Wavelet, or a list thereof. When passed a list, different wavelets are applied along each axis in
axes
.mode –
A str. The padding or signal extension mode. Must be one of the values supported by tf.pad. Defaults to
'symmetric'
.axes –
A list of int. Axes over which to compute the DWT. Repeated elements mean the DWT will be performed multiple times along these axes. A value of None (the default) selects all axes.
- Returns
A dict where key specifies the transform type on each dimension and value is an N-dimensional tf.Tensor containing the corresponding coefficients.
For example, for a 2D case the result will have keys
'aa'
(approximation on 1st dimension, approximation on 2nd dimension),'ad'
(approximation on 1st dimension, detail on 2nd dimension),'da'
(detail on 1st dimension, approximation on 2nd dimension), and'dd'
(detail on 1st dimension, detail on 2nd dimension).For user-specified
axes
, the order of the characters in the dictionary keys map to the specifiedaxes
.- Raises
ValueError – If any of the inputs is not valid.