{'fraction_non_alphanumeric': 0.03160525284202274, 'fraction_numerical': 0.01122108976871815, 'mean_word_length': 4.656596452328159, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Terahertz time-domain spectral imaging using telecentric beam steering and an f- θ scanning lens: distortion compensation and determination of resolution limits

: We report on the development and performance characterization of a telecentric terahertz spectroscopic scanner using an f- θ objective lens and a single gimballed scanning mirror for image formation. We derived a beam steering transform to compensate for the intercoupling of the gimballed mirror axes and the distortions caused by an imperfect scanning lens. We characterize the optical performance of the system in both the time and spatial domains, demonstrating a constant diﬀraction-limited imaging resolution over the entire ﬁeld of view. Finally, given the large depth of focus of the objective lens, we demonstrate the broadband imaging capability at diﬀerent depths using a Boehler star target. This imaging setup has the potential to be miniaturized into portable form factors for ﬁeld-deployable scenarios.


Introduction
Terahertz (THz) spectroscopic imaging has enjoyed considerable attention in a diverse array of applications including non-destructive testing [1,2], art preservation [3,4], and biomedical imaging [5][6][7]. However, the efforts towards practical THz camera systems have so far lacked spectroscopic capabilities [8][9][10][11]. As a result, THz full-spectral imaging has been limited to rudimentary single-pixel scanning strategies. The easiest method for image formation is to move the entire target in a raster pattern while keeping the terahertz spectroscopy equipment stationary [1,12,13]. Spectroscopic images can then be formed using conventional THz timedomain spectroscopy (THz-TDS) or other techniques at each of the pixels. This strategy is not feasible in the case of large samples, which cannot be easily mounted on a stage. The reverse, moving the imaging equipment while keeping the sample stationary [2,3,6], can be useful in certain applications, however it is limited by the same restriction due to the use of translational stages. Single-pixel imaging techniques based on compressed sensing, which do not need such motion-controlled stages, have been employed [14][15][16] but these methods require the entire sample area to fit within the collimated beam. Multi-channel spectroscopic techniques such as using array detectors [17] or grating-based camera systems [18] have also been developed but require both broad illumination and translation stages for at least one scanning direction.
Steering the focused beam across the sample surface retains the benefits of a single point raster, without the need for translational stages capable of moving large equipment or samples. This concept has been demonstrated in a portable system, which used beam steering in one direction to capture a 15 mm × 2 mm line of pixels [7]. Other beam steering systems have used telecentric f-θ lens designs, which are particularly suited to scanning planar targets [19][20][21][22]. A typical plano-convex objective lens produces a curved focal surface as the beam is steered. This curved focal plane results in a variable optical path length and inconsistent focal spot size, which gives rise to phase ambiguity and non-uniform spatial resolution, respectively. In a telecentric f-θ system, collimated beams pass through the front focus of an f-θ lens and are focused to a true planar surface as the deflection angle of the beam, θ, is increased. The focal position on the planar target has a transverse distance of r = f × θ from the optic axis. Because the setup is telecentric, the focused beam remains parallel to the optic axis and has a constant spot-size at the target plane. By choosing a lens with a large depth of focus and recording time-resolved measurements, imaging objects at multiple depths can be achieved.
In previous THz f-θ scanning systems, beam steering was controlled by a separate mirror for each scan axis, such as by using a typical two-mirror galvo scanner. Only one such mirror can be located at the f-θ focus, necessarily creating distortions in the focal spot and time of arrival consistency. Compensation for this distortion has been proposed by altering the length of a delay line [19] or by an asymmetric lens shape [20]. Other systems limited the mirror scanning to a single axis and translated the sample in the other direction [21,22], or used additional optics to steer one axis from a conjugate focus [23]. These techniques either require additional optics and alignment, or resolve one source of imaging distortion by introducing another. To address this problem, we propose a telecentric beam steering system using an f-θ lens and a single mirror mounted in a 2-axis motorized gimbal, allowing for the center of rotation of both axes to be collocated on the f-θ lens focus. Furthermore, we offer a transform from the scanning target coordinates to the mirror deflection angles, which compensates for the intercoupled azimuthal and elevation axes of the motorized gimbal scanner. Additionally, we correct for an imperfect lens performance using a linear approximation to the r = f × θ behavior based on ray tracing simulation results. Finally, we demonstrate the scanning performance of this system in both the time-and frequency-domains and show diffraction-limited imaging resolution over the large depth of focus. This system provides a design path towards a portable THz-TDS scanning device which can be deployed for imaging previously inaccessible targets.

Scanning setup design
Figure 1(a) shows the schematic of our setup. Terahertz pulses are generated and measured using photoconductive antennas (PCA) as part of a commercial asynchronous optical sampling system (TERA ASOPS High-Speed THz Time-Domain Spectrometer, Menlo Systems Inc. Newton, NJ, USA). The emitted beam is collimated and then passed through a high-resistivity silicon beam-splitter. The collimated beam is then steered towards an f-θ lens by a mirror mounted on a motorized 2-axis gimbal system (T-OMG, Zaber Technologies Inc. Vancouver, BC, Canada) with the center of the mirror face located at the front focus of the lens. The f-θ lens focuses the beam on the target. Here, we use a custom-made, high-density polyethylene (HDPE) f-θ lens with 40 mm focal length. Because the setup is telecentric, the focused beam is parallel to the optic axis of the lens and the sample reflections retrace the path of the incident beam back to the beam splitter where they are directed towards a focusing lens and collected by the PCA detector.

Image distortion due to intercoupling of the gimballed mirror axes
In contrast to [19,20], our use of a single gimbal with two axes of control ensures that for all deflection angles, the beam will pass through the front focus of the f-θ lens. Therefore, neither the horizontal nor the vertical directions of scan are subject to changes in the optical path. As shown in Figs. 1(b)-(d), the T-OMG's azimuthal axis is mounted inside a yoke, which rotates about the elevation axis. Due to this intercoupling, any change in the elevation direction of the beam will rotate the azimuthal axis to a different orientation. In other words, the horizontal and vertical directions of the scan on the target do not correspond to independent axes of the gimbal motion. Figure 2 shows a raster scan through a rectilinear grid of azimuthal and elevation angles of the gimbal and the resultant wedge-shaped scanning pattern on the target, depicted by a ray-tracing simulation. This wedge-shape is characteristic of an intercoupled gimballed mirror axes [24,25]. For small deflection angles such as those often used in confocal microscopy this effect is negligible, and the scan is very nearly rectilinear [26]. In this section, we derive a transform to obtain the proper gimbal motor rotation angles which correspond to a desired scanning location. This transform is based on a framework of two offset coordinate grids in which these two sets of values are naturally represented. Marked points correspond to starting location. The black dashed lines in (a) represent the maximum available deflection. The first coordinate system, shown in Fig. 3, is based on the gimballed mirror axes and is denoted with a subscript m. The origin is defined as the center of the face of the mirror, and the z-axis is defined by the mirror-normal at zero deflection, where the x-and y-axes correspond to the gimbal's azimuthal and elevation axes of rotation, respectively. Using this definition, the incoming beam from the emitter has the direction The azimuth and elevation angles of the motorized axes, denoted respectively by α and β, correspond to the spherical coordinate angles of the mirror normal,m, given bŷ (2) Fig. 3. Coordinate systems used with illustrative beam. The blue path corresponds to an example deflected chief ray propagating through the system. The second coordinate system, corresponding to the location of the scanning target, is defined such that the origin is at the point where the optic axis crosses the focal plane of the lens. The z-axis points out of the target, and the x-and y-directions are the horizontal and vertical scanning directions, respectively, as shown in Fig. 3. The conversion from a desired target coordinates (x, y) to mirror-coordinate vector of an outgoing beam, b m,out , is given by where f is the focal length of the lens and represents the distance from the mirror to the lens. As the system is telecentric, the beam will be projected to this point for any z-coordinate after the lens. In order to direct the beam to a specific location, the incident and reflected vectors of the beam at the mirror must be bisected bym. The direction of this can be found using the equation The two gimbal angles can then be found by using the spherical coordinates from Eq. (2): Up to this point, this transformation analysis has assumed a thin lens approximation with an ideal f-θ lens behavior. Figures 4(a) and (b) shows raster scan path derived from the above relations and the resultant location of the chief ray determined by a ray-tracing simulation using an accurate model of the lens surface profile used in this study. The major distortion effects of the intercoupled gimbal axes have been eliminated, however, there are some remaining artifacts in the scan pattern such as a pinching of the beam location at the center of the field of view seen in Fig. 4 The rest of the derivation follows as explained earlier. This intermediate position is also illustrated in Fig. 3. For the HDPE lens used here, f = 40 mm, and we found that s = 38.97 mm Rad −1 and a = −0.1079 mm. The need for this linear correction to the lens behavior is attributed to both fabrication and alignment errors. Figure 5 shows the result of this correction.

Signal processing
During the characterization measurements, the average of 50 time-domain traces was recorded for each pixel. A Gaussian high-pass filter (µ = 0 THz, σ = 0.05 THz) was applied to remove any low-frequency background signal and then denoised using wavelet shrinkage with global thresholding. For each time series, after finding its wavelet coefficients using the Maximal Overlap Discrete Wavelet Transform (MODWT) [27], the noise variance was estimated using the median absolute deviation of the finest level wavelet coefficients and a universal threshold value was defined by, δ = [2σ 2 log(N)] 1/2 where σ is the estimated noise standard deviation and N is the signal length [28]. After hard thresholding, each signal was reconstructed from the remained wavelet coefficients. In order to find wavelet coefficients, we used the least asymmetric wavelet filter of length 8 (LA (8)). In most cases, subsequent reflected pulses from deeper layers or Fabry-Perot reflections were temporally separated to allow for individual pulses to be analyzed without further signal processing. However, in cases where a reflected pulse was closely followed by a separate reflection, the ringing effect of the first signal could impact the analysis of the second pulse. In these cases, a more aggressive approach using level-based thresholding is used  to suppress the oscillations caused by this ringing [29]. This technique removes absorption features while maintaining information about the layered-structure of the sample. Alternatively, similar wavelet-based denoising methods may be better suited to different targets and imaging scenarios [30,31].

Field of view and depth of focus
The field of view of a telecentric f-θ system is fundamentally limited by the size of the lens itself, however in this case the angular scanning range of the gimballed mirror and the focal length are the limiting factors. Given the combination of a 40 mm focal length f-θ lens and a gimbal having ±7 • travel for mirror deflection in both axes, the above transform shows that a rectangular field of view of 19 mm × 12 mm can be achieved. Design parameters such as focal length, lens diameter, and gimbal range can be optimized to achieve the necessary field of view in different imaging scenarios. The motorized gimbal has a maximum speed of 7 • /s in the azimuthal direction and 11 • /s in the elevation direction. With the difference frequency between the two femtosecond lasers set to 100 Hz, the acquisition is then limited by the ASOPS system to 0.50 s/pixel. The depth range of the scanner is limited by the depth of focus and the sample in question. A simple way to estimate this value is to find the full-width-half-maximum of the intensity of the reflected signal from a mirror moved through the z-direction. As shown in Fig. 6(a), the system has a large depth of focus of 19.1 mm. The intensity profile is approximately symmetric around the focus but, as can be seen in Fig. 6(b), lower frequencies are focused further away from the lens, causing the overall focal length of the scanner to shift as shown in Fig. 6(a). This effect is attributed to the frequency-dependent emission pattern of the PCA source and the spatial distribution of the low and high frequency components of the broadband collimated beam.

Uniform resolution over the field of view
In this section, we will determine the spatial resolution of the scanner over its planar field of view by placing a resolution target at two centered and off-center positions. A 6-petal acrylic Boehler Star on a metallic backing, shown in Fig. 7(a), provides a quantitative diagnostic sample for determination of spatial resolution. Images of this target can be analyzed to calculate the resolution by finding the amplitude of the N th harmonic of the image along a circular path centered on the star pattern where N is the number of solid petals (in this example, N = 6). At the center of the pattern, the petals are close together and the amplitude of the harmonic is low as the petals are not distinctly resolved. At greater diameters the petals become further apart and the amplitude of the harmonic converges towards that of a square wave. The petals can be considered resolved when the amplitude of the harmonic rises to a threshold level of its maximum value. If the corresponding circular path has diameter d, then each petal is spanned by an arc length of l = πd/2N which also approximates the minimum distance that can be resolved [19]. Figure 7 shows this analysis using the time of arrival, (b) and (c), and the peak-peak amplitude of the signal, (d) and (e). For each pixel, the depth position of the sample was measured by the time of arrival of the pulse. A 10% cut-off threshold, marked by the diamonds in Figs. 7(f) and (g) corresponding to the diameter of the unresolved circles shown in (b-e), was used to find d for images of the star at both the center and off-center positions. Using the measured depth, the resolution limit is 0.52 mm for both scan locations. Using the peak-peak amplitude images, the spatial resolution is determined to be 0.58 mm at the center and 0.63 mm in the off-center position. We performed a similar analysis on measurements obtained by replacing the f-θ lens with a conventional plano-convex TPX lens, TPX50 (aspheric, 50 mm focal length, 38.1  ) and (c). The amplitude of the 6th harmonic of the measured depth image (f) and the peak-peak amplitude image (g) as a function of the radius of the unresolved ring. The 10% cut-off thresholds shown by markers in (f) and (g) correspond with the red dashed circles in (b-e). Spatial resolution was determined to be 0.52 mm for both depth images at the center of the field of view and at the off-center position shown in (b-c), and 0.58 mm and 0.63 mm for the amplitude images in (d) and (e), respectively. mm diameter). The TPX50 lens (Menlo Systems Inc. NJ, USA) used here for comparison as a scanning lens is identical to the two collimating lenses shown in Fig. 1(a). These calculations showed the resolution limits of 0.79 mm in the center and 0.89 mm in the off-center positions using the peak-peak amplitude images. The larger resolutions achieved by the plano-convex TPX lens are expected due to the larger focal length and thus larger spot size. However, the relative increase in the resolution away from the center of filed of view is notable as it demonstrates the unique ability of the f-θ lens to maintain an almost uniform imaging resolution even when compared to the smaller deflection angles used by the TPX lens.

