## 4 Signal Processing Algorithms
### Resampling Captured Interferogram  
The majority of spectrometers utilises diffractive components to uniformly sample the signal by wavelength. However, FFT algorithms are most efficient when the data points are evenly spaced within the frequency domain [65]. Due to the relationship between wavenumber and wavelength, (\(\lambda\)), (\(k=2\pi/\lambda\)), the data will be non-uniformly spaced by wavenumber, requiring a re-sampling process before a conventional FFT can be effectively applied. If the dataset is left as linear in \(\lambda\) before the FFT is applied, then severe deterioration of axial resolution and SNR will be present in the signal, with an OPD dependent broadening of the PSF function leading to a reduced operational limit due to signal fall-off. This phenomena can be seen in Figure 8a.  
It is possible to avoid this requirement for re-sampling of the data by using a Non-uniform Direct Fourier Transform (NuDFT) instead of an FFT algorithm. However, the NuDFT is more computationally intensive than other alternatives for re-sampling. Since computational time is particularly important for high-speed imaging, the FFT is preferred. Re-sampling approaches can be categorised into two methods. The first method uses a special hardware configuration which samples the returned signal directly to be linear in \(k\)[66; 67]. However, this also adds additional cost, design complexity and is not easily translated between systems. The second method utilises software to take the signal acquired nonlinearly in \(k\) and re-sample it during post processing through the use of a \(\lambda\) to \(k\)-mapping function [68]. However, software-based methods do not perform as well for reflectors close to the maximum achievable depth (Nyquist limit) due to high frequency fringes in the interferogram that are poorly sampled [65].  
The approach taken in this work is similar to that presented for automatic calibration [68], relying on the knowledge that, for a singular reflector and whilst operating in a common-path configuration negating the requirement for dispersion compensation, the interference fringes will be evenly spaced in \(k\)-space. By using zero-crossing detection shown in Figure 8b, fringe spacing as a function of pixel number is obtained from which a mapping relationship shown by the red line in Figure 8c between linear in \(\lambda\) and linear in \(k\)-space can be created; this allows interpolation of the data using a B-spline interpolation to create an evenly sampled dataset in \(k\)-space before performing an FFT.  
To increase the accuracy of the zero-crossing detection, a zero-filling procedure can be followed which addresses the issue of errors at greater depths because of the increased shoulders around the peaks [14; 65]. This involves taking the FFT, Fourier shifting the result and then zero padding the start and end of the array to increase the data-array length by a factor \(M\), followed by an inverse FFT back to the spectral data. These spectral data, which was \(M\) times larger than the original array, have a  
Figure 8: (**a**) a comparison between FFT of a resampled spectrum and FFT of the original spectrum; (**b**) a sample signal spectra with the DC component removed, the red dots show the zero crossing (ZC) points on the curve; (**c**) the red line shows the nonlinearly spaced ZC locations for a raw spectrum, and the black line shows the ZC points spacing once a resampling procedure has been undertaken.  
greater datapoint density hence a more accurate resampling procedure is possible. In practice, this gives an increase in signal magnitude and a reduced PSF of the signal peak.