Inhomogeneous field calibration of a magneto-optical indicator film device

A concept for the traceable calibration of magneto-optical indicator film (MOIF) based magnetic field imaging devices is presented and discussed for the example of a commercial MOIF device with a 60 × 45 mm2 sensor. The calibration facilitates a quantitative and fast characterization of magnetic microstructures combining relatively high spatial resolution with large imaging areas. The macroscopic calibration is performed using the homogeneous magnetic stray field of a pre-characterized electromagnet with a large pole shoe diameter of 250 mm. However, this calibration alone cannot yet account for the vectorial and spatially fast decaying stray fields of magnetic microstructures. For that, a forward simulation approach is pursued, based on the temperature-dependent magnetic parameters of the MOIF material as resulting from superconducting quantum interference device magnetometry and ferromagnetic resonance measurements. This is complemented by a transfer function-based approach to correct the impact of the sensor thickness and in-plane stray field components. The validity of the combined calibration and simulation approach is proven by means of a quantitative characterization of a magnetic scale. For the commercial MOIF device a 28.4 µm spatial resolution and 1.18 mT field resolution is achieved. The calibration is validated by a comparison to scanning Hall probe microscopy results. Furthermore, the uncertainty budget is discussed.


Introduction
The ongoing miniaturization process of industrial devices has triggered an increasing demand for advanced characterization techniques for magnetic microstructures combining high resolution, short measurement times and quantitative magnetic field data. This, in particular, holds for the in-line quality control during magnetic device fabrication, where magnetic scales for industrial positioning applications are a good example.
Original Content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
These are challenging to characterize, since currently the magnetic pole sizes are reaching the micrometer range. The magnetic fields of structures this small change their direction locally within the nanometer range and all three components of the magnetic field vector occur all over the sample to an appreciable extent. Therefore, a high-spatial-resolution analysis technique is needed and expedient. Additionally, spatially fast varying magnetic fields show a rapid decay with increasing distance to the sample. For sensors with a finite thickness this may even lead to an additional variation of the stray field in perpendicular sensor direction and thus to a magnetic structure size dependent field averaging.
A commonly used measurement technique for magnetic nano-and microstructures is scanning probe microscopy (SPM) in the form of, for example, magnetic force microscopy (MFM) [1][2][3] and scanning Hall probe microscopy (SHPM) [4,5]. Both have a spatial resolution in the nanometer range, use small and thin sensors and enable a low measurement height. However, MFM is not directly quantitative and both methods require long measurement times due to the scanning process. A very suitable technique makes use of the magneto-optical Faraday effect to visualize magnetic stray fields and currents of nanostructured materials [6]. The measurement is fast due to the possibility to measure a twodimensional plane at one shot. Furthermore, a time resolution of 100 fs can be achieved [6,7]. By applying a magneto-optical indicator film (MOIF) [6,8] also non-transparent samples can be characterized and the material can be tuned to reach a large Faraday rotation. The drawback of the MOIF technique is a reduced spatial resolution due to the sensor-sample distance and the thickness of the sensor film. The capabilities of the MOIF technique were already demonstrated by, for example, the quantitative analysis of thin hard magnetic samples [9] and investigation of vortex dynamics in superconductors [10,11]. Furthermore, first approaches for quantitative MOIF measurements and calibration methods were introduced. Some are even going behind a simple intensity to magnetic field relation by considering inhomogeneous MOIF illumination through a pixel-wise calibration [12] and the field averaging over the MOIF thickness [13]. Also, the influence of a uniaxial anisotropy and magnetic field components in the MOIF plane were analyzed [14]. However, no study takes all these effects into account or considers more complex magnetic anisotropies like a cubic anisotropy field. Moreover, no systematic uncertainty analysis incorporating all these effects as well as MOIF device properties and calibration field characteristics was presented so far. Although, this is indispensable for a calibration procedure. In this publication we discuss a position resolving calibration approach and combine it with a comprehensive analysis of the MOIF material magnetic parameters. The calibration and simulation process is carried out for a commercial MOIF device (CMOS-MagView XL from Matesy GmbH, CMOS: complementary metal oxide semiconductor). This device uses a 60 × 45 mm 2 large MOIF, an optical detection path and a CMOS camera with 1520 × 2048 pixels for the readout. By the imaging process, a sensor area of 28.4 µm × 28.4 µm is mapped onto one camera pixel, which defines the minimum resolution. The MOIF, a bismuth-substituted rare earth (RE) iron garnet (Bi, RE) 3 (Fe, Ga) 5 O 12 , is deposited on a gadolinium gallium substrate Gd 3 Ga 5 O 12 and capped with a mirroring and a protective layer. The MOIF magnetization lies in the plane of the film and its saturation field is 163 mT. Further details can be found in [15,16]. The operation principle of measuring the sample stray field as a brightness contrast by making use of the Faraday effect is visualized in figure 1. The magnetic sample is placed on top of the MOIF and its magnetic stray field orients the magnetization of the MOIF. From below linear polarized light is transmitted nearly perpendicular to the MOIF plane and is reflected at a mirroring layer on the sensor surface. The polarization plane of the incident light is rotated depending on the z-component of the MOIF magnetization which is the component parallel to its transmission direction due to the Faraday effect. With the help of Using polarizing filters and a camera this Faraday rotation is visualized as a contrast in brightness. Thus, the sample magnetization is measured as an intensity by the device. a polarizing filter this rotation is converted into a brightness contrast and detected using a camera with an image forming optics. Calibrating this device implies accounting for illumination and sensor inhomogeneities as well as for contributions of the optical path and compensating for CMOS camera pixel dependencies of the sensitivity. Additionally, non-linearities of the sensor must be corrected. A suitable structured approach based on a pixelwise calibration is discussed in this work. The paper is organized as follows: In section 2, a macroscopic calibration with a homogeneous field in z-direction is shown to examine the relation between the measured contrast in brightness and the magnetic flux density of the sample. The calibration is accompanied by a detailed uncertainty analysis. Properties of stray fields from magnetic microstructures are considered by microscopic calibration which is introduced in section 3. This includes the simulation of the device response using transfer functions in Fourier space as well as a minimization of the free energy function. To this end, properties of the MOIF like saturation magnetization and anisotropy constants are determined experimentally by superconducting quantum interference device (SQUID) magnetometry in DC measurement mode and ferromagnetic resonance (FMR) measurements. Not only the MOIF thickness but also the influence of stray field components parallel to the film plane are regarded. In section 4, the quantitative field analysis performance is demonstrated at the example of a magnetic scale. Finally, the method is verified by a comparison to results of SHPM measurements of the same scale in section 5.