Resolution over the large depth of focus
The acrylic target shown in Fig. 7(a) is semi-transparent to the THz frequencies and has a thickness of approximately 3 mm. Therefore we can observe reflections from deeper interfaces. These pulses can be identified and categorized by their beam path, allowing for imaging at different sample depth. For instance, Fig. 8(a) shows the average time-domain signal from all pixels shown in Fig. 7(d). The colored boxes show the designated time-windows of the signal. THz pulses in Windows 2, 3 and 4 correspond to reflections from the air-acrylic, air-metal and acrylic-metal interfaces, respectively. Example time-domain pulses and their Fourier transforms are shown in Fig. 8(b). For pixels bordering two adjacent petals, the time-domain signal included reflections in all Windows 2, 3 and 4. In these cases, the THz pulses in Window 4 required the more aggressive, level-based thresholding described in section 2.3 to remove the ringing associated with the strong reflection from the air-metal interface in Window 3. Images resolved at frequencies 0.3, 0.5, 0.7 and 1 THz are shown in Fig. 8(c). It can be seen that images captured using Window 3 have an inverse spatial pattern compared to those of Window 2 and 4 (i.e. reflections that interacted with the acrylic material). As is expected, the resolution of the system improves at higher frequencies. Figure 8(d) compares the frequency-dependent resolution at various Windows to the diffraction limit given by 0.61λ 0 /NA for a lens with numeric aperture, NA [32]. Over the entire useful bandwidth between 0.3 and 1.25 THz, the resolution is close to the optimal limit at all three windowed depths, meaning the system can be used effectively for resolving targets over its large depth of focus.

Conclusion
We have demonstrated a telecentric f-θ scanning system which uses a single gimballed mirror for beam steering and thus avoids the limitations and distortions reported in previous designs. We showed a simple beam steering transform to solve the intercoupling of the gimbal axes and to compensate for distortions due to lens imperfections. We show that the spatial resolution of the scanner remains constant over its ±7 • field-of-view. Although the field of view of our scanner is limited by the angular range of the gimballed mirror, the telecentric beam steering approach retains the advantage of eliminating translational stages for large samples or the entire THz-TDS setup. Using this setup we were able to capture broadband spectroscopic images with diffraction-limited resolution with objects placed over a large depth of focus. These results provide a promising design for miniaturizing a distortion-less THz-TDS imaging system for a wide variety of applications where the sample or the imaging setup can not be raster scanned. Examples of such applications include non-destructive testing of large objects, cultural heritage preservation, and biomedical imaging.

Funding
National Institute of General Medical Sciences (R01GM112693).