(Blockquotes are direct citations from the corresponding papers.) # Methods for acoustic tomography on trees Feng (2014) introduced the idea to track straight ray interceptions. Zeng (2013) developed the technigue based on ellitical neighborhood of rays to get points influenced by these rays. Du (2015) used ellipses with difference eccentricities. Du (2018) introduced segmentation idea. However, he used segmentation by bisection of segments a this results in lare differences between segment lengths. For this reason we present variation of this method. ## Anizotropy handling The velocity in radial direction is higher than in nonradial. We divide velocity of nonradial rays as suggested by Du (2015). Not that the denominator is less than 1 and thus $v'_N$ (fixed velocity) is bigger than $v_N$ (measured velocity). ### Du at al. (2015) > To obtain more accurate input data for the proposed spatial interpolation method, based on Eq.13, the velocity value of each non-radial wave path can be compensated as follows, > $$v '_N = \frac{v_N}{-0.2\theta + 1}\tag{14}$$ > where $v_N$ is the original velocity value of a certain non-radial wave path, and $v'_N$ is the velocity value of a certain non-radial wave path after compensation. RM: Probably a typing error in the paper and the equation (14) should read as $$v '_N = \frac{v_N}{-0.2\theta^2 + 1}.\tag{14}$$ ### See also Maurer (2006) > Although anisotropy in its most general form is mathematically awkward, Thomsen (1986) showed that these equations can be substantially simplified when approximations for ‘‘weak anisotropy’’ are made. These approximations are reasonably accurate, even for materials with moderate anisotropy such as wood. For the sake of simplicity, we have further simplified the ‘‘weak anisotropy’’ equations and assumed elliptic anisotropy (Thomsen 1986), where the angle-dependent velocity v can be written as: > > $$ v=v_{\text{radial}}(1-\varepsilon\sin(\phi-\varphi)^2) \tag{10}$$ > > where $\phi$ is the ray angle, $\varphi$ represents the azimuth of the $v_{\text{radial}}$ direction relative to the axis of the coordinate system, and $\varepsilon$ is the degree of anisotropy: > $$\varepsilon =\frac{v_{\text{radial}}-v_{\text{tangential}}}{v_{\text{radial}}}.$$ ### Comments by Robert Mařík Formula (14) contains probably a typing error. It arises from Taylor expansion (12) of a more complicated formula derived in Du (2015). However, the linear term is missing in formula (12) and thus simplification of (9) to (13) does not make any sense (see the original paper for references to equations). The dependence on $\theta$ in (14) should be quadratic. Something like $$v '_N = \frac{v_N}{-0.2\theta^2 + 1}\tag{14.B}$$ Du (2015) používá Taylorův rozvoj funkce publikované v Dikrallah (2006), publikaci z konference. Kromě toho, že publikace není online, nedává smysl použití Taylorova vzorce. Je to přibližná metoda a platí jenom pro malé úhly. Oprava rychlostí není nijak výpočetně náročná a dá se udělat i s přesným vzorcem. Spolehlivější je asi ten Maurer (2006). Také nedává smysl použít opravu pro celý paprsek, protože během letu se odchylka od radiálního směru mění. Ale v ERSM metodě se dá udělat oprava pro každý segment samostatně. Tj. dalo by se opravit podle úhlu, který svírá segment a spojice střed paprsku - střed kmene. Pro každý paprsek by se vzaly jednotlivé segmenty a opravila by se na nich rychlost na každém segmentu samostatně. ## Rays method `Tomo.do_Rays_method` (`analysis.reconstruct(method='Rays')`) gives each cell the mean speed of the rays through the cell. It uses the ray speeds after the anisotropy correction (before October 2026 the Rays tomogram ignored the anisotropy correction; only the drawn rays used it). * thin rays (`ray_width=None`, GUI ray width 0 %, default): the plain mean of the speeds of the rays crossing the cell; cells without a ray stay empty, the image has streaks along the rays, * fat rays (`ray_width='auto'`, `ray_width_ratio`, GUI "Rays: Ray width (% of tree diameter)"): the mean weighted by $e^{-(d/w)^2}$, $d$ the distance of the cell center from the ray and $w$ the ray width ($w$ = `ray_width_ratio` times the tree diameter, rays farther than $2.5w$ are ignored). All cells inside the boundary get a value, the image is smooth; small defects are blurred. The weights are the same as in the fat rays of SIRT and FBP. The page shows badges above the tomogram with the method options, the anisotropy correction (orange when on), post-processing and data selection (disabled rays, subset of sensors, bark). ## EBSI See Du (2015). > 1. Initialization. (Generating grid graph, calculating all values of velocity rays with Eq. 2, and normalizing them.) > 2. Compensating the values of all non-radial velocity rays with Eq. 14. $$v '_N = \frac{v_N}{-0.2\theta + 1}\tag{14}$$ > 3. Generating all of the affected zones with Eq. 4 and Eq. 5. > 4. For a certain grid cell, one can record all of the elliptic zones that affect it with Eq. 6, and calculate its velocity value, using Eq. 7 and Eq. 8. > 5. Repeating Step 4 until every grid cell has been processed. > 6. Visualization (reconstructing the 2D image with a certain color scale). Citation related to the step 3: > A ray here represents the virtual propagation path of a stress wave, and its value represents the velocity value of stress wave. Obviously, there are internal defects present on the path if the value of a certain ray is low, but the exact location of the defective part is still uncertain. Ellipses with the same eccentricity will have a greater effect on the middle portion of a ray, but the defects may be near the sensor or somewhere else. Therefore, the spatial interpolation method that uses a basic ellipse can be improved. The length is another key property of the ray. The affected zones that corresponded to shorter rays are more likely to overlap with the defective region. As shown in Fig. 3(b), the area of the affected zone that corresponds to short rays should be larger, and the weight of the affected zone that corresponds to short rays should also be strengthened. The shape of the elliptic zone can be expressed as, $$c = \frac ba \tag{3}$$ where $a$ is the long axis of the ellipse and $b$ is the short axis of the ellipse. Therefore, $c$ is similar to the eccentricity, and the controlling coefficient for a certain ray can be given as, > > $$c_{ij}=\begin{cases}1-\frac{|j-i|}{\frac N2}&|j-i|<\frac N2\cr1-\frac{N-|j-i|}{\frac N2}&|j-i|>\frac N2\cr 0.1 & |j-i|=\frac N2\end{cases}\tag{4}$$ > > where: $i \in[1, N ]$ is the sensor number of a transmitter, $j \in[1, N ]$ is the sensor number of a receiver, $N$ is the total number of sensors, and $c_{ij}$ represents the ray from sensor number $i$ to sensor number $j$. The value of $a_{ij}$ is known, so the shape of each affected zone can be controlled by $b_{ij}$: $$b_{ij} = c_{ij} \times a_{ij}.\tag{5}$$ Citation related to the step 4: > Additionally, when a certain grid cell is affected by more than one elliptic zone, all these elliptic zones and their corresponding rays can be recorded. Then, the velocity value of the grid cell can be calculated as, $$v_{xy}=\sum_{k=1}^m w_k\times v_k\tag{7}$$ where $v_{xy}$ is the estimated velocity value of a certain grid cell, $v_k$ is the velocity value of a certain ray that affects the specific grid cell, $w_k$ is weighting coefficient, and $m$ is the total number of rays that affect the specific grid cell, simultaneously. Considering that elliptical zones that correspond to short rays should weigh more, $w_k$ can be given as, $$w_k = \frac {1}{l_k}\Biggm/ \sum_{z=1}^m \frac{1}{l_z}\tag{8}$$ where $l_z$ is the length of a certain ray. ## ERSM Improvement of Du (2018). 1. Choose typical size of the segment $l_0$. One half of the shortest ray is suggested length. 1. Split each ray into segments of equal size. The number of segments is the integer part of the quotient $l/l_0$ plus one (at most `max_segments`, default 10) where $l$ is the legth of the ray. **This is the change from Du (2018)** 1. For each segment consider the ellipse with major axis at the segment and the eccentricity given. Find all segments intercepting this ellipse and set the speed of this segment as a mean value of the speeds of segments through the ellipse. 2. Set the cell velcities using spatial interpolation by segmented ellipe (SISE) as described in Du (2018). ## SIRT method A detailed explanation in Czech, with figures and the walk through the code, is in [sirt.md](sirt.md). Sluits and Vorst (1990) describe general SIRT methods. It $b_i$ is the time of fly of the $i$-th ray, $a_{ij}$ is the length of the intersection of the $i$-th ray with the $j$-th cell and $x_j$ is the slowness (reciprocal value of velocity) in the $j$-th cell, then we have $$b_i = \sum a_{ij} x_j$$ or in matrix form $$b = Ax,$$ where $b$ and $x$ are column matrices of times and slownesses respectively and $A$ is the matrix of segment lengths. In general, this linear system with unknowns $x$ does not have solution. Thus we have to find vector $x$ which is close to the solution in the sense that the euclidean norm $$||b-Ax||$$ of the difference between the left and right hand side is minimal. Simultaneous iterative reconstruction technique (SIRT) is the method to solve this least square problem iteratively. Sluis and Vorst (1990) present a class of iterative formulas $$x^{(k+1)}=x^{(k)}+\omega P A^T Q (b-Ax),\tag{*}$$ where $P=\mathrm{diag}(1/\gamma_j)$, $Q=\mathrm{diag}(1/\rho_j)$ and $$\gamma_j=\sum_i |a_{ij}|^\alpha, \quad \rho_j=\sum_k |a_{ij}|^{2-\alpha}, \quad 0\leq \alpha\leq 2, \quad 0<\omega<2.$$ Common choices are $\omega =1$ and either $\alpha = 0$ or $\alpha =1$. The scheme (*) is convergent by Sluis and Vorst (1990), Theorem 4.10. ### Regularization and initial model in TomoTree A tree tomogram has few rays (66 rays for 12 sensors) and many cells (thousands), so the system $b=Ax$ is strongly underdetermined. A cell crossed by one ray only can take any value and the plain iteration (*) produces a checkerboard of fast and slow cells. Cells not crossed by any ray are not determined at all. `do_SIRT_method` therefore * uses the slownesses of all cells inside the tomogram boundary as unknowns, * appends the discrete Laplace operator $D$ (4 neighbours) to the system (Tikhonov regularization), $$\begin{pmatrix}A\\ \alpha \bar a D\end{pmatrix}x=\begin{pmatrix}b\\ 0\end{pmatrix},$$ where $\alpha$ is the parameter `smoothing` and $\bar a$ is the mean segment length (so that $\alpha$ does not depend on the grid and units); this smooths the tomogram and fills cells without rays, `smoothing=0` gives the classical SIRT, * starts from the homogeneous model $x_j=\sum_i b_i/\sum_i L_i$ (mean slowness), * keeps the velocities between `speed_min` and `speed_max`; by default $0.5\times$ the minimal ray speed, but at least 340 m/s (speed of sound in air), and the maximal ray speed, * uses $\alpha=1$ in the weights above (row and column sums), relaxation $\omega$ = `relaxation` (default 1.5), at most `iterations` steps (default 2000; with smoothing the iterations converge slowly, 500 steps with $\omega=1$ left the velocities up to 130 m/s from the limit), optionally stopping when the relative residual $\|Ax-b\|/\|b\|$ changes less than `tol`. Larger `smoothing` gives a smoother tomogram and a larger residual. ### Fat rays A thin ray influences only the cells crossed by the straight line. With few sensors this gives star-shaped artifacts along the rays. The travel time of a stress wave, however, depends on a zone around the line (Fresnel zone, of width about $\sqrt{\lambda L}$; for wood with $v\approx 1200$ m/s and $f\approx 2$–$5$ kHz the wavelength is $\lambda\approx 0.25$–$0.6$ m). With `ray_width` $w$ the length $L_i$ of the $i$-th ray is spread over the cells near the ray, $$a_{ij}=L_i\,\frac{w_{ij}}{\sum_k w_{ik}},\qquad w_{ij}=e^{-(d_{ij}/w)^2},$$ where $d_{ij}$ is the distance of the center of the $j$-th cell from the ray (cells with $d_{ij}>2.5w$ are ignored). The row sums stay equal to the ray lengths, so a homogeneous tree is reconstructed exactly. The default `ray_width='auto'` is 12 % of the tree diameter (the largest distance between nodes); `ray_width=None` gives thin rays. Fat rays remove the star-shaped artifacts, the price is a lower resolution (small defects are blurred) and a larger residual. ## Reaction time of the device > Maurer (2006): Finally, we highlight a common problem in acoustic wood > tomography. Owing to inherent instrumental limitations, it is often difficult > or impossible to determine precisely the difference between the origin time of > the seismic pulse and the time of the first sample of the digitized seismogram. > This time difference is generally unknown, but it usually remains constant > during an experiment. Consequently, the origin time to may be > included as a further unknown in the tomographic inversion procedure by modifying Eq. (1): > > $$ t_{ij}=\sum_{\text{cells}}l_{ijk}s_k+t_0 \tag{5}$$ > > As shown by Maurer (1996), it is only necessary to append a column with values > of 1 to matrix $G$ to solve the inverse problem related to Eq. (5). The > solution vector $s$ will then include adjustments not only to the slowness of > individual cells, but also to the origin time $t_0$. TomoTree used this column of ones in SIRT until November 2026. With the smoothing regularization the estimate failed (40 µs delay on a synthetic tree estimated as −1 µs after 500 iterations and 28 µs after 2000): a common delay of all rays and a slower centre of the stem explain the data almost equally well, and the smooth solution prefers the latter. The reaction time is now a setting common to all methods: `Tomo(reaction_time=...)`, `analysis.reconstruct(reaction_time=...)` (seconds), in the GUI "Reaction time of the device/µs" next to the bark thickness, in `config.yaml` the key `reaction_time` (µs). It is subtracted from the measured times when the rays are created, before the anisotropy correction; `ray.ori_time` and `ray.ori_speed` keep the measured values. The default is 0. `analysis.estimate_reaction_time(data)` gives a hint (library only, the GUI has only the manual setting): the intercept of the lower envelope of the times against the ray lengths, a line $t = sL + t_0$ fitted to all rays and five times refitted to the rays with the residual at most the median. In sound wood the fastest rays lie on this line, rays through defects are slower and drop out. The estimate is accurate for a cavity, a sound tree and decay at the bark; with decay in the centre or in a ring around it the short rays near the bark are fast and all long rays slow, and the estimate is negative (not clipped), i.e. the reaction time cannot be determined from the times. Details in Czech in [sirt.md](sirt.md#8-reakční-čas-přístroje). ## Back projection (FBP) `do_FBP_method` computes the filtered back projection in algebraic form, $x = s_0 + A^T (AA^T + \mu I)^{-1}(b - A s_0)$, which needs neither a sinogram on a regular grid nor the Fourier transform; `filtered=False` gives the plain back projection. The principles are described in [backprojection.md](backprojection.md). ## General papers * Strobel (2018) compares EBSI method and method based on means ray speeds at intersection. ## Literature 1. Maurer, H., Schubert, S. I., Bächle, F., Clauss, S., Gsell, D., Dual, J., & Niemz, P. (2006). A simple anisotropy correction procedure for acoustic wood tomography. Holzforschung, 60(5), 567–573. https://doi.org/10.1515/HF.2006.094/MACHINEREADABLECITATION/RIS 1. Li, G., Wang, X., Feng, H., Wiedenbeck, J., & Ross, R. J. (2014). Analysis of wave velocity patterns in black cherry trees and its effect on internal decay detection. Computers and Electronics in Agriculture, 104, 32–39. https://doi.org/10.1016/J.COMPAG.2014.03.008 1. Feng, H., Li, G., Fu, S., & Wang, X. (2014). Tomographic Image Reconstruction Using an Interpolation Method for Tree Decay Detection. BioResources, 9(2), 3248–3263. https://doi.org/10.15376/BIORES.9.2.3248-3263 1. Du, X., Li, J., Feng, H., & Chen, S. (2018). Image Reconstruction of Internal Defects in Wood Based on Segmented Propagation Rays of Stress Waves. Applied Sciences 2018, Vol. 8, Page 1778, 8(10), 1778. https://doi.org/10.3390/APP8101778 1. Strobel, J. R. A., de Carvalho, M. A. G., Gonçalves, R., Pedroso, C. B., dos Reis, M. N., & Martins, P. S. (2018). Quantitative image analysis of acoustic tomography in woods. European Journal of Wood and Wood Products, 76(5), 1379–1389. https://doi.org/10.1007/S00107-018-1323-Y/TABLES/5 1. van der Sluis, A., & van der Vorst, H. A. (1990). SIRT- and CG-type methods for the iterative solution of sparse linear least-squares problems. Linear Algebra and Its Applications, 130(C), 257–303. https://doi.org/10.1016/0024-3795(90)90215-X 1. Zeng, L., Lin, J., Hua, J., & Shi, W. (2013). Interference resisting design for guided wave tomography. Smart Materials and Structures, 22(5), 055017. https://doi.org/10.1088/0964-1726/22/5/055017 1. Du, X., Li, J., Feng, H., & Chen, S. (2018). Image Reconstruction of Internal Defects in Wood Based on Segmented Propagation Rays of Stress Waves. Applied Sciences 2018, Vol. 8, Page 1778, 8(10), 1778. https://doi.org/10.3390/APP8101778