Domain Imaging in Periodic Submicron Wide Nanostructures by Digital Drift Correction in Kerr Microscopy

Magneto‐optical Kerr microscopy is a powerful method for imaging magnetic domains. Even though domain imaging below the diffractive resolution limit is possible, such investigations are getting increasingly complex with decreasing structure size due to the decreasing Kerr contrast. As magnetic domain images free of topographical artifacts are obtained by subtracting a reference image from the actual image, the corresponding challenges are additionally increased by unavoidable sample motion in the time interval between acquiring the two images. Software‐based drift corrections typically rely on a unique structure in the image's region of interest (ROI), recognized automatically or selected manually by the user. By digital image shifting, the ROI positions in the actual and reference images are aligned, and the sample motion is compensated. For magnetic domain imaging in periodically arranged micro‐ or nano‐objects, unique topographical features are not given, making the drift correction by ROIs difficult, often even impossible. Herein, a novel software‐based approach is presented for drift corrections to image domains with features close/below the optical resolution limit and for investigating periodically arranged micro‐ or nano‐objects without utilizing ROIs. High‐contrast images are obtained, enabling the characterization of periodically arranged 1D, 2D, and 3D magnetic objects with lateral dimensions below 100 nm.


Introduction
[5] The interpretation and modeling of domain images at the surface of a magnetic material increase the understanding of the underlying physical phenomena, starting from fundamental magnetization dynamics to highly evolved application fields like spintronics. [6] variety of domain imaging techniques have, therefore, been developed, determining directly local magnetization directions of the domains as a function of the external magnetic field or time. [3][5][6][7][8][9] Although domain imaging by Kerr microscopy is possible for domain sizes beyond the optical resolution limit, [4] the contrast between such small domains decreases with decreasing domain size.Therefore, technologically more challenging methods like magnetic force, [10] Lorentz, [11,12] and X-ray photoemission electron microscopy [13,14] are often utilized for nanoscale domain imaging.However, domain imaging with these more involved methods is sometimes difficult or even impossible for specific samples or experimental conditions.This motivates work on enhancing the magnetic domain contrast in Kerr microscopy for small-sized domains or for particular domain configurations where standard contrast enhancement methods do not work.
There are three main approaches for enhancing the contrast in Kerr microscopy.A first strategy rests on modifying the experimental setup to be sensitive to different magnetization components with a subsequent subtraction/addition of the signals at different magnetization states, [7,15] allowing for spatially resolved dynamics analysis [9,16] or vector imaging of magnetic domains. [6,7,17,18]In a second approach, the Kerr signal has been enhanced by covering the samples with antireflection layers [19,20] DOI: 10.1002/adpr.202300170Magneto-optical Kerr microscopy is a powerful method for imaging magnetic domains.Even though domain imaging below the diffractive resolution limit is possible, such investigations are getting increasingly complex with decreasing structure size due to the decreasing Kerr contrast.As magnetic domain images free of topographical artifacts are obtained by subtracting a reference image from the actual image, the corresponding challenges are additionally increased by unavoidable sample motion in the time interval between acquiring the two images.Software-based drift corrections typically rely on a unique structure in the image's region of interest (ROI), recognized automatically or selected manually by the user.By digital image shifting, the ROI positions in the actual and reference images are aligned, and the sample motion is compensated.For magnetic domain imaging in periodically arranged micro-or nano-objects, unique topographical features are not given, making the drift correction by ROIs difficult, often even impossible.Herein, a novel software-based approach is presented for drift corrections to image domains with features close/below the optical resolution limit and for investigating periodically arranged micro-or nano-objects without utilizing ROIs.High-contrast images are obtained, enabling the characterization of periodically arranged 1D, 2D, and 3D magnetic objects with lateral dimensions below 100 nm.
or by layers enabling surface plasmon excitation. [21]A third approach has been the postexperiment digital processing of the images with low Kerr contrast, which can be carried out without any experimental setup or sample modifications.Examples of postprocessing methods for contrast enhancement in digital images are histogram equalization [22] or genetic algorithms. [23]s this third approach possesses the potential for contrast enhancement with a minimum of costs, in the current contribution, we will show the feasibility of a postprocessing contrast enhancement method in Kerr microscopy for samples where other standard digital approaches are difficult to apply.
In general, domain observation by Kerr microscopy is facilitated by smooth and optically flat surfaces, as the weak Kerr contrast may be hidden or decreased by strong material or topographic contrast otherwise. [24]Additionally, inhomogeneous illumination conditions may impede the recording of highquality Kerr images. [25]A pure domain image free of contrast due to topographic structures and compensated for laterally varying illumination is, therefore, typically obtained by recording an image at the applied external field H ext , which is then subtracted from a reference image captured at its magnetically saturated state [25] or by a reference image being averaged during a fastswitching AC loop. [26]hile the image postprocessing procedures work well for continuous, topographically flat systems, their application to topographically patterned samples is more complex.Difference images, usually obtained in Kerr microscopy measurements, generally suffer from sample motion caused by vibrations, forces due to varying magnetic fields, or varying temperatures, resulting in different positions of the sample in the reference and measurement images.As a consequence, contrast feature artifacts or blurred domains are observed in the difference image, as exemplarily shown in Figure 1a,b for exchange biased Cu(5 nm)/IrMn(30 nm)/NiFe(10 nm)/Al(3 nm) microdisks, squares, and stripes with lateral dimensions of 10 μm.The influence of sample motion on the difference image (e.g., being observable as bright and dark artifacts at the structure's edges in Figure 1a,b) is increasing with longer acquisition times, necessary for observing small domains, and with decreasing structure size.In magnetization dynamics experiments, this fact results in varying domain contrast for different sweep rates, complicating their interpretation.[29] The corresponding position corrections have been achieved experimentally by a feedback loop-controlled xyz-piezo stage mounted beneath the sample holder. [30,31]For the digital position corrections, pronounced topographic structures on the sample are required and used as markers.Once a marker has been identified, a small section of the image surrounding the marker will be selected as a region of interest (ROI) automatically or manually by the user. [27,32]For such an ROI, besides containing the topographic features, it is crucial to extend over a sample area where no varying magnetic contrast is expected during the experiment.For flat surfaces without topographic markers or samples with many similar topographic structures, like the periodic topographic patterns of Figure 1b, this approach is not or not fully able to compensate for the sample motion.
A standard digital drift correction algorithm generally proceeds in two steps. [27]In the first step, after selecting the marker and the corresponding ROI, the translational drift of the measurement image concerning the reference image is detected by comparing the positions and orientations of the marker within the ROI.The marker motion between the measurement and reference images can be determined in the simplest case by taking the sum of the squared gray scale differences between the actual image and reference over all pixels in the ROI.During this template-matching procedure, the ROI is shifted from the actual image's position toward the ROI's position in the reference image.At the position of a minimum difference, the shift parameters are determined, which are then used to match the images in the second step of the drift correction. [33]he computational time depends on the number of individual images in the image series, the area of the selected ROI, and the desired accuracy. [27]electing a unique topographic marker and the corresponding ROI for topographically elevated periodic magnetic microstructures is difficult.For example, for periodic 1D structures, a 2D repositioning fails due to the translational symmetry along the nonperiodic axis (in the case of Figure 1b the y-axis).To avoid these difficulties, we developed a drift correction algorithm with the open-source program language Python in which a manual or automated selection of a ROI with a unique topographic marker is not necessary and it works well with topographically elevated micro-and nanostructures.To demonstrate the power of the newly developed shift correction code, the processing of Kerr images will be compared to the results of standard image processing.

960
P 642 h¼1 P 960 j¼1 g h,j lies approximately in the middle of the 16-bit grayscale range.For the current experiments, the dynamic grayscale range ½g topo;max , g topo;min from the topographic structures is larger than the one for the magnetic signal variations ½g magn;max , g magn;min , i.e., g topo;min < g magn;min < g magn;max < g topo;max .The grayscale ranges, set this way, avoid an influence of the magnetic domain appearance on the topographic drift correction and have been fixed for the entire image gray level range during further image processing.
2) Inhomogeneous illumination conditions are eliminated by subtracting a reference image from the actual (shift-corrected) measurement images.The difference data are used in their raw format with original pixel intensity values during the complete image processing.Image processing causing a change of the individual pixel intensity values by noise filters, histogram equalization, or blurring operations is not conducted at all.
3) Even though the current shift correction code does not require topographic markers with unique structural features, the presence of topographic structures on the sample surface is indispensable (e.g., dust, defects, or topographically elevated (periodic) structures).Minor intensity differences caused by a topographic contrast are sufficient for precise 2D repositioning.However, the current drift correction code does not work for entirely flat or smooth surfaces.
Algorithm 1 presents the drift correction code, which is applied to each image of a measurement series.A detailed description of Algorithm 1 in the open-source program language Python is provided in the Supporting Information, available from the Wiley Online Library or the author.Starting with an individual recorded image X rec , this image is shifted along an axis a in a set A such the mean squared deviation (MSD, Equation ( 1)) between the reference X ref and moved recorded image X shift , defined as the cost function, is minimized.Function select next shift candidate estimates the next shifting index i based on constrained optimization by linear approximation [35] for both axes a in A and is used to shift the image X rec to form a shifted image X shift,i .
Here, ðh, jÞ represents a pixel value within the provided image and m ⋅ n represents the total number of pixels within X.This procedure is repeated until the MSD is minimal, and the algorithm returns the image X shift with compensated translational motion along a.The whole procedure is an optimization problem where the mean squared deviation as a cost function is minimized.The advantage of using this procedure is that it can be applied with subpixel accuracy, meaning that i ∈ IR.The new intensity values for subpixel shifts are calculated by spline interpolation. [36]inally, the difference image between X shift and X ref is calculated for contrast enhancement of the magnetic domains.The grayscale g m,n,norm for each pixel ðm, nÞ in the difference image has been chosen to be linear and normalized to values between 0 and 1.
Figure 1d,e presents the Kerr images of Figure 1a,b with compensated sample drift of the measurement image by 0.86 pixel along the horizontal and 0.27 pixel along the vertical axis, calculated by Algorithm 1.In comparison to Figure 1a,b, which are based on the standard image processing, Figure 1d,e shows pure domain images free of topographical contrast.
Algorithm 1 is also capable to also compensate for the sample motion in periodic 1D nanostructures with small periodicities,  while in standard image processing, this is difficult.Figure 2 shows the Kerr microscopic images of 250 nm wide magnetic nanostripes arranged in a periodic array with a periodicity of 500 nm.Even though the Ti(4 nm)/Au(60 nm)/ Co(0.8 nm)/NiO(5 nm) nanostripes exhibit a perpendicular magnetization, having a stronger Kerr contrast than in-plane magnetized layer systems, [3] nearly no magnetic domains are visible in the difference image in Figure 2a.Due to the sample moving along the horizontal axis, the stripes' edges in the reference image overlap with the magnetic domains inside the stripes in the measurement image.In Figure 2b, the sample drift in the measurement image concerning the reference image was calculated and compensated for using Algorithm 1.In the resulting difference image, the magnetic domains become visible, free from topographic artifacts.Based on the given periodicity, several minima are calculated by the MSD with one global minimum at the position of À0.14 pixel, corresponding to the initial position of the measurement image to the reference image.
Resolving magnetic domains in 250 nm wide nanostructures is close to the optical resolution limit when using white light microscopy. [37]The resolution limit can be further minimized to up 150 nm when using the blue spectral lines (404 and 435 nm) of a mercury arc high-pressure lamp. [4]So far, small domains were imaged magneto-optically in 400 nm embedded perpendicularly magnetized nanowires [38] or in 300 nm wide topographically elevated nanowires being part of a larger polygon, [39] with clear image and edge contrast.Smaller objects like in-plane magnetized vortex domain walls in 310 nm wide amorphous stripes, perpendicularly magnetized skyrmion bubble domains with varying diameters between 50 and 450 nm [40] or 50 nm wide perpendicularly magnetized nanowires [4] were captured by Kerr microscopy.However, depending on the structure width, the visibility of the domains is limited by the reflected intensity of the objects. [4]n further experiments by other authors, the Kerr signal was obtained for measuring single-pass hysteresis loops of an individual 30 nm wide cobalt wire, but besides magnetometry, domain imaging was not possible. [41]Beyond this resolution limit, Kerr microscopy has been utilized to quantitatively determine the size of crucial subresolution-sized embedded magnetic domains based on the integral-contrast method after normalization to the maximum domain contrast. [40]Considering the intensity plot shown in Figure 1c, the material contrast, coming from the nanostructure's edges, overlaps and alters the maximum domain contrast, making this method currently not feasible for elevated nanostructures.For analyzing the limitations of the presented drift correction algorithm in correlation with magnetic domains in the subresolution regime, topographically elevated Cu/IrMn/NiFe/Al nanostripes with lateral dimensions varying between 1 μm and 70 nm have been fabricated.Note two crucial experimental restrictions: 1) For imaging magnetic domains with maximum contrast, the nanostripes were designed to be not closer together than the resolution limit of 250 nm.
2) To minimize the focus drift, distorting the magnetic domain's visibility in the difference image, the reference and measurement images were captured in a short acquisition time.
The resulting Kerr difference images are shown in Figure 3.While the upper row presents the difference images based on the standard image processing, the images in the lower row are calculated using the drift correction of Algorithm 1.In the first row magnetic domains are visible in the nanostripes with widths larger than 250 nm.In these images, the sample motion is observable as artificial contrast features in the regions with no magnetization reversal.In comparison, the images in the second row do not indicate any influence of sample motion on the difference images.In the case of the 1 μm wide stripes, a moving domain with low grayscale intensity is visible, while this information is suppressed in the noncorrected images by the artificial contrast features.Starting from 250 nm, the contrast of the magnetic domains for the images in the first row decreases with decreasing stripe width until they are not visible below 125 nm.When the sample motion is compensated, the domain contrast is visible until the nanostripes have a lateral dimension of 80 nm.In the case of the 70 nm wide nanostripes, the magnetic domains are visible blurrily.Here, the contrast can be further enhanced digitally by histogram equalization.
In the last experiment, the feasibility of the drift algorithm in combination with 3D microstructures is examined.In this analysis, hemispherical tori arranged in periodic arrays with varying lattice geometry, as shown in the scanning electron micrograph (SEM) in Figure 4a, is characterized by Kerr microscopy using 50Â and 100Â objectives.[44] The Kerr magnetometry and microscopy experiments of these 3D structures are challenging because light diffraction and scattering reduce the Kerr signal.In Figure 4b-d, the magnetic domains in the Kerr difference images are distorted by the sample drift accompanied by the additional focus drift, making the evaluation of these data impossible.In Figure 4e-g, the obtained measurement images were aligned to the reference image using the presented drift algorithm.Domain images with high image contrast and free of topographical information can be captured using the 50Â objective (Figure 4e).However, when using the 100Â objective (Figure 4f,g) the focus drift prevents a perfect alignment of the reference and measurement images.

