# Arbitrary Sampling Fourier Transform and Its Applications in Magnetic Field Forward Modeling
## 3 Sampling Rules
### Inverse Transform Sampling Rules  
The inverse transform sampling is related to the distribution of the spectrum. The subdivision is flexible, and it is associated with the sampling in the spatial domain. According to the sampling theorem, the maximum value in the wavenumber domain is  
\[k_{max}=\frac{\pi}{\Delta x_{min}}. \tag{16}\]  
\(k_{max}\) is also the cut-off frequency, and sampling within this cut-off frequency can ensure that all spectrum information can be sampled. When the spectrum changes violently, the maximum wavenumber needs to reach \(k_{max}\). When the spectrum changes slowly and the energy is relatively concentrated, the maximum wavenumber range does not need to reach \(k_{max}\) to reduce the number of sampling points to improve the calculation efficiency.  
Sampling in the wavenumber domain is divided into uniform sampling and non-uniform sampling. According to the discrete Fourier transform sampling theorem, when sampling uniformly, the wavenumber arrangement is expressed as  
\[k_{j}=p\Delta k,j=1,2,\cdots,M. \tag{17}\]  
where, \(k_{j}\) is the wavenumber arrangement, \(j\) is the sequence number of sampling points, \(\Delta k\) is the sampling interval, and \(M\) is the sampling points in the wavenumber domain. When the number of sampling points \(M\) is even, \(p\) is  
\[p=-\frac{M}{2},-\frac{M}{2}+1,\cdots,-1,0,1,\cdots,\frac{M}{2}-1. \tag{18}\]  
When the number of sampling points \(M\) is odd, \(p\) is  
\[p=-\frac{M-1}{2},-\frac{M-1}{2}+1,\cdots,-1,0,1,\cdots,\frac{M-1}{2}. \tag{19}\]  
In the case of non-uniform sampling, there are two commonly used methods: piecewise uniform sampling and logarithmic interval uniform sampling. Piecewise uniform sampling is based on uniform subdivisions, encrypted in several intervals where the spectrum changes violently and the energy is strong, and sparse in the intervals where the spectrum changes slowly. Logarithmic interval uniform sampling applies to the spectrum concentration in the region with a small wavenumber and the rapid attenuation of energy as the wavenumber increases, or the energy concentration in the region with a large wavenumber and the rapid attenuation of energy as the wavenumber decreases.  
For logarithmic interval sampling, set the wavenumber selection range as \([-k_{max},k_{max}]\), the number of sampling points in the wavenumber domain as \(2M+1\), and sample uniformly in the logarithmic domain with a sampling interval of  
\[\Delta k=\frac{lg(k_{max})-lg(k_{min})}{M}. \tag{20}\]  
where \(k_{min}\) is a small value, generally \(10^{-6}\sim 10^{-3}\).  
The arrangement of wavenumbers on \([-k_{max},0]\) is  
\[-k_{max},\ \sim\ -10^{lg(k_{min})+(M-1)\Delta k}\sim\ -10^{lg(k_{min})+(M-2) \Delta k}\sim\ \cdots\ \sim\ -10^{lg(k_{min})+\Delta k}\sim 0. \tag{21}\]  
The arrangement of wavenumbers on \([0,k_{max}]\) is  
\[0\sim 10^{lg(k_{min})+\Delta k}\sim 10^{lg(k_{min})+2\Delta k}\sim\ \cdots\ \sim 10^{lg(k_{min})+(M-1)\Delta k}\sim k_{max}. \tag{22}\]  
If some parts of the spectrum change slowly and some parts change violently, uniform and non-uniform sampling can be combined to improve the calculation accuracy and efficiency effectively.  
To sum up, forward and inverse Fourier transform sampling rules are mainly based on the change law of the transform function. The sampling with fast energy change is encrypted, and the sampling with slow energy change is sparse. Flexible sampling can consider both calculation accuracy and calculation efficiency.