Macroscopic calibration
To map the measured contrast in brightness traceably to magnetic flux density values a calibration of the CMOS-MagView XL in spatially homogeneous perpendicular magnetic fields is performed. The magnetic fields are generated by an electromagnet that was pre-characterized with a calibrated Hall probe. Also, the properties of the MOIF device itself were analyzed. The developed calibration algorithm utilizes knowledge on underlying physical principles of the setup.

Characterization of calibration setup
A calibration of a MOIF device requires a magnetic field with well-known spatial homogeneity and high reproducibility. Here, an electromagnet with a large pole shoe diameter of 250 mm was employed. The magnetic field B ext of the electromagnet is set by a stabilized current from a Bruker power supply. The temperatures of the electromagnet and the power supply are stabilized by a water-cooling system (ers Energieund Kältetechnik GmbH) which is set to 23 • C. The ambient temperature, as measured with a Hall magnetometer (FH55 from Magnet-Physik), was stabilized between 24 • C and 27 • C during the characterization of the magnetic field of the electromagnet and the subsequent calibration of the CMOS-MagView XL. To characterize the magnetic field as a function of the position between the pole shoes, B ext (x, y, z), a scanning unit for the Hall magnetometer probe is employed. The probe can be scanned parallel to the pole shoes (x-and ydirection) using motorized stages (PI) and perpendicular to the pole shoes in z-direction by a manual translation stage. A parallel alignment of the probe with the pole shoes is adjusted and controlled based on the results of an axial scan of the probe with a rotational motor. For the calibration a fixation for the CMOS-MagView XL was built to ensure a reproducible mounting in the electromagnet at a defined position with respect to the pole shoes and the Hall magnetometer. A characterization of the field homogeneity in z-direction showed no significant change on length scales comparable to the thickness of the MOIF with D = 4.5 µm. Therefore, further investigations focused on characterizing the field in terms of stability and repeatability as well as lateral homogeneity for different nominal fields B set ext . To achieve the traceability to the unit Tesla, the Hall magnetometer was calibrated at PTB. This revealed an offset of 0.1 mT and an additional shift of 0.1 mT over a temperature range of 4 • C.
The stability of the field is estimated by different long-term measurements over several hours. The magnetic flux density was, for example, measured over 16 h. The field slightly increased with the increasing room temperature from 25.6 • C to 27.6 • C, but the overall change was below 0.06 mT. Another way to estimate the field stability as well as the stability of the scanning unit are repeated measurements of the field along one line. Here, the maximum measured fluctuation for one point over 20 measurements is 0.02 mT. The repeatability of the field measurement process can be estimated by determining the difference in the magnetic field values under repeated zeroing of the Hall magnetometer, reinstalling it in the scanning unit and resetting the supply current. For 20 repetitions differences of 0.1 mT were found. In summary, the uncertainty contributions of the stability and repeatability were estimated as ∆B stab = 0.1 mT and ∆B rep = 0.1 mT, respectively. The uncertainty contributions are clearly depicted in the first path of the Ishikawa diagram in figure 2.
The homogeneity of the magnetic stray field over an area of 60 × 70 mm 2 , which is slightly larger than the sensor film, is shown in figure 3. A radial dependency of B ext (x, y) is visible. However, the deviation over the whole area amounts to only 0.03 mT for B set ext ≈ 20 mT and at a resolution of the Hall magnetometer of 0.01 mT. The field homogeneity was measured for 24 field values B set ext within the range of ±150 mT. For larger fields around B set ext ≈ 90 mT, the overall deviation amounts to ∆B hom = 0.2 mT, partially induced by the decreased resolution of the Hall magnetometer of 0.1 mT for fields above 30 mT.
Adding up all uncertainty contributions resulting from the characterization of the magnetic field of the electromagnet yields an upper value of the overall magnetic field accuracy of ∆B sum = ±0.7 mT. This is confirmed by repeated measurements over a time of several months, where a field uncertainty of about ±0.5 mT was observed.

