# A 2D Lithospheric Magnetic Anomaly Field over Egypt Using Gradient Data of Swarm Mission
## Data Set and Methodology
### Modeling Techniques  
The lithospheric magnetic anomaly field (\(\delta\mathbf{b}\)) was calculated after the subtraction of the core (\(\mathbf{b}_{core}\)) and the external (\(\mathbf{b}_{external}\)) CHAOS fields from the observed data (\(\mathbf{b}_{observed}\)), which is represented mathematically according to Equation (1):  
\[\delta\mathbf{b}=\mathbf{b}_{observed}-(\mathbf{b}_{core}+\mathbf{b}_{external}) \tag{1}\]  
where \(\delta\mathbf{b}\) is a vector of the lithospheric magnetic anomaly field in the three (x, y, z) geographic coordinates according to the coordinates of the observed \(\mathbf{b}_{observed}\) data. Subsequently, we subtracted the lithospheric magnetic anomaly field between Swarm A and Swarm C, which represents the E-W gradient data. In addition, we subtracted the litho  
Figure 1: The number of data points with altitude, with the maximum data point concentrated at an altitude of 440 km. spheric magnetic anomaly field between two points separated by 15 s along the path of the same satellite, which represents the N-S gradient data. The three vector components of the gradient data through this work will be mathematically represented in the forms \(\
abla\mathbf{B}_{x}\), \(\
abla\mathbf{B}_{y}\), and \(\
abla\mathbf{B}_{z}\). To model the gradient magnetic field data in two dimensions, we expanded it in terms of the Legendre polynomial function (\(P\)). According to [27; 31], the 2D model can be represented mathematically according to Equation (2):  
\[\gamma_{i}=\sum_{n=0}^{n_{max}}\sum_{k=0}^{n}a_{nk}P_{k}(\Delta\theta_{i})P_{n -k}(\Delta\varphi_{i}) \tag{2}\]  
where \(i=1,\ldots N\) is the index of the data points, and \(\gamma=\sum\gamma_{i}\) is any vector of gradient magnetic anomaly field data. Each observed point (i) has \(\Delta\theta_{i}\) and \(\Delta\varphi_{i}\), denoting the latitude and longitude, respectively, where \(\theta_{i}\) and \(\varphi_{i}\) are the intermediate coordinates between any two points used for calculating the gradient data. The mathematical representation of both \(\Delta\theta_{i}\) and \(\Delta\varphi_{i}\) is defined by Equations 3.1 and 3.2 of [31]. It is worth noting that the selection of an intermediate location between any two points used for deriving gradient data, or even the location of either of these points, does not change the final results. Parameter \(a_{nk}\) is defined as the coefficients of the 2D model. These model coefficients could be represented mathematically as vector \(\mathbf{m}\) and are defined as \(\mathbf{m}=\sum_{n=0}^{n_{max}}\sum_{k=0}^{n}a_{nk}\). In this work, we have used the orders of expansion of the Legendre polynomials \(n=7\)-\(56\). More details regarding the determination of the limits of expansion of the Legendre polynomial are explained within the context of the current work. Equation (2) can be written in a mathematical, compact form using the matrix \(\mathbf{A}\), as shown in Equation (3):  
\[\mathbf{\gamma}=\mathbf{A}\mathbf{m} \tag{3}\]  
where \(\mathbf{A}\) is the operator matrix of the Legendre polynomial as defined in [27]. The weighted damped least-squares fit method used to estimate the model coefficients can be represented mathematically according to Equation (4):  
\[\mathbf{A}^{T}\mathbf{W}_{d}\gamma=\Big{(}\mathbf{A}^{T}\mathbf{W}_{d}\mathbf{A}+\alpha^{2}\mathbf{I} \Big{)}\mathbf{m} \tag{4}\]  
where \(\mathbf{W}_{d}\) is the weight matrix that has diagonal elements equal to \(\frac{1}{\sigma^{2}}\), and \(\sigma\) is the standard deviation of the gradient data [17]. More details regarding the calculation of the standard deviation of the analyzed data are given in the context of the current work. Parameter \(\alpha^{2}\) is the damping parameter, and \(\mathbf{I}\) is a unitary diagonal matrix.