MCPcopy Create free account
hub / github.com/PyWavelets/pywt / mran

Function mran

pywt/_mra.py:290–403  ·  view source on GitHub ↗

Forward nD multiresolution analysis. It is a projection onto the wavelet subspaces. Parameters ---------- data: array_like Input data wavelet : Wavelet object or name string, or tuple of wavelets Wavelet to use. This can also be a tuple containing a wavelet to

(data, wavelet, level=None, axes=None, transform='swtn',
         mode='periodization')

Source from the content-addressed store, hash-verified

288
289
290def mran(data, wavelet, level=None, axes=None, transform='swtn',
291 mode='periodization'):
292 """Forward nD multiresolution analysis.
293
294 It is a projection onto the wavelet subspaces.
295
296 Parameters
297 ----------
298 data: array_like
299 Input data
300 wavelet : Wavelet object or name string, or tuple of wavelets
301 Wavelet to use. This can also be a tuple containing a wavelet to
302 apply along each axis in `axes`.
303 level : int, optional
304 Decomposition level (must be >= 0). If level is None (default) then it
305 will be calculated using the `dwt_max_level` function.
306 axes : tuple of ints, optional
307 Axes over which to compute the DWT. Repeated elements are not allowed.
308 transform : {'dwtn', 'swtn'}
309 Whether to use the DWT or SWT for the transforms.
310 mode : str or tuple of str, optional
311 Signal extension mode, see `Modes` (default: 'symmetric'). This option
312 is only used when transform='dwtn'.
313
314 Returns
315 -------
316 coeffs : list
317 For more information, see the detailed description in `wavedecn`.
318
319 See Also
320 --------
321 imran, swtn
322
323 Notes
324 -----
325 This is sometimes referred to as an additive decomposition because the
326 inverse transform (``imran``) is just the sum of the coefficient arrays
327 [1]_. The decomposition using ``transform='dwt'`` corresponds to section
328 2.2 while that using an undecimated transform (``transform='swt'``) is
329 described in section 3.2 and appendix A.
330
331 This transform does not share the variance partition property of ``swtn``
332 with `norm=True`. It does however, result in coefficients that are
333 temporally aligned regardless of the symmetry of the wavelet used.
334
335 The redundancy of this transform is ``(2**n - 1) * level + 1`` where ``n``
336 corresponds to the number of axes transformed.
337
338 References
339 ----------
340 .. [1] Donald B. Percival and Harold O. Mofjeld. Analysis of Subtidal
341 Coastal Sea Level Fluctuations Using Wavelets. Journal of the American
342 Statistical Association Vol. 92, No. 439 (Sep., 1997), pp. 868-880.
343 https://doi.org/10.2307/2965551
344 """
345 axes, axes_shapes, ndim_transform = _prep_axes_wavedecn(data.shape, axes)
346 wavelets = _wavelets_per_axis(wavelet, axes)
347

Callers

nothing calls this directly

Calls 4

_prep_axes_wavedecnFunction · 0.85
_wavelets_per_axisFunction · 0.85
swt_max_levelFunction · 0.85
_modes_per_axisFunction · 0.85

Tested by

no test coverage detected