# Self-Attention GAN for Electromagnetic Imaging of Uniaxial Objects
## 2 Theoretical Formulation
### Direct Problem
#### 2.1.2 TE Waves
\begin{array}{c}E_{x}\\ E_{y}\end{array} \right) \tag{13}\]  
\[\left(\begin{array}{c}E_{x}^{s}\right)=\left\{ \begin{bmatrix}[G_{6}]&[G_{7}] \\ \left[G_{7}\right]&[G_{8}]\end{bmatrix} \left[ \begin{array}{c}\tau_{x}]&0\\ 0&\left[\tau_{y}\right]\end{array} \right]\right\}\left( \begin{array}{c}E_{x} \\ E_{y}\end{array} \right) \tag{14}\]  
The Green's function matrix can be expressed as:  
\[\left(G_{1}\right)_{mn}=\left\{ \begin{array}{c}-\frac{i\pi k_{0}a_{n}}{2} \int_{1}(k_{0}a_{n})H_{0}{}^{(2)}(k_{0}\rho_{mn}),\ m\
eq n\\ -\frac{i}{2}\left[\pi k_{0}a_{n}H_{1}{}^{(2)}\ (k_{0}a_{n})-2j\right],\ m=n \end{array} \right. \tag{15}\]  
\[\left(G_{2}\right)_{mn}=-\frac{j\pi k_{0}a_{n}}{2}\int_{1}(k_{0}a_{n})H_{0}{}^{ (2)}(k_{0}\rho_{mn}) \tag{16}\]  
\[\left(G_{3}\right)=\left\{\begin{array}{c}-\frac{i\pi a_{n}I_{1}(k_{0}a_{n}) }{2\rho^{3}}\times\left[k_{0}\rho_{mn}(y_{m}-y_{n})^{2}H_{0}{}^{(2)}(k_{0}\rho_ {mn})+\right.\\ \left.\left((x_{m}-x_{n})^{2}-(y_{m}-y_{n})^{2}\right)H_{1}{}^{(2)}(k_{0}\rho_ {mn})\right]\\[(G_{5})=\left\{ \begin{array}{c}-\frac{j\pi a_{n}J_{1}(k_{0}a_{n})}{2\rho^{3}{}_ {mn}}\times\left[k_{0}\rho_{mn}(x_{m}-x_{n})^{2}H_{0}{}^{(2)}(k_{0}\rho_{mn})+ \right.\\ \left.\left(\left(y_{m}-y_{n}\right)^{2}-\left(x_{m}-x_{n}\right)^{2}\right) \right]\\ -\frac{i}{4}\left[\pi k_{0}a_{n}H_{1}{}^{(2)}(k_{0}a_{n})-4j\right],m=n\end{array} \right\} \tag{19}\]  
\[(G_{6})=-\frac{j\pi a_{n}I_{1}(k_{0}a_{n})}{2\rho^{3}{}_{mn}}\times\left[k_{0} \rho_{mn}(y_{m}-y_{n})^{2}H_{0}{}^{(2)}(k_{0}\rho_{mn})+\left((x_{m}-x_{n})^{2 }-(y_{m}-y_{n})^{2}\right)H_{1}{}^{(2)}(k_{0}\rho_{mn})\right] \tag{20}\]  
\[(G_{7})_{mn}=-\frac{j\pi a_{n}I_{1}(k_{0}a_{n})}{2\rho^{3}{}_{mn}}(x_{m}-x_{n} )(y_{m}-y_{n})\Big{[}2H_{1}{}^{(2)}(k_{0}\rho_{mn})-\rho_{mn}H_{0}{}^{(2)}(k_{ 0}\rho_{mn})\Big{]} \tag{21}\]  
\[(G_{8})_{mn}=-\frac{j\pi a_{n}I_{1}(k_{0}a_{n})}{2\rho^{3}{}_{mn}}\Big{[}k_{0} \rho_{mn}(x_{m}-x_{n})^{2}H_{0}{}^{(2)}(k_{0}\rho_{mn})+\Big{(}(y_{m}-y_{n})^ {2}-(x_{m}-x_{n})^{2}\Big{)}H_{1}{}^{(2)}(k_{0}\rho_{mn})\Big{]} \tag{22}\]  
The parameter \(\rho_{mn}=\sqrt{\left(x_{m}-x_{n}\right)^{2}+\left(y_{m}-y_{n}\right)^{2}}\) denotes the Euclidean distance between the observation point \(\left(x_{m}\,\ y_{m}\right)\) and the source point \(\left(x_{n}\,\ y_{n}\right)\). Here, \(H_{0}^{(2)}\) and \(H_{1}{}^{(2)}\) represent the zeroth- and first-order Hankel functions of the second kind, respectively, while \(J_{1}\) refers to the Bessel function of the first kind with order one. The total field column vectors, denoted as \((E_{x})\), \((E_{y})\), and \((E_{z})\), each consist of N-elements, while the incident field column vectors, \(\left(E_{1x}^{i}\right)\), \(\left(E_{1y}^{i}\right)\), and \(\left(E_{1z}^{i}\right)\), also contain N elements. Meanwhile, the scattered field column vectors \((E_{x}^{s})\), \(\left(E_{y}^{s}\right)\), and \((E_{z}^{s})\) are composed of M elements, where M corresponds to the number of measurement points. The system matrices include \(\left[G_{1}\right]\), \(\left[G_{3}\right]\), \(\left[G_{4}\right]\), and \(\left[G_{5}\right]\), which are \(N\times N\) square matrices, while \(\left[G_{2}\right]\), \(\left[G_{6}\right]\), \(\left[G_{7}\right]\), and \(\left[G_{8}\right]\) are \(M\times N\) matrices. The diagonal matrices \(\left[\tau_{x}\right]\), \(\left[\tau_{y}\right]\), and \(\left[\tau_{z}\right]\) are constructed based on the dielectric coefficients, specifically \(\left(\tau_{x}\right)_{mn}=\epsilon_{1x}(\overline{r})-1\), \(\left(\tau_{y}\right)_{mn}=\epsilon_{1y}(\overline{r})-1\), and \(\left(\tau_{z}\right)_{nn}=\epsilon_{1z}(\overline{r})-1\). The identity matrix \([I]\) has dimensions \(N\times N\). The forward scattering problem under TM polarization is solved by applying Equations (11) and (12), whereas the corresponding formulation for the TE case is derived using Equations (13) and (14).