Conclusion
In summary, we have presented a drift correction algorithm correcting the sample motion in Kerr microscopic images, essential for magnetic domain imaging in magnetic 1D, 2D, and 3D micro-and nanostructures.The drift correction algorithm can be implemented using Python or other programming languages, and it leaves room for improvements by using mathematically more sophisticated cost functions instead of the MSD.Using the drift correction, magnetic domains can be captured in nanostructures with lateral dimensions up to 80 nm beyond the optical resolution limit.Compared to other drift correction algorithms based on the selection of ROIs, our drift correction algorithm works well with periodic micro-and nanostructure.This method can also be used in other scientific fields where sample motions need to be compensated for superresolution and superaccuracy studies with minimal computational demands.Future works focus on implementing the drift correction code into the live imaging during the experimental image acquisition.

Figure 1 .
Figure 1.Kerr microscopic difference images obtained by background subtraction of 2D and 1D periodic Cu/IrMn/NiFe/Al microstructures without drift correction (a,b) and with drift correction (d,e).The magnified inlet figure in (a) shows how the relative motion of the sample enhances the contrast at the structure edges, while the drift-corrected one in (d) is a pure domain image.Subfigures (c,f ) shows the intensity cross-section of the microsquare along the dotted lines in (a) and (d).

Algorithm 1 .
Drift correction for a single image.procedure ShiftCorr(X ref , X rec , AÞ ⊳A←fhor, verg for each a ∈ A do

Figure 2 .
Figure 2. Kerr microscopic difference images a) without and b) with drift correction of nominally 250 nm wide Ti/Au/Co/NiO nanostripes of 500 nm periodicity.Due to the sample motion, the magnetic domains become only visible in the drift-corrected difference image.c) Dependence of the MSD on the displacement between the reference image and the actual one along the x-axis.The global minimum at À0.14 pixels indicates a lateral drift of 7 nm, which need to be corrected.The local minimum at 6.24 pixels (corresponding to 312 nm) indicates the true periodicity of 319 nm (=312 nm þ 7 nm) of the nominally 250 nm wide parallel stripes.Note the logarithmic scale of the plotted data.
X rec , a, axis shift indexÞ