pyhctsa.operations.wavelet.modwt_var¶
-
pyhctsa.operations.wavelet.modwt_var(y, w_name=
'db3', level=5)¶ Multiscale variance decomposition via the maximal overlap DWT.
Decomposes the time series into octave-scale bands using the maximal overlap discrete wavelet transform (MODWT) and computes summary statistics on how variance is distributed across scales. Unlike the standard (decimated) DWT used elsewhere in this codebase, the MODWT is shift-invariant and its associated variance estimator uses only the coefficients unaffected by the boundary at each level: the mean square of the unaffected coefficients of each detail level, and the variance about the mean of those of the scaling band (Percival & Walden, 2000, DOI 10.1017/CBO9780511841040).
- Parameters:¶
- y : array-like¶
The input time series.
- w_name : str, optional¶
The mother wavelet, e.g.,
'db3','sym2'. Default is'db3'.- level : int or 'max', optional¶
The level of wavelet decomposition (can be set to ‘max’ for the maximum level supported by the series length and wavelet,
floor(log2((N - 1)/(L - 1) + 1))with L the filter length). A level that is too large is reduced to the maximum, so that every level, and the scaling band, has at least one coefficient unaffected by the boundary. Default is 5.
- Returns:¶
Dictionary containing:
’scalingFrac’: the fraction of variance in the lowest-frequency (scaling/trend) band – the part of the signal not resolved by any detail level.
’domlevel’: the level (1 = highest frequency, …, level+1 = scaling/trend band) that carries the most variance.
’decaySlope’: the slope of log2(variance) vs. level across the detail bands – a wavelet-based scaling exponent, analogous to a Hurst estimate but using the MODWT’s unbiased, boundary-corrected variance rather than an ad hoc regression on raw coefficients.
- Return type:¶
dict