## 2 Materials and Methods
### Time-Frequency Transformation: Scalograms and Spectrograms  
A spectrogram is a visual representation of the spectrum frequencies of a signal as it varies with time. A spectrogram can be generated in various ways. In this work, the STFT and CWT were used to generate spectrograms. In particular, with the wavelet transform, the images generated are also known as scalograms. In this work, the nomenclature \"spectrograms\" refer to the STFT images only, while \"scalograms\" refer to the CWT images. One way to create a spectrogram from a time-domain signal is to approximate it through the use of a filterbank that results from a series of band-pass filters; otherwise, it is possible to do it through the repetitive use of the Fast Fourier Transform (FFT) algorithm. In this second approach, which is much more widespread in digital signal processing, the digitally sampled data in the time-domain are subdivided into windows, which usually overlap each other, and then Fourier transformed to calculate the frequency spectrum of each window. Every window spectrum then corresponds to a vertical line in the image in which the color intensity is proportional to the relative magnitude of the signal at the considered frequency. These line spectra are then laid \"side by side\" or slightly overlapped with windowing functions to form the complete spectrogram image. With the STFT, the main limitation is that the resolution is fixed. The width of the retrieved windows determines whether there is a good frequency resolution, in which two near harmonics can be distinguished on the spectra, or a good time resolution, with which one can see the rapid changes in time of the frequency components. This is summarized by the Gabor limit, which states that a signal cannot be simultaneously sharply localized in the time and frequency domain with the STFT. In the continuous-time case of the short-time Fourier transform, the function to be transformed is multiplied by a function which is always zero except for a short time-period (a window function). The Fourier transform of the signal is composed as the window shifts along the time axis, resulting in a two-dimensional representation of the signal [44]:  
\[STFT\{x(t)\}(\tau,\omega)\equiv X(\tau,\omega)=\int_{-\infty}^{\infty}x(t) \omega(t-\tau)e^{-i\omega t}dt \tag{1}\]  
where \(\omega(\tau)\) is the window function (it could be a Hann window or Gaussian window function) and \(x(t)\) is the signal to be transformed. In discrete time transformations, the data to be transformed is subdivided into time-frames which usually overlap to reduce the artifacts. Each frame is Fourier transformed and the magnitude and phase of the complex value for each point in time and frequency is stored:  
\[STFT\{x[n]\}(m,\omega)\equiv X(m,\omega)=\sum_{n=-\infty}^{\infty}x[n]\omega( n-m)e^{-i\omega n} \tag{2}\]where \(x[n]\) is the signal and \(\omega(n-m)\) is the window, with \(m\) and \(\omega\) being discrete and continuous values, respectively. However, in practical use, both variables are discrete. Finally, the Power Spectral Density (PSD) is a function that describes the power present in the signal as a function of frequency, per unit frequency. The squared magnitude of the STFT yields the spectrogram representation of the Power Spectral Density of the function:  
\[spectrogram\{x(t)\}(\tau,\omega)\equiv|X(\tau,\omega)|^{2} \tag{3}\]  
In contrast to the STFT, a wavelet transform is made through the convolution operation of a signal with functions called wavelets. A wavelet is a wave-like oscillation with an amplitude that starts and ends at the zero value. A wavelet could be created to have a particular frequency; if this wavelet is convolved with a signal, then the resulting signal would be useful to determine whether the particular frequency was present in the signal. Sets of complementary wavelets are generally needed to fully analyze the data. The wavelet analysis, in contrast to the STFT, presents a windowing technique with windows of variable size.