## 2 Some Mathematics on Spatial Resolution
### Longitudinal Spatial Resolution of a Magnetic Field  
Regarding the spatial resolution dx, dy and dz in x-, y- and z-direction one can assume dx = dy = dz if no asymmetry of the imaging system is evident. The detection of the size of a magnetic field or to determine the magnitude of a magnetic field in a polarized neutron imaging depend on the number of spin rotations in the field. This measurement is based on the interaction of the neutron spin with B and provides information from B in only one direction, e.g., in the y-direction (neutron flight direction) in a \(\{x,y,z\}\) coordinate system. The neutron spin in a magnetic field B behaves like a classical particle, since the neutron velocity \(v\ll\) c and its spin vector \(\vec{s}\) rotates (classically seen) around \(\vec{B}\) with the Larmor frequency \(\omega_{l}=\gamma_{L}\cdot B\), where \(\gamma_{L}\) is the gyromagnetic ratio of the neutron (\(\gamma_{L}=-1.83247\times 10^{8}\) rad s\({}^{-1}\cdot\)T\({}^{-1}\)). From \(\omega_{L}=\gamma_{L}\cdot B\) one obtains the rotation angle \(\phi\), if t is the transit time of the neutron through the magnetic field \(B\). With \(\lambda=h/p\), \(p=m_{n}\cdot v\) and the neutron mass \(m_{n}=1.67493\times 10^{-27}\) kg [49], \(\phi\) is  
\[\phi=\omega_{L}\cdot t=\gamma_{L}\cdot B\cdot t\quad\rightarrow\quad\phi= \frac{\gamma_{L}}{v}\int\limits_{path}B\cdot ds=\frac{\gamma_{L}\cdot m}{h}B \cdot s\cdot\lambda \tag{6}\]  
One realizes, only \(|\vec{B}|\) = B is important, not the orientation of \(\vec{s}\) with respect to \(\vec{B}\), i.e., \(\omega_{L}\) is independent of the angle between \(\vec{s}\) and \(\vec{B}\). The factor \(\frac{\gamma_{L}\cdot m}{h}\) is constant \(=-4.6321\times 10^{14}\) [T\({}^{-1}\) m\({}^{-2}\)], so a spin rotation \(\phi\) around 180\({}^{\circ}\) (spin-flip) for a neutron wavelength \(\lambda=0.32\) nm \(=3.2\) and \(B\) = 1 mT would occur for a path length \(\sim\)21.2 mm. From Equation (6), \(\phi=\phi(B,s,\lambda)\) is a function of magnetic field, path length s and wavelength \(\lambda\). The total differential of \(\phi\), is  
\[\Delta\phi=\frac{\partial\phi}{\partial B}\cdot\Delta B+\frac{\partial\phi}{ \partial\lambda}\cdot\Delta\lambda+\frac{\partial\phi}{\partial s}\cdot\Delta s \tag{7}\]  
and yields only a dependence on the path length's', because in the sample \(B\) is constant, thus \(\frac{\partial\phi}{\partial B}\cdot\Delta B=0\), and the term \(\frac{\partial\phi}{\partial\lambda}\cdot\Delta\lambda\) can be considered to be small (\(\sim\)0.06 rad for \(B\) = 4 mT, s = 10 mm, \(\lambda\) = 0.32 nm and \(\Delta\lambda\) = 1% see Figure 2). Thus, the longitudinal spatial resolution of a \(B\) field is coupled to the magnitude of B, to the wavelength and wavelength spread \(\Delta\lambda/\lambda\) used. Figure 2 shows the path length dependence of a spin-flip on magnetic field for three wavelengths. One sees, the larger \(\lambda\) the smaller the path length for a spin-flip. Therefore, a thin sample containing a magnetic field preferably requires a longer wavelength for the detection and determination of B and allows for a large \(\Delta\lambda/\lambda\approx 10\%\) (thin in the sense of spin flips/sample thickness \(\leq\) 6 spin flips, see Figure 3). \(\Delta\lambda/\lambda\) determines the  
Figure 2: Dependence of path length for a spin flip as a function of magnetic field strength for three different wavelengths. If a neutron moves slower through B (large \(\lambda\)), the larger will be the spin rotation angle \(\phi\) and therefore the shorter is the path for a spin-flip. contrast in polarized neutron images and one sees in Figure 3 that with increasing B the contrast of spin flips decreases. However it can happen, for the determination of B, that for a given wavelength different B-fields produce nearly the same gray values in an image, as shown in the 90\({}^{\circ}\) sample orientation in Figure 4, where a polarized neutron image of a coil shows for two different B-fields nearly the same gray values.