# Research on Radionuclide Identification Method Based on GASF and Deep Residual Network
## 2 Energy Spectrum Two-Dimensional Method Based on Segmented GSAF  
The Gramian Angular Field (GAF) is an encoding technique used to transform sequence data into two-dimensional images [15]. Its fundamental concept is to capture the interdependencies and dynamic characteristics of sequence data through polar coordinate transformation. The process involves converting one-dimensional sequence data into polar coordinates and then using trigonometric functions to construct a two-dimensional GAF matrix. Each element in the matrix corresponds to a pixel in the resulting image. By applying a suitable color mapping, the structure and patterns of the matrix can be visually represented. The GAF can be classified into two types based on the encoding method: Gram Angular Summation Field (GASF) and Gram Angular Difference Field (GADF), depending on whether cosine sums or sine differences are used. GADF focuses on capturing the differences between data points. In nuclide identification, the primary objective is to identify stable patterns and similarities in spectral data, as well as to determine the consistent characteristics of the same nuclide under different conditions. GASF emphasizes the similarity between data points, which helps reveal the inherent features in nuclide spectra and improves the recognition of signal structures. Therefore, this paper utilizes GASF for data processing. The conversion process is outlined as follows: normalize the raw energy spectrum data set \(Y=[y_{1},y_{2},y_{3},\ldots,y_{N}]\) as per Equation (1). \[\overline{Y}_{i}=\frac{(y_{i}-\max(Y))+(y_{i}-\min(Y))}{\max(Y)-\min(Y)} \tag{1}\]  
In the formula, \(\overline{Y}_{i}\) represents the normalized value of the \(i\)th channel in the original energy spectrum; \(y_{i}\) is the count of the \(i\)-th track in the original spectrum; \(Max(Y)\) is the maximum count and \(Min(Y)\) is the minimum count in the original energy spectrum. The normalized data are \(\overline{Y}=[\overline{y}_{1},\overline{y}_{2},\overline{y}_{2},\ldots \overline{y}_{N}]\), with a range of [\(-\)1,1]. The normalized data are then transformed according to Equation (2) to obtain the angle \(\varphi_{i}\) and corresponding radius \(r_{i}\) in polar coordinates. \[\left\{ \begin{array}{l}\varphi_{i}=\arccos(\overline{Y}_{i}),\quad-1\leq \ \overline{Y}_{i}\leq 1\\ r_{i}=\frac{N_{i}}{N}\,\quad N_{i}=1,2,3\ldots,1024\end{array} \right. \tag{2}\]  
After converting to polar coordinates, the angle \(\varphi\) has a range of [0, \(\pi\)]. The corresponding polar radius \(r_{i}\) is represented by the ratio of the channel number \(N_{i}\) of the energy spectrum data point \(y_{i}\) to the total number of channels \(N\), where \(N=1024\) in this study. Then, the Gram matrix, defined by the sum of cosine functions between each pair of data points, is used to construct the Gram Angular Field (GAF), as shown in Equation (3). \[ \begin{split} Gram=\left[\begin{array}{cccc}\cos(\varphi_{1}+ \varphi_{1})&\ldots&\cos(\varphi_{1}+\varphi_{N})\\ \cos(\varphi_{2}+\varphi_{1})&\ldots&\cos(\varphi_{2}+\varphi_{N})\\ \ldots&\ldots&\ldots\\ \cos(\varphi_{N}+\varphi_{1})&\ldots&\cos(\varphi_{N}+\varphi_{N})\end{array} \right]\\ =\overline{Y}^{\prime}\cdot\overline{Y}-\sqrt{I-\overline{Y}^{2}}^{\prime} \cdot\sqrt{I-\overline{Y}^{2}}\end{split}  \tag{3}\]  
Here, \(I=[1,\ 1,\ 1,\ \ldots,\ 1]\) is a unit row vector. Then, the inner product of two numbers is defined according to Equation (4), and Equation (3) is transformed to obtain the Gram Angular Summation Field (GASF), as shown in Equation (5). \[\langle a,b\rangle=cos(a+b)=cos\{\arccos(a)+\arccos(b)\}\] \[=cos\{\arccos(a)\}\cdot cos\{\arccos(b)\}-sin\{\arccos(a)\}\cdot sin\{ \arccos(a)\} \tag{4}\] \[=a\cdot b-\sqrt{1-a^{2}}\cdot\sqrt{1-b^{2}}\] \[GASF=