## 2 Materials and Methods
### Forward Model
The structure of \(\varphi_{n}\) reveals a dependency relation where \(\varphi_{3}\) satisfies \(\varphi_{3}=-(\varphi_{1}+\varphi_{2})\), leaving the remaining five basis functions free from linear interdependence. To establish an orthogonal framework for these five independent elements within the basis set, the Gram-Schmidt method--a standard linear algebra technique for orthonormalization--can be systematically applied. Through this procedure, the five original non-orthogonal functions are transformed into an orthogonal basis, with the derived orthogonalized forms explicitly detailed in prior studies [39; 45]:  
\[ \begin{array}{l}f_{1}(x,y)=\sqrt{\frac{4\pi^{4}}{3\pi}-x^{2}-y^{2}+2z^{2}}{ \frac{\left[x^{2}+y^{2}+z^{2}\right]^{2}}{\left[x^{2}+y^{2}+z^{2}\right]^{2}} }\\ f_{2}(x,y)=\sqrt{\frac{32\pi^{4}}{3\pi}}\frac{3x^{2}-3y^{2}}{2\left[x^{2}+y^{ 2}+z^{2}\right]^{2}}\\ f_{3}(x,y)=\sqrt{\frac{8\pi^{4}}{3\pi}}\frac{3x\pi}{\left[x^{2}+y^{2}+z^{2} \right]^{2}}\\ f_{4}(x,y)=\sqrt{\frac{32\pi^{4}}{3\pi}}\frac{3 xy}{\left[x^{2}+y^{2}+z^{2} \right]^{2}}\\ f_{5}(x,y)=\sqrt{\frac{8\pi^{4}}{3\pi}}\frac{3 yz}{\left[x^{2}+y^{2}+z^{2} \right]^{2}}\end{array}  \tag{6}\]  
Figure 1: A schematic diagram of the Cartesian coordinate system and the inclination \(I_{0}\) and azimuth \(A_{0}\) of the magnetic dipole moment. The above basis functions satisfy the following conditions:  
\[ \begin{split}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{m}(x,y )f_{n}(x,y)dxdy&=0,m\
eq n\\ \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f_{m}(x,y)f_{n}(x,y )dxdy&=1,m=n\end{split}  \tag{7}\]  
The linear combination of \(f_{1-5}\) can be utilized to represent the magnetic anomalies produced by any magnetic dipole source. Hence, the magnetic anomalies generated by Equation (2) can be re-expressed with the following formula:  
\[\Delta T(x,y)=10^{-7}m_{0}\sum_{n=1}^{5}a_{n}f_{n}(x,y) \tag{8}\]  
The coefficients \(a_{n}\) depend on the normalized parameters \(I_{0},\;\;A_{0},\;\;I\), and \(A\), which correlate with the projection of the magnetic anomaly \(\Delta T\) onto the orthogonal basis. As the orientation and location of the dipole source are unknown, \(a_{n}\) must be derived from the inner product of \(\Delta T\) and the orthogonal basis functions \(f_{1-5}\). In practice, \(\Delta T\) is discretized along the \(x\)- and \(y\)-axes. To compute this inner product, interpolation and sliding window techniques are applied. The calculation is expressed as:  
\[\alpha_{n}=\sum_{j=-J}^{J}\sum_{i=-I}^{I}\Delta T\big{(}x_{i},y_{j}\big{)}f_{n }(x_{i},y_{j}\big{)}\Delta x\Delta y(n=1-5) \tag{9}\]  
where \(I\) and \(J\) are the ranges of numerical integration and the dimensions of the selected sliding window, and \(\Delta x\) and \(\Delta y\) are the sizes of the grid after data gridding. The squared energy metric \(E\), essential for magnetic anomaly detection (MAD), is calculated using the defined formulation. A predefined threshold is applied during MAD execution to validate anomaly detection. The two-dimensional orthogonal basis decomposition method accomplishes two tasks: (1) quantifying the number of magnetic dipole sources and (2) determining their horizontal positions by identifying the maximum \(E\). This process supplies an initial horizontal position for subsequent inversion processes, thereby improving parameter estimation precision. \[E=\sum_{i=1}^{5}\alpha_{i}^{2} \tag{10}\]  
Therefore, in the estimation of magnetic dipole source parameters using the LM-OBF algorithm, the forward modeling relationship for the magnetic dipole source is expressed as follows:  
\[E=g(x_{0},\;y_{0},z_{0},m,I_{0},A_{0}) \tag{11}\]  
The parameter settings of the forward model are listed in Table 1.