Proximity-Induced Artefacts in Magnetic Imaging with Nitrogen-Vacancy Ensembles in Diamond

Magnetic imaging with ensembles of nitrogen-vacancy (NV) centres in diamond is a recently developed technique that allows for quantitative vector field mapping. Here we uncover a source of artefacts in the measured magnetic field in situations where the magnetic sample is placed in close proximity (a few tens of nm) to the NV sensing layer. Using magnetic nanoparticles as a test sample, we find that the measured field deviates significantly from the calculated field, in shape, amplitude and even in sign. By modelling the full measurement process, we show that these discrepancies are caused by the limited measurement range of NV sensors combined with the finite spatial resolution of the optical readout. We numerically investigate the role of the stand-off distance to identify an artefact-free regime, and discuss an application to ultrathin materials. This work provides a guide to predict and mitigate proximity-induced artefacts that can arise in NV-based wide-field magnetic imaging, and also demonstrates that the sensitivity of these artefacts to the sample can make them a useful tool for magnetic characterisation.


Introduction
The nitrogen-vacancy (NV) centre in diamond is a point defect that can be used as an atomic-sized sensor by exploiting the properties of its quantum spin [1][2][3]. Among its attractive features is the variety of physical quantities it can measure (magnetic field [4,5], electric field [6], temperature [7], etc.) as well as the different modes of operation available (DC [8] or AC [9] field sensing, noise sensing [10]). In this work, we focus primarily on the NV centre operated as a DC magnetometer, which relies on measuring Zeeman shifts of the spin sublevels via optically detected magnetic resonance (ODMR) [2]. Using a single NV centre, magnetic sensitivities under 1 µT/Hz 1/2 have been demonstrated, with a probe volume of about (1 nm) 3 given by the size of the defect [11,12]. To form an image of the magnetic field produced by a sample, a commonly employed approach is to scan a single NV centre above the magnetic sample [8,[13][14][15][16]. The spatial resolution is then limited by the NV-sample distance and can be as low as 10 nm [17]. However, this approach is inherently slow and technically challenging. Another approach involves creating a quasi-two-dimensional ensemble of NV centres near the diamond surface, placing the magnetic sample directly on the diamond, and performing wide-field ODMR spectroscopy of the NV layer using a camera [18][19][20][21]. This method provides faster image acquisition, and enables full vector magnetic field mapping over relatively large fields of view (typically 100 × 100 µm 2 ), with a spatial resolution ultimately limited by the diffraction of light (≈350 nm). In the past few years, this approach has been applied to a remarkably diverse range of topics, from imaging magnetism in biological and geological samples [22][23][24], to mapping electrical currents in graphene [25]. In this work, we uncover a previously unrecognised and potentially significant source of artefacts in the measured magnetic field maps, which can occur when a ferromagnetic sample is placed in close proximity ( 200 nm) to the NV layer. We investigate this effect via a combination of experiments, using magnetic nanoparticles deposited on the diamond and numerical simulations. Ways to mitigate these artefacts, or on the contrary to use them as a resource, are discussed.

Experiment
The imaging setup considered in this work is depicted in Figure 1a. The sensing element is a diamond substrate with a near-surface layer of NV centres created at a distance d below the top surface, which hosts the magnetic sample to be imaged. The red photoluminescence (PL) emitted by the NV centres under illumination by a green laser is imaged on a camera, and modulated with a microwave source to obtain an ODMR spectrum at each imaging pixel. Figure 1b shows typical ODMR spectra acquired under conditions optimised for vector field mapping, where a small bias magnetic field B 0 (here of amplitude B 0 = 4.4 mT) is aligned such that the projections onto the four different NV orientations (corresponding to the four [111] diamond crystal axes) are non-zero and unequal, resulting in eight separated resonance lines [18,20,26]. Due to the strong crystal field, the Zeeman splitting ∆ f i of each pair of lines (i = 1 to 4, as defined in Figure 1b) is proportional, to a good approximation, to the magnetic field projection along the corresponding NV symmetry axis [2]. Therefore, it is possible to deduce the vector components of the local magnetic field in the lab frame (depicted in Figure 1a, z being normal to the diamond surface), knowing the relative orientation of the diamond crystal [18,20,25,27].  The sensing platform consists of a diamond substrate hosting a layer of near-surface nitrogen-vacancy (NV) centres. The magnetic samples to be imaged (here magnetic nanoparticles shown as yellow objects; the arrows depict their magnetisation) are placed directly on the diamond surface. The NV photoluminescence (PL) under green laser and microwave excitations is imaged on a camera to form the magnetic field image of the sample via optically detected magnetic resonance (ODMR). (b) Example ODMR spectra obtained from a single imaging pixel 500 × 500 nm 2 in size. Measurement of the four Zeeman splittings ∆ f i (i = 1 . . . 4) allows reconstruction of the local vector magnetic field. The two spectra correspond to two different locations on the sample, namely near (red) and laterally far from (black) a magnetic particle (see details in text and Figure 2c).
As a test sample, we used FeNiCr nanoparticles deposited directly on the diamond surface. The particles feature a range of sizes from 10 to several 100s of nanometers (as measured by atomic force microscopy), and are expected to form a single ferromagnetic domain. The diamond used for this work was a 30-µm-thick slab overgrown with 2 µm of 12 C-enriched diamond via chemical vapour deposition [28]. It was implanted with nitrogen ( 14 N + ) ions at a dose of 10 13 ions/cm 2 and energy 4 keV, and annealed at 1200 • C to form NV centres [29]. According to previous simulations and measurements [29][30][31][32], the NV centres are expected to be distributed up to 20 nm from the surface. We performed magnetic imaging of the magnetic nanoparticles using ODMR measurements in the same conditions as in Figure 1b, i.e., with a bias magnetic field B 0 = (0.68, −2.08, 3.80) mT. For each pixel of the camera, the ODMR spectrum was fitted with a sum of eight Lorentzian lines, from which we extracted the four splittings ∆ f i . Knowing the direction of B 0 relative to each NV axis, the magnetic field components are then simply given by where γ e = 28 GHz/T is the electron gyromagnetic ratio.

Contrast (%)
Linewidth (MHz) The results are shown in Figure 2a for a 90 × 30 µm 2 area, after subtracting the bias magnetic field B 0 . Several localised sources of magnetic field of various intensities can be seen, with local maxima up to ≈100 µT, corresponding to individual magnetic nanoparticles of different sizes. The magnetic field pattern looks relatively similar for all particles, with Figure 2b showing a zoom-in of a representative particle. The in-plane components (B x and B y ) both form a four-lobe pattern, while the out-of-plane component (B z ) has a much weaker intensity and its shape is not clearly defined. Such patterns are not consistent with the magnetic field produced by a single-domain nanoparticle-roughly equivalent to a magnetic dipole-for which all three components should be of comparable intensity regardless of the orientation of the magnetisation [33]. To gain more insight into this discrepancy, Figure 2c,d show the contrast and linewidth (defined as the full width at half maximum, FWHM) of the lowest-frequency ODMR line, respectively, for the same region as in Figure 2b. At the centre of the four-lobe magnetic field pattern, the contrast decreases from about 2.2% to 1.5%, while the linewidth increases from 7 MHz to 8 MHz. ODMR spectra taken on and off the centre (as indicated by crosses in Figure 2c) are shown in Figure 1b, and confirm that there is significant reduction in contrast from NV centres directly under the particle in addition to a slight line broadening. Additionally, the PL image ( Figure 2e) shows a decrease in intensity (~20%) underneath the particle.
We attribute these effects mainly to the broad distribution of magnetic field strengths experienced by the NVs within the readout volume, which has a lateral extension in the xy plane given by the optical resolution (≈1 µm in our setup). This is illustrated in Figure 3, which shows ODMR spectra as simulated for point-like ensembles of NV centres in the vicinity of a magnetic nanoparticle (Figure 3a), as well as the spatially averaged ODMR spectrum obtained via optical readout with a near-diffraction-limited resolution of 1 µm (Figure 3b). Despite the small average Zeeman shifts within the readout volume-100 µT corresponds to a 2.8 MHz shift, much smaller than the spacing between adjacent ODMR lines-NVs close to the source of the stray field experience larger shifts, overlapping or crossing their resonances with those from other NV orientations, or pushing them outside the probed frequency window altogether (Figure 3a). This highly asymmetric frequency dispersion causes an irreversible loss of information in the averaged ODMR (Figure 3b), leading to the observed artefacts in the reconstructed magnetic field. The purpose of the next section is to verify this interpretation through a quantitative analysis.  . Simulated ODMR spectra for NV centres at a stand-off d = 20 nm from a 50 × 50 × 50 nm 3 particle magnetised along x with M s = 10 6 A/m, assuming for simplicity a field-independent ODMR contrast of 2% (that is, spin-state mixing caused by large magnetic fields [34] is neglected). (a) shows ODMR spectra for point-like ensembles of NV centres at different locations relative to the particle (arbitrarily chosen for illustration purpose), whereas (b) shows a spatially averaged ODMR spectrum given a 1 µm optical resolution. The grey-shaded box in (b) indicates the experimentally scanned frequency window.

Nanoparticle with In-Plane Magnetisation
To reach a quantitative understanding of the apparent magnetic field distribution measured (Figure 2b), we modelled the measurement process including the NV response to magnetic fields, the optical readout, and the spectral fitting. In the first instance, we consider a cube-shaped particle of size 50 × 50 × 50 nm 3 , magnetised along x (see schematic in Figure 4a) with a saturation magnetisation M s = 10 6 A/m, which is typical of strong ferromagnets. The NV layer was assumed to be confined to a plane located at a distance d = 20 nm from the diamond surface. Figure 4a shows the actual magnetic field distribution produced by the particle at the distance d (see [14] for details on how this is calculated), in a 4 × 4 µm 2 area (200 × 200 nm 2 in inset). The magnetic field maps feature multiple spots localised near the particle, with a FWHM of ≈50 nm, which is consistent with the size of the particle (50 nm) and the stand-off distance d = 20 nm.
In our diamond, there was at least one NV centre every 30 nm (laterally) on average [21], which should be sufficient to ensure that a few NV centres are situated near the maximum of each spot. However, the optical nature of the readout prevents distinction of NV centres separated by less than the optical resolution. While the diffraction limit is about 350 nm with our high numerical aperture objective (NA = 1.3), optical aberrations mostly due to imaging through the 30-µm-thick diamond slab deteriorates the effective optical resolution [26], which is observed to be ≈1 µm in our setup. Therefore, the finite optical resolution is expected to smear out the magnetic field features that are smaller than this resolution. To illustrate this effect, Figure 4b shows the simulated magnetic field maps when convolving the actual field maps (Figure 4a) with a 2D Gaussian function with a FWHM of 1 µm. The resulting magnetic field patterns are identical in shape to the actual field, but are smeared out, such that the spatial extent of the field (FWHM) increases from ≈50 nm to ≈1 µm and the observed maximum magnetic field is decreased from ≈100 mT to ≈80 µT. The simple Gaussian smoothing picture assumes a perfectly linear response of the NV sensors regardless of the magnetic field, neglecting the NV's finite measurement range and other effects. One limitation is spin-state mixing due to fields larger than~20 mT, which causes the ODMR contrast to vanish unless the field is exactly aligned with the NV axis [34]. Consequently, ODMR cannot be detected from the NVs located underneath the particle where the field largely exceeds the threshold (see Figure 4a). Incidentally, the vanishing ODMR contrast is also accompanied by a reduction in PL intensity [34], which explains the dark spot observed in Figure 2e, although PL quenching due to resonant energy transfer to the metallic particle [35] may contribute as well. Moreover, even fields under~20 mT-which corresponds to~500 MHz Zeeman shifts-prove challenging to measure, especially because they can assume any direction relative to the NV axes. In the vector magnetometry scheme employed here, the maximum sample field that can be measured-that is, the measurement range-is ≈0.5 mT (i.e., ≈15 MHz shifts), corresponding to half the frequency spacing between two neighbouring ODMR lines (see Figure 1b). Larger fields would cause the lines to overlap or cross (see Figure 3a), preventing the vector reconstruction. We note that by performing four projective measurements with the bias field aligned along each NV axis sequentially [22,26], vector magnetometry could in principle be achieved over an improved range, at the expense of a significant technical overhead and a reduced sensitivity (due to the larger frequency span and multiple measurements required). With B 0 = 20 mT, for instance, magnetic fields of amplitude up to~10 mT can be measured, limited by spin mixing effects [34], which is still an order of magnitude lower than required to cover the full distribution calculated in Figure 4a. We also note that super-resolution optical imaging techniques can be used to overcome the diffraction limit [36], which in principle could allow sequential readout of every single NV centre even at the current density of one NV every 30 nm. This would enable a slightly increased range (~20 mT) since no large bias field is needed, but at the cost of an enormous reduction in sensitivity because of the inherently slow acquisition rate of the technique.
As a result of this limited range, only the NV centres experiencing less than ≈0.5 mT contribute meaningfully to the ODMR spectrum within a given pixel using this approach. The other NVs are either outside the frequency window, or they induce additional artefacts due to line overlapping or crossing. To account for these effects, we modelled the problem as follows: (i) for each pixel of the simulated image (5 × 5 nm 2 ), we add the bias field to the actual field generated by the particle (Figure 4a), calculate the positions of the ODMR resonances, and generate an ODMR spectrum; (ii) we apply a spatial convolution with a 2D Gaussian function (1 µm FWHM) to the ODMR maps generated in (i); (iii) for each pixel of the smoothed ODMR maps generated in (ii), we fit the ODMR spectrum with eight Lorentzian lines, exactly as done to the experimental data; (iv) finally, for each pixel we convert the ODMR splittings into the magnetic field components and subtract the bias field. The result of this process is shown in Figure 4c and is markedly different from the actual field after smoothing (Figure 4b).
In particular, the B x component exhibits a very different distribution, close to the four-lobe pattern observed experimentally. The overall shape of the other components is not significantly changed, but the field intensity shows a 1.7-fold reduction in B y , and more importantly a 25-fold reduction in B z . These differences can be understood by looking at the actual field ( Figure 4a) and removing the regions where the field is above the threshold of 0.5 mT, which affects mostly the central lobe in B x , as well as the two lobes in B z . As can be seen by comparing Figure 2b with Figure 4c, our model qualitatively reproduces the main features of the experiments, i.e., the four-lobe pattern in B x , and the strongly suppressed B z component. The simulation also shows good agreement with experiment for the ODMR contrast ( Figure 4d) and linewidth (Figure 4e) near the particle. We stress that we did not attempt to reach a quantitative agreement between simulation and experiment as there are many unknown parameters, including the exact shape and size of the particle, its magnetisation, and the exact positions of each NV centre (laterally and relative to the surface).

Distance Dependence
We have shown that the limited measurement range of the NV sensors can induce major artefacts when small magnetic objects are located very close (20 nm) to the NV layer. To avoid these artefacts, the stand-off distance between the NV layer and the target sample can be increased, for instance at d = 500 nm the actual field from the nanoparticle is only 86 µT at the maximum. This can be achieved either by adding a non-magnetic spacer layer between the diamond and the sample, or by creating the NV centres deeper into the diamond. To illustrate this, we simulated the same situation as in Figure 4, but using various distances d from 20 nm up to 1 µm (Figure 5a). As the distance increases, the apparent magnetic field (as would be measured with NVs) becomes closer in shape to the actual field generated by the particle, i.e., the B x component changes from being mostly positive to mostly negative, and the B z component is recovered, with a cross-over between d = 200 and 500 nm. For the "artefact-free" B y , the field amplitude barely changes up to 200 nm, because this is still below the optical resolution (1 µm in these simulations). For distances above 500 nm, the field amplitude decreases because the smoothing effect becomes negligible and the field maximum then simply decays as 1/d 3 . We conclude that there is an optimum distance for strong ferromagnetic materials, typically between 200 and 500 nm, for which the artefacts are minimised and the field amplitude maximised. For weaker ferromagnetic materials or smaller particles, artefact-free imaging can be achieved at smaller distances, however, because of averaging from the near-diffraction-limited spot, decreasing d below~200 nm will not provide any additional spatial information. In practice, the NV centres are typically created at a range of distances from the surface, i.e., d is not a constant. To illustrate this, we simulated the case where the NVs are uniformly distributed between d = 200 nm and 500 nm, which represents a good compromise, as discussed above (Figure 5b). Such a distribution of depths can be readily achieved via nitrogen-doped CVD growth of diamond [37], which has the added benefit of forming NVs with improved magnetic sensitivities compared to ion implantation [29]. We also simulated the range d = 5-20 nm (data not shown), which is representative of the depth distributions obtained from low energy (4 keV in our experiments) nitrogen ion implantation, showing no visible differences with the d = 20 nm case. This validates the 2D NV layer approximation used in our simulations.

Nanoparticle with Out-of-Plane Magnetisation
So far, we have examined the case of a magnetic particle with a magnetisation parallel to the diamond surface (along x). We now consider a particle magnetised perpendicularly to the surface (along z), with the same parameters as in Figure 4 otherwise. Figure 6a-c show the actual, smoothed and full-simulation fields as described previously, for this situation. Here, the strongest actual field is in the B z component, which reaches over 200 mT right under the particle (Figure 6a). When applying a simple Gaussian smoothing with a 1 µm FWHM (Figure 6b), the field patterns are simply smeared out, and the amplitude is decreased by three orders of magnitude, down to a maximum of ≈170 µT. Including the limited measurement range of the NV sensors, however, gives a very different result (Figure 6c). The planar components B x and B y are strongly suppressed (a 15-fold reduction relative to the simple smoothing case), and strikingly the sign of the B z component is reversed. Similar to the in-plane magnetisation case, the actual field is progressively recovered as d is increased, as shown in Figure 6d,e. Interestingly, the B z component is nearly vanishing at a cross-over distance d = 300 nm (Figure 6d). Figure 6 thus shows that proximity-induced artefacts can occur regardless of the direction of magnetisation in the sample, but the nature of the artefacts depends on the direction in a characteristic manner. In fact, the strongly suppressed B z component observed in our experiments (see Figure 2a) is evidence that the magnetic particles are magnetized in the plane, while perpendicularly magnetised particles would show strongly suppressed planar components instead. In-plane magnetisation is expected for non-spherical nanoparticles deposited on a substrate, due to mechanical stability-the particles are very likely to sit on their long axis-and shape-induced magnetic anisotropy-the magnetisation preferentially aligns along the long axis.

Discussion
Upon examination of Figures 5 and 6, there seems to be no advantage from short stand-off distances, such as 20 nm, when probing ferromagnetic materials using a near-diffraction-limited magnetometer. Especially, because the apparent (spatially averaged) magnetic field strength does not increase below d ≈ 200 nm, the acquisition time needed to reach a specified signal-to-noise ratio remains the same. While this is true for the measurement of static magnetic fields via ODMR, other sensing modes allowed by NVs do not suffer from proximity artefacts in most situations, and on the contrary benefit greatly from a minimised stand-off distance. For instance, spectroscopic imaging of spins in samples prepared on the diamond was demonstrated via several techniques using NV ensembles [38][39][40], where the signal strength falls off as 1/d 3 for an extended object, which typically requires d to be no more than ≈20 nm. Therefore, layers of very-near-surface NVs remain the substrate of choice whenever multimodal imaging is desirable and hence accounting for ODMR-based magnetic imaging artefacts is essential.
To illustrate this point, we consider a potential application of NV sensing to ultrathin materials, i.e., with a thickness of one or a few atomic layers. In particular, an intriguing prospect is the investigation of ferromagnetism in such systems, which may be intrinsic [41,42] or arise from defects or edge states [43][44][45]. A challenge in any study of ultrathin materials is the difficulty to locate them, since they usually exhibit very low optical contrast. NV sensors offer several solutions to this problem, for instance via nuclear magnetic resonance imaging [39,46] or by using fluorescence resonance energy transfer for materials with suitable band structure, as previously demonstrated with graphene [25,35]. In both cases, a stand-off of order 10-20 nm at most is required to provide sufficient contrast in localising ultrathin flakes prepared on the diamond sensor, which in turn may induce artefacts when performing static magnetic imaging.
This situation is illustrated in Figure 7, which shows magnetic field calculations for a 500 × 500 × 1 nm 3 flake magnetized in the plane (panels a-c) or out of plane (d-f). For a strong ferromagnet (M s = 10 6 A/m) the field exhibits maxima near 10 mT (Figure 7a,d). This is an order of magnitude less than in the case of the nanoparticle even though the total magnetic moment is similar in both cases, simply because the source of the field is less concentrated laterally. However, the field still largely exceeds the NV range under our measurement conditions and therefore leads to artefacts. In particular, compared to the nanoparticle case there is an even stronger suppression of the perpendicular component (planar components) for the in-plane (out-of-plane) magnetised flake (Figure 7b,e, respectively). It is interesting to note that because the artefacts are sensitive to the local values of the actual magnetic field, they provide a pathway to distinguish different shapes and sizes of the magnetic object-compare, e.g., Figure 4c (cubic particle) with Figure 7b (thin flake)-while they would be essentially indistinguishable otherwise. As expected, the correct field patterns are recovered if the ferromagnet is sufficiently weak, for instance at M s = 10 4 A/m the actual field is 97 µT at the maximum, well within the measurement range. The resulting apparent field reaches ≈1.6 µT for a flake magnetized in the plane (Figure 7c) and ≈2.9 µT for a flake magnetized out of the plane (Figure 7f). Such weak magnetic fields are measurable using existing NV microscopes (see [26], see also the noise level in Figure 2b), suggesting that NV-based magnetic imaging is a viable tool to investigate ferromagnetism in ultrathin materials, such as elucidating the origin of ferromagnetism in exfoliated layered transition metal dichalcogenides [44].

Conclusions
We showed experimentally and numerically that vector magnetic field mapping with ensembles of NV sensors can be prone to artefacts when applied to strongly ferromagnetic objects in close proximity (<200 nm) to the NV layer. Our modelling provides insight into the origin of these artefacts and indicates that they can be mitigated by choosing an appropriate stand-off distance, with 500 nm being a typical optimum to also maximise the signal strength. On the other hand, the nature of these artefacts is characteristic of the direction of magnetisation, and also depends on the geometry of the magnetic object, making it a potentially useful tool for magnetic characterisation. An example application is the study of ferromagnetism in ultrathin materials, for which a small stand-off distance is desirable as it allows localisation via multimodal imaging. This work will help researchers to choose the appropriate stand-off regime in future NV-based wide-field magnetic imaging experiments, either to minimise the proximity-induced artefacts or to exploit them.