# Application of Wavelet Transform and Fractal Analysis for
## 3 Results  
In the first step of the main calculation phase (for the data after the clearing from artefacts, resampling, and filtering processes), the 24-h pH time signal was processed by the determination of the distribution of the pH values in the assumed range (from zero to maximum value for each patient). Figure 3 shows the result of the signal processing in the cases of three selected patients. The measurement data of the patients with the minimum and maximum total DeMeester score (definitely healthy and definitely sick) and for the patient whose total DeMeester was closest to the value of 14.7 (being the literature's cut-off value between healthy and sick) were selected as marginal cases. These cases are used later in the study as representative of the identified patient conditions. Figure 3d-f show the corresponding distribution of these signals in the inverse domain, i.e., the number of samples vs pH. Figure 3: The pH-metry signal measured and the corresponding pH value distributions: (**a,d**) calculated DeMeester score = 0.8; (**b,e**) calculated DeMeester score = 15.9; (**c,f**) calculated DeMeester score = 107.8. The presented operation allowed the authors to replace the non-stationary and discontinuous 24-h pH signals as time-independent by extracting their global features. The signals obtained by this procedure are devoid of the undesirable edge phenomenon (the beginnings and ends of the signals analysed are smooth and zero-valued), which is undesirable from the point of view of the wavelet analysis method. The final form of the signal (obtained from the distribution of the pH values for the threshold case considered), subjected to continuous wavelet transform analysis in the next stage of the study, is shown in Figure 4.  
In the second step of the current pH signal assessment procedure, the CWT was applied in order to determine the necessary wavelet coefficients. In essence, the wavelet transform shows the extent of the correlation between the investigated signal and the wavelet at the given scale. The lower the similarity, the closer the values of the wavelet coefficients are to zero. Therefore, the wavelet transform makes it possible to locate low and high-frequency features in the signal by analysing variations in the wavelet coefficients. As one of the basic assumptions of the calculations carried out was to take into account both the low- and the high-frequency features of the signal, in the wavelet analysis the scale parameter was increased until the wavelet coefficients of the entire analysed signal were close to zero. Finally, the maximum scale value was set at 2000. Scalograms were used for the clearest representation, in a graphical form, of the wavelet transform results for a given scale range. The scalograms represent the changes in the wavelet coefficients as a function of the scale. The typical scalograms of the pH-metry signals obtained for the Haar wavelet related to the 24-h measurement procedure are shown in Figure 5. A low value of the scale parameter of the basis function means that the signal is analysed at the highest possible level of detail. The higher the scale value, the more the given signal is analysed in the direction of searching for more global features. In the following step, the calculated wavelet coefficients were summed up and related to the succeeding scales in order to reveal any quantitative differences between the particular pH signals measured. Figure 6 presents the calculated curves representing the state of a selected patient. A cross-comparison of the curves shown in Figure 6 for the extreme cases shows that the results obtained not only allow a healthy-sick patient condition to be distinguished but  
Figure 4: The final form of the signal subjected to continuous wavelet transform analysis. also allow for a preliminary estimate of the level of the patient's condition. The calculation results for the healthy patient have the lowest value for the sum of the wavelet coefficients, while for the patient diagnosed with reflux the results are the highest.