CMOS-MagView XL calibration procedure
The calibration of the CMOS-MagView XL comprises three steps. (i) First, the properties of the device itself were investigated like noise, repeatability and temperature influence. (ii) The theoretical functional relation between measured device intensity and underlying perpendicular magnetic field was established allowing different parameters for each image pixel. (iii) The device response in intensity was measured at different magnetic fields in the electromagnet and the results were integrated into the calibration algorithm making use of the theoretical functional relation.
(i) To determine the CMOS-MagView XL noise characteristics, the standard deviation of the intensity was determined from 30 measurements for each pixel. This leads to a mean relative intensity uncertainty over the sensor area of 1.77% with a standard deviation of the relative uncertainty of 0.24 %. The mean intensity for each pixel of these 30 measurements also enters into the calibration algorithm. The MOIF temperature is recorded optically. During the calibration, typical temperatures were found to lie between 31 • C and 33 • C. The intensity difference between three measurements performed at 31.1 • C and three performed at 33.25 • C was analyzed for each image pixel, resulting in a temperature induced relative intensity variation over the sensor area of 0.03% with a standard deviation of 1.3%, referred to the 31.1 • C data. The temperature of the MOIF during a sample measurement typically is found between 30 • C and 31 • C, comparable to the calibration. Therefore, the relative intensity changes of 0.03% can be used as an estimation of the temperature induced uncertainty. The repeatability of the intensity measurements was tested by comparing results from before and after a restart of the CMOS-MagView XL. This gives a mean relative uncertainty of 0.05% with a standard deviation of 1.49% over the sensor area.
(ii) To establish the calibration algorithm based on physical mechanisms, different contributions to the measured intensity I were considered: The measured MOIF intensity is described by Malus's law [17]:  I 0 is the intensity of the light before the second polarizing filter and after transmission through the MOIF. α 0 = n + π 2 · 45 • with n = ± 0, 1, 2, & is the angle between the two polarizing filters which are placed in the optical path before and after the MOIF. The value of α 0 is selected to achieve the largest magnetic field sensitivity which is in the linear regime of the cos 2 function. Whether even or odd values of n apply depends on the fact if the intensity is increasing or decreasing for an increase of the applied magnetic field. The Faraday rotation β = c · M z is proportional to the film-perpendicular component of the MOIF-magnetization [18] where M S is the saturation magnetization of the MOIF and θ the angle between the actual direction of the magnetization and the vector normal to the film plane. The intensity thus can be described as and since a maximum doubled Faraday rotation of 10 • is observed for this particular MOIF material, the outer cos 2 function can be linearly approximated leading to with k 1 = I 0 · cos 2 (α 0 ) and k 2 = −2 · I 0 · c · M S · cos (α 0 ) · sin (α 0 ). The functional dependence of cos θ on an external field in z-direction was simulated using the magnetic anisotropy constants that were determined with the help of FMR as will be described below. The simulation result was fitted with the cubic equation cos θ (B) = a * B 3 + b * B. This finally leads to the following equation for the intensity response of the CMOS-MagView XL to an applied homogeneous, perpendicular magnetic field: Assuming homogeneous MOIF material parameters over the sensor area would lead to merely lightning intensity dependent constants k 1 = I 0 * p 1 and k 2 = I 0 * p 2 with universal p 1 and p 2 . However, fitting the measured data I (B) with only I 0 as a free parameter for each pixel did not lead to satisfying results. Therefore, we conclude that at least one further parameter is not constant over the MOIF area. Either α 0 might vary locally due to the optical path or the film properties might change. An inhomogeneous material distribution or defects might, for example, lead to differences in the material dependent constant c. Similarly, a non-constant thickness or differences in the saturation magnetization of the MOIF would influence the result, alike local temperature or strain variations. Therefore, both k 1 and k 2 were used as free fit parameters for I (B).
(iii) The fit is realized in Python using the scipy.odr package from NIST [19], considering the obtained uncertainties for the applied magnetic field and for the intensities of the CMOS-MagView XL. The result is shown in figure 4 for one of the pixels. The solutions for k 1 and k 2 for every pixel are visualized in figures 5(a) and (b). Figures 5(c) and (d) contain the doubled relative standard uncertainties of the parameters for each pixel. The mean doubled relative standard uncertainty for k 1 is 0.20% and its standard deviation over the film area is 0.06%. The corresponding mean for k 2 is 1.18% and the standard deviation is 0.48%. To calculate the stray field of a magnetic sample from the measured intensity data another Python script was programmed. This extracts the stray field values B by finding the roots of the rearranged equation (4): To relate the above discussed factors to the measurement uncertainty, artificial intensity data were created corresponding to a homogeneous external field of 5 mT and 108 mT, respectively. From this data the stray field values were calculated with k 1 and k 2 as well as with k 1 −0.2% and k 2 −1.18% which results in the largest possible error. The mean difference of these two calculations for 5 mT is 0.88 mT which corresponds to a relative uncertainty of 17.6%. For 108 mT the mean difference is 1.18 mT. This leads to a relative uncertainty of 1.09%. The calibration algorithm allows only values within the calibrated field range of ±110 mT, thus the maximum field uncertainty for the calibrated device is 1.18 mT. All results of

