## 2 Materials and Methods
### Terahertz Time-Domain Data Processing and Spectral Analysis  
THz-TDS allowed for the characterization of the material's electromagnetic wave propagation in the terahertz frequency range. However, to further investigate the influence of porosity on terahertz wave propagation, additional analysis of the time-domain data was required. In this study, as shown in Figure 5a-d, FFT was employed to convert the terahertz time-domain spectrum into frequency-domain spectrum, phase spectrum, and reflectance spectrum [42; 43]. Different porosity levels correspond to varying energy losses and absorption characteristics in the frequency spectrum, resulting in distinct energy distribution patterns at different frequencies. Changes in porosity modify the propagation velocity and phase delay of terahertz waves within the TBCs, manifested as variations in the slope of the phase spectra. Pores present in the coating increase scattering and multiple reflections at interfaces, resulting in modifications to the intensity and shape of the reflectance spectra. Frequency-domain spectra, phase spectra, and reflectance spectra  
Figure 4: Schematic diagram of reflection terahertz time-domain spectroscopy technique.  
all provide insights into the variation of porosity in the thermal barrier coating samples. Analyzing the characteristics of these spectra allows for obtaining quantitative or qualitative information about the porosity of the thermal barrier coating, which assists in further evaluating the quality and performance of the coating.  
The detailed steps are as follows.  
The frequency-domain signal \(T(w)\) is obtained by fast Fourier transform of terahertz time-domain signal \(E(t)\).  
\[T(w)=FFT(E(t)) \tag{1}\]  
The amplitude spectrum and phase spectrum of the frequency-domain signal are calculated as follows:  
\[A(w)=|T(w)| \tag{2}\]  
\[\phi(w)=tan^{-1}\bigg{(}\frac{\Im\{T(w)\}}{\Re\{T(w)\}}\bigg{)} \tag{3}\]  
where \(A(w)\) represents the amplitude spectrum of the signal in the frequency domain, \(\Im\) and \(\Re\) represent the real and imaginary parts, respectively, and \(\phi(w)\) represents the phase spectrum of the signal in the frequency domain.  
Figure 5: Results of terahertz time-domain data analysis: (**a**) time-domain spectrum; (**b**) frequency-domain spectrum; (**c**) phase spectrum; (**d**) reflectance spectrum.  
The reflectance spectrum \(R(w)\) is calculated, and \(r_{s}(\theta)\) is the reflection coefficient:  
\[r_{s}(\theta)=\frac{n_{1}cos(\theta)-n_{2}\sqrt{1-\left(\frac{n_{1}}{n_{2}}sin( \theta)\right)^{2}}}{n_{1}cos(\theta)+n_{2}\sqrt{1-\left(\frac{n_{1}}{n_{2}}sin( \theta)\right)^{2}}} \tag{4}\]  
where \(n_{1}\) and \(n_{2}\) are the refractive indices of air and sample, respectively.  
\[E_{i}(w)=\frac{1}{2}E_{0}(1+cos(\theta))e^{-ik(d+z_{0}cos(\theta))} \tag{5}\]  
\[E_{r}(w)=-\frac{1}{2}E_{0}(1-cos(\theta)r_{s}(\theta))e^{-ik(d-z_{0}cos(\theta ))} \tag{6}\]  
Here, \(E_{0}\) is the incident field intensity, \(\theta\) is the incident angle, \(d\) is the sample thickness, and \(z_{0}\) is the free impedance.  
\[\Gamma(w)=\frac{E_{r}(w)}{E_{i}(w)} \tag{7}\]  
\[R(w)=|\Gamma(w)|^{2} \tag{8}\]  
Here, \(E_{i}\) and \(E_{r}\) are the electric fields of terahertz entering and leaving the sample surface, respectively, and \(\Gamma(w)\) is the reflectance coefficient in the complex frequency domain.