## 3 Materials and Methods
### Time Series Decomposition
Figure 7 presents the theoretical distribution of frequency over time, where low frequencies (at the bottom of the image) are present throughout the entire signal, while higher frequencies (moving upward) may appear or disappear. This example illustrates the use of the Continuous Wavelet Transform (CWT), which analyzes the signal across all frequencies within a defined range (typically from the lowest to selected higher frequencies). There is also the Discrete Wavelet Transform (DWT), which is particularly useful for tasks such as signal smoothing. In Fourier analysis, the fundamental functions used to examine the frequency components are sine and cosine waves. In the case of wavelets, there is significantly greater flexibility in the choice of analysis functions [59; 60]. The following formula defines the Continuous Wavelet Transform (13),  
\[X_{WT}(a,b)=\frac{1}{\sqrt{|a|}}\int_{-\infty}^{\infty}x(t)\psi^{*}\bigg{(} \frac{t-b}{b}\bigg{)}dt \tag{13}\]  
where:  
\(a\)--denotes the scale,  
\(b\)--the time shift,  
\(\psi\)--the mother wavelet,  
\(\psi^{*}(t)\)--the complex conjugate of the wavelet function. The principle behind this analysis is straightforward: the mother wavelet is scaled by the coefficient \(a\) (which changes the frequency) and shifted along the time axis by window \(b\). The correlation between the wavelet function \(\psi\) and the analyzed signal is then computed. These correlations are used to calculate the coefficients for each frequency. The CWT coefficients are complex numbers. Based on these, the following fundamental signal characteristics are determined:  
* Local amplitude: \(A(a,b)=\mid W(a,b)\mid\)
* Local phase: \(\phi(a,b)=arg(W(a,b))\)
* Local power: \(P(a,b)=\mid W(a,b)\mid\)  
The mother wavelet must satisfy the following criteria:  
1. The wavelet must have finite energy (14). \[E=\int_{-\infty}^{\infty}|\psi(t)\mid^{2}dt<\infty \tag{14}\]  
Figure 7: Multiresolution in the time–frequency domain. The wavelet must not contain a zero (DC) frequency component, i.e., the average value of the wavelet should be zero (15). Figure 6:0 (15)
3. For complex wavelets, the Fourier transform must be real and must vanish for negative frequencies [59]. The choice of mother wavelet depends on the type of data being analyzed (Figure 8). For example: - Daubechies (dbN)--used in data compression (e.g., JPEG2000), denoising EEG and ECG signals, and in geophysics. - Symlets--applied in image and signal analysis, where preserving symmetry and ensuring high-quality reconstruction are important. - Coiflets--used in biomedical studies, speech signal analysis, and in the analysis of non-stationary signals with varying trends. - Biorthogonal wavelets--ideal for image compression and encoding, as they allow for accurate reconstruction and symmetric transformations. - Mexican Hat and Morlet--used in geophysics (e.g., earthquake analysis), astronomy (point source detection), and image processing (edge and contour detection). Figure 6:1 Examples of the shapes of different wavelets. There also exists a function, as in the case of Fourier analysis, that enables the inverse transform (16). Figure 6:2  
Below is a scalogram (Figure 9) of an artificial signal composed of three consecutive functions, conducted using the Morlet wavelet (17). Figure 6:3  
Figure 6:4 Scalograms and reconstructed signals in a concatenated time series. Explanations: top figure - green dots indicate the analyzed signal, pink line indicates the reconstructed signal at the selected frequency. The middle figure: on the left, the sum of the energy at each frequency is marked in blue. The red line indicates the power of the red noise. If the peaks on the blue line exceed the power of the noise, this indicates the signal’s significance. The green line indicates the selected scale/frequency. The middle figure on the right: a scalogram shows the signal energy for each scale/frequency. The line indicates the selected frequency. The green line and the line in the scalogram are the same line, representing the selected frequency.