## 2 Materials and Methods
### Mathematical Apparatus for Magnetic Hysteresis Curve Reconstruction
Consequently, the magnetic scalar potential \(\varphi_{m}\)  and, thus, the magnetic field \(\mathbf{H}\) can generally be calculated using the following equations [45]:  
\[\varphi_{m}(\mathbf{r})=\frac{\mathbf{1}}{\mathbf{4}\mathbf{\pi}}\bigg{(}\iiint\frac{-\
abla \cdot\mathbf{M}}{|\mathbf{r}-\mathbf{r}^{\prime}|}\mathbf{dV}+\iint\frac{\mathbf{M}\cdot\mathbf{\hat{n} }}{|\mathbf{r}-\mathbf{r}^{\prime}|}ds\bigg{)} \tag{6}\]  
\[\mathbf{H}(\mathbf{r})=\frac{1}{4\pi}\bigg{(}\iiint\frac{-\
abla\cdot\mathbf{M}(\mathbf{r}-\bm {r}^{\prime})}{|\mathbf{r}-\mathbf{r}^{\prime}|^{3}}dV+\iint\frac{\mathbf{M}\cdot\mathbf{\hat{n }}(\mathbf{r}-\mathbf{r}^{\prime})}{|\mathbf{r}-\mathbf{r}^{\prime}|^{3}}dS\bigg{)} \tag{7}\]  
Here, \(|\mathbf{r}-\mathbf{r}^{\prime}|\) is the magnitude of the displacement vector from the elementary magnetic charge at point \(\mathbf{r}^{\prime}\) to point \(\mathbf{r}\), at which the magnetic field \(\mathbf{H}\) is being computed. Equations (6) and (7) show that the first and second terms describe the effect of the volume and surface magnetic poles as a volume magnetic charge density, \(\rho_{m}\), and a surface magnetic charge density, \(\sigma_{m}\), respectively. Accordingly,  
\[\rho_{m}=-\
abla\cdot\mathbf{M} \tag{8}\]  
and  
\[\sigma_{m}=\mathbf{M}\cdot\mathbf{\hat{n}} \tag{9}\]  
where \(\mathbf{\hat{n}}\) denotes an outward-directed unit vector normal to the surface of the magnetized sample. Therefore, the infinitesimal increment of the magnetic field \(d\mathbf{H}\) is given by the contribution of the magnetic volume and surface pole densities. In the context of the integral form, the magnitude and the directionality of the magnetic field \(\mathbf{H}\) is at the point of interest, given by the vector \(\mathbf{r}\), conditioned by the distribution \(\sigma_{m}\), the total surface concentration of which depends on the shape of the magnetized sample, and the spatial distribution \(\rho_{m}\), formed due to inhomogeneous magnetization, which in case of amorphous alloys arise mainly by the inducted heterogeneous stresses. Consequently, based on the divergent nature of magnetization and the conditions related to the formation of free magnetic poles, it is obvious that the properties of the internal and external magnetic field \(\mathbf{H}\) generated by the magnetized sample are given by its shape and induced anisotropy. The stated premises, supplemented by relations for the calculation of the magnetic scalar potential \(\varphi_{m}\) and the magnetic field \(\mathbf{H}\)--Equations (6) and (7), respectively, represent a fundamental theorem enabling the definition of the mathematical model according to which magnetization characteristics of the examined sample can be reconstructed. Although these equations accurately describe the properties of the magnetic field around the magnetized body, their applicability to the stray field measurement method is not generally universal due to the diversity of the structure and shape of the individual investigated samples. Based on this fact, a simplification based on the assumption of homogeneous magnetization in the entire sample volume was introduced during the derivation of the mathematical apparatus. In such a case, the first terms of Equation (6) disappear, and only the second term, considering the effect of the surface charge, remains:  
\[\
abla\times\mathbf{H}=0 \tag{2}\]0  
From this point, a multipole expansion is performed on Equation (10), leading to an approximation of the original function into a form of a scalar dipole potential given by a second term (first order) of a binomial identity. The first non-zero term of scalar potential is therefore given as follows [46]:  
\[\
abla\times\mathbf{H}=0 \tag{2}\]1  
where \(\mathbf{m}\) is a magnetic dipole moment. The above equation is valid for condition \(I/2\mathbf{r}\leq 1\), so the charge distribution tends to look like a point magnetic dipole from the position at which the magnetic field is investigated.