pymodalib.implementations.python.wavelet.wavelet_transform module¶
Python implementation of the wavelet transform function.
-
class
LognormWavelet
(f0)¶ Bases:
pymodalib.implementations.python.wavelet.wavelet_transform.WindowParams
-
fwt
(xi)¶
-
module
(xi)¶
-
name
¶
-
-
class
MorletWavelet
(f0)¶ Bases:
pymodalib.implementations.python.wavelet.wavelet_transform.WindowParams
-
assume_ompeak
()¶
-
fwt
(xi)¶
-
has_twf
¶
-
module
(xi)¶
-
name
¶
-
twf
(t)¶
-
-
class
MorseWavelet
(a, f0)¶ Bases:
pymodalib.implementations.python.wavelet.wavelet_transform.WindowParams
-
fwt
(xi)¶
-
module
(xi)¶
-
name
¶
-
-
exception
WaveletWarning
¶ Bases:
RuntimeWarning
Warning which may be shown by the wavelet transform function.
-
class
WindowParams
¶ Bases:
object
-
C
= None¶
-
assume_ompeak
()¶
-
f0
= None¶
-
fwtmax
= None¶
-
has_twf
¶
-
omg
= None¶
-
ompeak
= None¶
-
t1
= -inf¶
-
t1e
= None¶
-
t1h
= None¶
-
t2
= inf¶
-
t2e
= None¶
-
t2h
= None¶
-
tpeak
= None¶
-
twf
(t)¶
-
twfmax
= None¶
-
xi1
= -inf¶
-
xi1e
= None¶
-
xi1h
= None¶
-
xi2
= inf¶
-
xi2e
= None¶
-
xi2h
= None¶
-
-
aminterp
(X, Y, Z, XI, YI, method)¶ In the Matlab implementation, this function exists for plotting.
Note: This function is incomplete.
-
fcast
(sig, fs, NP, fint, *args) → numpy.ndarray¶ Predictive padding function. Uses DFT and weighted least squares to find the main sinusoidal components present in the signal and uses them to predict the signal for NP consecutive time-steps.
The number of sinusoids is determined using Bayesian (Schwarz) information criterion, but it cannot exceed MaxOrder.
Parameters: - sig (ndarray) – The signal.
- fs (float) – Sampling frequency of the signal.
- NP (int) – Number of consecutive time-steps.
- fint (Tuple[float, float]) – The allowable frequency range for sinusoids: tones with frequencies outside the range are not continued for prediction.
- args (any) – If supplied, the first argument will be MaxOrder and the second will be the weighting, w, for the weighted least squares method.
Returns: Return type: The padding for the signal.
-
parcalc
(racc, L, wp, fwt, twf, disp_mode, f0, fmax, wavelet='Lognorm', fs=-1)¶
-
rand
(d0, d1, ..., dn)¶ Random values in a given shape.
Note
This is a convenience function for users porting code from Matlab, and wraps random_sample. That function takes a tuple to specify the size of the output, which is consistent with other NumPy functions like numpy.zeros and numpy.ones.
Create an array of the given shape and populate it with random samples from a uniform distribution over
[0, 1)
.Parameters: d0, d1, …, dn (int, optional) – The dimensions of the returned array, must be non-negative. If no argument is given a single Python float is returned. Returns: out – Random values. Return type: ndarray, shape (d0, d1, ..., dn)
See also
random()
Examples
>>> np.random.rand(3,2) array([[ 0.14022471, 0.96360618], #random [ 0.37601032, 0.25528411], #random [ 0.49313049, 0.94909878]]) #random
-
sqeps
(vfun, xp, lim1, lim2, racc, MIC, nlims)¶
-
wavelet_transform
(signal: numpy.ndarray, fs: float, wp: pymodalib.implementations.python.wavelet.wavelet_transform.WindowParams, fmin: float = None, fmax: float = None, padding: Union[int, str] = 'predictive', rel_tolerance: float = 0.01, preprocess: bool = False, disp_mode: bool = False, cut_edges: bool = False, nv: int = None, parallel: bool = None, return_opt: bool = False, *args, **kwargs)¶