Microscopic calibration
For the characterization of microstructures, the calibration in a homogeneous field is not sufficient. The response of the CMOS-MagView XL depends on the perpendicular component of the MOIF magnetization M z,MOIF . Unlike often simplistically discussed, M z,MOIF is not only defined by the perpendicular component of the sample stray field but results from the interplay between the vectorial field components (H x , H y , H z ) and the magnetic anisotropies of the indicator film. Additionally, the sensor always averages over its thickness. Relating (H x , H y , H z ) to the M z,MOIF requires knowledge of the sensor's magnetic properties. Therefore, in a first step, we analysed the MOIF sensor material by DC-SQUID and FMR. The material parameters were then used to simulate the device response. A forward simulation was performed due to the ambiguity of the inversion process from MOIF magnetization to sample stray field. By comparing simulation and measurement results characteristic parameters of the sample can be extracted like remanence magnetization, thickness of magnetic layer and local stray field vectors. An approach to correct the impact of the sensor thickness using transfer functions is discussed in section 3.2.

Determination of anisotropy constants
DC-SQUID measurements were performed to analyse the temperature dependent saturation magnetization µ 0 M S,MOIF of the MOIF used in the CMOS-MagView XL with a commercial SQUID magnetometer from Quantum Design (MPMS 3) in DC mode. The sample was glued to a glass rod and field dependent magnetic moment curves m (H ext ) were measured with the external field in the plane of the film. The The magnetic anisotropy constants of the MOIF were characterized by FMR measurements at temperatures varied from 23.23 • C to 47.25 • C in 3 • C steps. The sample was placed upside down on a coplanar waveguide (CPW) that was contacted with high frequency probes (GBB Picoprobe Model 40A) and connected to a Vector Network Analyzer (VNA, Rohde & Schwarz ZVA24). A magnetic field with constant amplitude of 100 mT was generated by a yoke that was rotated in the plane around the MOIF to perform φ-scans at frequencies up to 10 GHz [20]. The VNA detected transmission parameter S 21 is monitored for absorption analysis.
The frequency spectra show the appearance of numerous peaks which were interpreted as spin wave modes [21][22][23]. Since their position does not show an influence on the CPW signal conductor width, they were regarded as perpendicular standing spin waves. Here, the lowest frequency, highest amplitude mode corresponds to a spin wave vector k = 0, i.e. a homogeneous, spatially independent excitation. The measured resonance frequencies f res of the homogeneous mode as function of temperature and the direction of the applied field in the sample plane are summarized in figure 6. The dispersion relation of the homogeneous mode can be derived from the Landau-Lifshitz-Gilbert equation without knowledge on the materials exchange constant A, unlike for the higher k modes. For the analysis of the FMR data, the position of the highest amplitude peak as a function of the angle φ of the applied field was extracted. To model the FMR spectra, the Smit-Beljers-Suhl approach [24,25] was applied that relates the ferromagnetic resonance frequency f = ω 2π of the material to the derivatives of the magnetization and field dependent terms of the free energy function F of the material: where the derivatives must be taken at the equilibrium magnetization angles θ 0 (to the plane normal) and φ 0 (in the plane). γ is the gyromagnetic ratio and g the g-factor. In the MOIF magnetic thin film material, the dominant contributions to F are the Zeeman energy F zee , the demagetization energy F demag and the crystalline anisotropy energy terms F c (cubic anisotropy), F uip (uniaxial in-plane anisotropy), and F uoop (out-ofplane uniaxial anisotropy). All contributions are functions of the magnetic field H and the magnetization M vectors. For convenience, both vectors are given in spherical coordinates, In spherical coordinates the energy contributions take the following forms: (11) Here, the N (x/y/z) are the entries of the demagnetization tensor of the thin film MOIF material in main axis representation and φ u and φ c are the orientation of the uniaxial and cubic anisotropy axes, respectively, in the sample plane. Combining equations (6) to (11) allows to derive an expression relating the field angle φ to the measured FMR frequency as a function of the anisotropy parameters of the material and of its magnetization: The equation is valid if the magnetization lies in-plane and if the in-plane magnetization component is aligned with the in-plane magnetic field component (φ = χ). By fitting equation (12) to the measured data, the anisotropies and the orientations of their easy axes can be determined as fit parameters. The saturation magnetization is interpolated from the DC-SQUID data and entered as temperature dependent M(T) into the fit. For the fits, the assumption φ = χ is not fully met in the experiment but leads to minor errors, since the applied field was significantly higher than the effective in-plane anisotropy fields. Further the position of the extrema and the frequency offset are fitted and these values are not significantly impacted by the simplification.
The results of the f res fits for all temperatures are summarized in figure 7 in the form of anisotropy fields over temperature, where the anisotropy constants and anisotropy fields are related via K ani = B ani · M S /2. For all temperatures is φ u = 0.8 rad and φ c = 1.46 rad. The in-plane uniaxial anisotropy data show no clear temperature dependence. Which leads to the assumption that these very small anisotropy values below 0.25 mT are artefacts of the measurement setup. The cubic and uniaxial out-of-plane anisotropies enter into the simulation of the device response.

