A wrapper around wavedec(). It performs discrete wavelet decomposition and return the coefficients as a pyrem.polygram.Polygram. It allows to select the wavelet coefficients to keep and can perform preliminary resampling of the signal. In the resulting polygram, the names of the coefficients will be suffixed by an an identifier describing their respective levels (i.e. cD_1, cD_2, ..., cD_N, cA_N). The sampling frequency of coefficients will also be automatically computed.
>>> import numpy as np
>>> import pyrem as pr
>>> noise = np.random.normal(size=int(1e6))
>>> sig = pr.time_series.Signal(noise, 256.0,
>>> name="channel_1")
>>> name="channel_1")
>>> pol = pr.wavelet_decomposition decompose_signal(sig)
>>> pol
Polygram
----
Duration: 1:05:06.250000 (HH:mm:ss)
N signals: 6
N annotations: 0
Metadata:
None
----
Channel information:
Name Type fs(Hz) Duration
0 channel_1_cA_5 None 8.0 1:05:06.250000
1 channel_1_cD_1 None 128.0 1:05:06.250000
2 channel_1_cD_2 None 64.0 1:05:06.250000
3 channel_1_cD_3 None 32.0 1:05:06.250000
4 channel_1_cD_4 None 16.0 1:05:06.250000
5 channel_1_cD_5 None 8.0 1:05:06.250000
Parameters: |
|
---|---|
Returns: | A polygram with all the requested coefficients |
Return type: |