tfmri.signal.max_wavelet_level

max_wavelet_level(shape, wavelet_or_length, axes=None)[source]

Computes the maximum useful level of wavelet decomposition.

Returns the maximum level of decomposition suitable for use with tfmri.signal.wavedec.

The level returned is the minimum along all axes.

Examples

>>> import tensorflow_mri as tfmri
>>> tfmri.signal.max_wavelet_level((64, 32), 'db2')
3
Parameters
  • shape – An int or a list thereof. The input shape.

  • wavelet_or_length

    A str, a `pywt.Wavelet`_. Alternatively, it may also be an int representing the length of the decomposition filter. This can also be a list containing a wavelet or filter length for each axis.

  • axes

    An list of int. Axes over which the DWT is to be computed. If None (default), it is assumed that the DWT will be computed along all axes.

Returns

An int representing the maximum useful level of decomposition.