Simulation of device response
Instead of simulating the sample stray field based on the device response a forward simulation starting from a guessed sample magnetization was chosen due to the fact that one z-component of the MOIF magnetization can be caused by different sample stray fields. An example for this procedure is presented in the next section and visualized in figure 8 for a magnetic scale. Hereby the ambiguousness of the inversion process for stray fields below the switching field of the MOIF material and from the perpendicular magnetization component of the MOIF to stray field vector of the sample in general were circumvented. The underlying magnetization pattern of the sample is estimated by a discrimination, assuming a perpendicular magnetization. The implemented procedure allows an arbitrary distribution of up and down magnetized regions. To define a discrimination criterion, the fact was exploited, that, while the device output in general must be corrected for the impact of sensor thickness and in-plane components, the field value B = 0 mT is displayed correctly provided that a reference image is subtracted from the data. Additionally, the sign of the field values is maintained. Therefore, areas with a measured field value B meas above or below zero are interpreted as up and down magnetized regions, respectively. This initially results in sharp transitions between the domains. To allow for a finite domain wall width, the image can be convolved with a domain transition kernel with selectable transition width.
From the estimated magnetization pattern the magnetic stray field of the sample at the distance of the MOIF can be calculated based on a transfer function approach. The procedure is as follows.
(i) A two-dimensional discrete Fourier transformation (DFT) of the magnetization is performed because the device measures in the xy-plane: X and Y are determined by the pixel number of the CMOS camera. Together with the pixel size dx × dy this leads to a pixel size in k-space of 2π X·dx × 2π Y·dy . (ii) The stray field components at the sample-side sensor face are calculated by a multiplication in Fourier space of M z (k) with transfer functions [26,27]. The transfer functions contain the sensor-sample distance z and sample thickness d dependent field decay: (iii) The magnetic stray field in real space is recovered by the inverse DFT: The device response on the three-dimensional magnetic stray field generated by the estimated magnetization pattern of the sample is calculated. The underlying concept is to determine the orientation of the sensor magnetization M Sensor for a given magnetic field orientation H Sample . To this end, the minima of the free energy function of the MOIF material for a given H are determined numerically. When multiple minima are found, the solution closest to the solutions found for neighboring sample positions is selected to enforce continuity. The applied free energy function is identical with the one used for the FMR simulations above considering the determined magnetic anisotropies but neglecting the artificial small uniaxial in-plane anisotropy. The final correction step regards the non-linear response of the MOIF. The CMOS-MagView XL signal I is a monotonous and continuous function of merely the perpendicular magnetization component M z,MOIF of the sensor film. The in-plane components of M (x,y),MOIF are not relevant for the response. A perfect calibration in perpendicular magnetic fields B z is assumed for which the simulated assignment M z,MOIF ↔ B z is determined. A perfect calibration means B z = B MagView , where B MagView means the field value as given by the CMOS-MagView XL. The calibration again is simulated by free energy minimization. From this last step forward simulation data were obtained that can directly be compared to the output of the calibrated CMOS-MagView XL.

