## 5 Discussion  
The accuracy of BFS extraction from the spectrum is influenced by several factors, including the scanning step size and signal-to-noise ratio (SNR). Regardless of the algorithm employed, the error tends to decrease with increasing SNR and increase with increasing scanning step [49]. However, another crucial factor is the shape of the spectrum, and in this regard, the algorithms exhibit markedly disparate behaviors. LCF is considerably more susceptible to spectrum defects than correlation [50] and artificial intelligence [51] algorithms.  
As the final step of the proposed algorithm is still LCF, it is necessary to analyze the impact of the preliminary stages of processing (resampling and averaging with neighboring spectra) on the spectrum itself. A reduction in the spectrum's discreteness is a consequence of the algorithm itself, and it is logical to expect an increase in the SNR due to the averaging effect during processing. However, what happens to the shape?  
When each spectrum of set \(P\) is shifted (unless the position of its maximum coincides with the position of the maximum of the measured spectrum), a negative edge defect is introduced. It is illustrated in Figure 14a shows the first spectrum, Figure 14b demonstrates the second. It is necessary to shift the second spectrum to the left to align them by the maximum position, while the extreme right values are filled with zeros. Figure 14c shows the final spectrum, obtained as a half-sum of the original first and shifted second spectra. The spectrum has a kink (shown in the inset on an enlarged scale for clarity). Due to the edge effect, the shape of the spectrum has been distorted, and asymmetry has appeared. The negative impact of spectrum asymmetry on LCF accuracy was previously observed by the authors in [52].  
We think this is the reason for the increase in the BFS extraction error when a small number of spectra are involved in the processing compared to pure LCF (Figures 4, 5, 9, and 10). The negative effect of the distorted spectrum shape is believed to prevail over the positive effect of reducing discreteness and increasing SNR. Moreover, if set P consists of only one spectrum, the averaged spectrum will be obviously asymmetric (as in Figure 14), with zero values added only at one edge of the spectrum. Consequently, the negative effect will be dramatic, as is evident in the obtained graphs. However, with a greater number of spectra involved, the positive effects become more pronounced, and the BFS extraction error fades.  
In our opinion, the same thing explains the larger jump in the graph upwards in the initial section when processing the model spectra (Figures 5 and 6) than the experimental  
Figure 14: Illustration of the influence of the algorithm used on the spectrum shape: (**a**)—original spectrum; (**b**)—additional spectrum; and (**c**)—the result of averaging two spectra, the inset shows a close-up of the kink.  
data (Figures 11 and 12). This can be attributed to the smaller dispersion of the BFS value along the fiber in the experiment than in the simulation. Consequently, a smaller shift was required to align the experimental spectra, and the introduced deformation of the spectrum shape was of a smaller nature. Under other experimental conditions (for example, without using a thermal chamber), the quantitative agreement between the results of processing the experimental and simulated spectra would have been higher.