# Frequency Range Optimization for Continuous Wave Terahertz Imaging
## 3 Proposed Method for One-Dimensional Image Reconstruction  
The proposed method for image reconstruction is based on our previous research [17] and presents a combination of full-field imaging and single-point scanning. A linear actuator with small steps is used to move PCAs over the sample, similar to single-point scanning. Because of the relatively large spotlight compared to the translation step, the acquired single trace will overlap with its neighboring traces. If the linear step is much smaller than the spotlight's radius, and if the spotlight's intensity profile is known or can be modeled, the neighboring values can be used to determine the pixel value. This is similar to full-field imaging, where techniques such as compressed sensing are used to determine single pixel value. In the proposed image reconstruction method, a linear step determines the image resolution. The setup for image acquisition is presented in Figure 1. THz wave generation and detection was performed using commercially available system TeraScan 1550 from Toptica Photonics, and the LTS300/M linear rail from Thorlabs was used as translation stage. The linear rail's speed was set to 1 mm/s and the linear rail's acceleration to 1 mm/s\({}^{2}\). Step distance of LTS300/M was set to 0.5 mm. In our preliminary work, [17], the proposed method was proven to mitigate some of the shortcomings of the THz-FDS system. The peak envelope and phase shift are extracted from the detected photocurrent in the first processing stage. The peak envelope is extracted using maxima detection and spline interpolation, and the phase shift is extracted using zero crossing detection and linear interpolation. Figure 3 shows the estimated amplitude and phase spectrum. At starting, the frequency phase was set to zero, since we were more interested in the phase change because of the dispersion, as shown in Equation (7). GSF was applied in the second processing stage of the proposed image reconstruction algorithm. The authors in [18] determined that the PCA's intensity profile can be estimated using the Gauss function. While using the THz-TDS system, THz beam profile modeling was used in [12] to enhance the resolution and contrast of the acquired image. In the acquisition setup shown in Figure 1, the THz beam is directed through a silicon lens and collimated through collimation mirrors. The intensity profile will stay the same after collimation. Therefore, the THz beam will propagate through the sample with a Gauss intensity profile. The empirically determined spotlight's diameter was 8 mm, while the linear step was set to 0.5 mm. The intensity profile was modeled using a 1D Gauss function using 8 mm/0.5 mm = 16 samples. As shown in Figure 4, GSF was applied to the samples at the same vertical position in the acquired spectrogram. In the last processing stage of the proposed image reconstruction algorithm, the amplitude and phase spectrum were compressed into a single pixel. The boxcar filter averages the set of measurements into a single pixel. Using the boxcar average, we focussed on the sum of intensity in the broadband signal shape. The broadband signal is limited in its bandwidth, representing frequency limitations in the amplitude spectrum. By adding the detected amplitude spectrum between the initial and end frequencies in the frequency scan, we can extract the information about absorption in a limited bandwidth. A single pixel in the amplitude image was estimated as:  
\[\overline{I}=\sum_{f=v_{0}}^{v}P_{T}(f) \tag{9}\]  
where \(v_{0}\) is the initial frequency and \(v\) is the end frequency in the sweep, and \(P_{T}\) is the peak envelope of detected photocurrent. With adding the amplitude spectrum in a certain bandwidth, the result represents the sum of the intensity of the broadband signal with equivalent bandwidth. Phase compression is based on Equation (7). If the propagation speed changes in the observed sample, the phase will experience an additional shift, which can be detected in the unwrapped phase.