Correction of the finite sensor thickness
The finite sensor thickness can be considered which leads to an averaging of the field over the sensor. When measuring small structures with spatial rapidly decaying stray fields, the CMOS-MagView XL measures a reduced signal compared to the field present at the sample-side face of the sensor. As derived in the supplement, the impact of the finite MOIF sensor thickness can be corrected by a multiplication of H (k, z) by another transfer function MOIF TF which returns the averaged stray field: The relevance of this correction depends on the relation between pixel resolution and sensor thickness D as well as on the sample structure size (via k) and the sensor-sample distance z (since components with large k are mostly decayed at high distances) and is low for the CMOS-MagView XL. However, the correction can become significant for high resolution measurements, e.g. using MOIF based microscopes.

Measurement and simulation of a magnetic scale
The performance of the CMOS-MagView XL calibration is demonstrated by the characterization of a commercial magnetic scale provided by Sensitec GmbH as shown in figure 8(a). The Sr-ferrite based scale has a written pole pattern of alternating up and down poles with a nominal pole size of 250 µm and a remanence magnetization of µ 0 M R = 395 mT. The measurement result is shown in figure 8(b) and a magnification of the selected area for further investigation in (c). In part (d) the created discrimination image is shown.
Steplike features at the pole transitions are an artefact of the limited pixel resolution. From this selected area a cross-section at y = 1 mm was further examined. The results are presented in figure 9. In part (a) the magnetic field data measured by the MOIF device after the macroscopic calibration is depicted together with the discrimination pattern which includes a pole transition width of 50 µm. In part (b) all three stray field components are presented as calculated from the discrimination image. Differences between the simulated z-component and the measured field are clearly visible. It can be seen in part (c) that the influence of the sensor thickness is negligible in this case due to the relatively large distance between sample and sensor in comparison to the sensor thickness. All three stray field components were used to simulate the device response as demonstrated above. The comparison with the measured signal is shown in part (d). For an assumed measurement height of 50 µm and a thickness of t = 75 µm for the magnetic material a reasonable agreement between measurement and simulation is found. An initial value for the measurement height was chosen based on the measured sample roughness of 10 µm and the possibility of dust particles between the sample and the sensor. Then the measurement height as well as other simulation parameters like the sample thickness were adjusted in an iterative process until a good agreement of measured and simulated data was achieved. This shows, that the significant discrepancy between measured data and simulated perpendicular component of the sample stray field can be satisfyingly explained by the influence of in-plane magnetic field components. The small remaining differences can probably be attributed to imperfection of the writing process during the fabrication of the scale.

