## 3 Selection of Gabor Filters for the Analysis of TFBG Spectra  
The spectrum of a tilted Bragg grating is represented by many cladding resonances that are only visible when measuring in transmission mode. TFBG gratings used for experiments were inscribed in fibre using the phase mask method. During recording, the phase mask was rotated by 6 degrees. The length of the grating was 1 cm. The recording was made on a typical single-mode optical fibre (SMF). Figure 1 shows a schematic view of the experimental setup. Optical spectra were measured by an AQ6370D optical spectrum analyser (Yokogawa). The effect of changing the SRI coefficient on the TFBG spectrum is shown in Figure 2. The SRI changes the amplitudes of the modes and their location. However, the changes are different for each individual mode. Changes in the wavelength position of a single mode are relatively small. The position of the cut-off wavelength has the greatest influence on the spectrum, as its shift causes the modes to disappear. As the SRI increases, the cut-off wavelength shifts towards longer wavelengths, which is visible as a decrease in the cladding resonance amplitudes. When the TFBG grating used in the research was immersed in distilled water, the first significant cladding modes could be observed at a wavelength of 1490 nm. Immersing the grating in a water-glucose solution with SRI = 1.3479 reduced the mode amplitudes below 1502 nm. Subsequently, for SRI = 1.3672, the amplitudes of modes below 1514 nm decreased. For SRI = 1.3883, the disappearance of modes below 1524 nm could be observed. Modes for wavelengths above the cut-off wavelength shifted slightly towards longer wavelengths, but they did not experience a significant reduction in amplitude. The selection of filters was preceded by the analysis of spectra using the Fourier transform (Figure 3). The goal of optical spectrum processing is to obtain a smooth function representing the decay of cladding modes. Spectrum processing should eliminate the mode-hopping problem when determining the cut-off wavelength. In order to analyse the algorithms, TFBG spectrum measurements were performed for 15 SRI values from 1.333 to  
Figure 1: Schematic view of the experimental setup. Figure 2: Transmission spectra of a TFBG grating immersed in solutions with different SRI values. 1.4056 refractive index values. The glucose content was up to 43%. For each SRI value, the measurement was repeated 20 times. The figures later in the article show a single optical spectrum for each of the 15 SRI values. The first step was filtration using filters with impulse response, shown in Figure 4. The filter's frequency response was matched to the fundamental frequency associated with the occurrence of cladding modes, and covered the band shown in Figure 3.  
The real part of the optical spectrum obtained as a result of filtration is shown in Figure 5. The spectrum is symmetrical about the wavelength axis. A place can be noticed on the wavelength axis where the mode envelope is bent. Figure 6 shows the spectra of both the real and imaginary parts of the spectrum along with the envelope they create. The spectra after filtration are noise-free and smooth. Thanks to this, the envelope determined on their basis will also be smooth. Additionally, the envelope calculated with the real and imaginary parts of the filtered spectrum uses all points of the spectrum. Therefore, this is a much better method than envelopes calculated from the spectrum peaks alone. The envelope determined in this way represents the signal amplitude at the frequency characteristic of the filter operation. Figure 4: Impulse response of the real and imaginary parts of the Gabor filters adjusted to the main frequency associated with the occurrence of cladding modes. Figure 3: Fourier transform of the optical spectrum of the TFBG grating for the 15 SRI values considered. Figure 7 shows the envelopes determined by the Gabor filtration method for individual SRI values. The envelope shift is directly related to the change in cut-off wavelength.