Validation by comparison with SHPM
The outcome of the calibration and of the scale characterization was validated by measuring the same magnetic scale with SHPM as a quantitative measurement technique using a 5 µm Hall sensor made of gold on a cantilever, as described in detail in [28]. The result is presented in figure 10. Both measurement responses match quite well regarding the uncertainties of ±2.5 mT for MOIF and ± (7 mT + 13%) for SHPM and the fact that the datasets are not from the exact same position on the scale. Thereby, the CMOS-MagView XL calibration for inhomogeneous magnetic stray fields is validated.

Conclusion
A calibration approach for MOIF devices was presented and successfully implemented for a commercial device, the CMOS-MagView XL from Matesy GmbH. The approach enables traceable measurements of magnetic microstructures. First, a macroscopic calibration using well-known, homogeneous and perpendicular stray fields is performed to relate the measured intensity to the magnetic flux density. The assessment of the uncertainty budget is discussed, revealing a calibration uncertainty of 1.18 mT over the measurement range of ±110 mT for the CMOS-MagView XL. Second, a microscopic correction approach was implemented which is indispensable for the quantitative investigation of magnetic microstructures and which was realized here for the first time. It comprises the simulation of the device response considering (i) properties of the MOIF like saturation magnetization and anisotropy constants, (ii) the averaging over the sensor film thickness and (iii) the influence of in-plane stray field components. Thereby, the sensor response on all three stray field components can be determined. By a comparison with the measured signal, it is possible to estimate the sample remanence magnetization, magnetic layer thickness, transition width between opposite magnetized areas and measurement height. Furthermore, all three stray field components of the sample can be reconstructed. This is successfully demonstrated for the CMOS-MagView XL by means of the characterization of a magnetic scale. The method was validated by the comparison of the measurement results for a magnetic scale with the results of a SHPM measurement. In conclusion, a unique tool for fast and quantitative characterization of scientific and industrial relevant magnetic microstructures was created.