Aberration control in quantitative widefield quantum microscopy
Abstract
Widefield quantum microscopy based on nitrogen-vacancy (NV) centres in diamond has emerged as a powerful technique for quantitative mapping of magnetic fields with a sub-micron resolution. However, the accuracy of the technique has not been characterised in detail so far. Here we show that optical aberrations in the imaging system may cause large systematic errors in the measured quantity beyond trivial blurring. We introduce a simple theoretical framework to model these effects, which extends the concept of a point spread function to the domain of spectral imaging. Using this model, the magnetic field imaging of test magnetic samples is simulated under various scenarios, and the resulting errors quantified. We then apply the model to previously published data, show that apparent magnetic anomalies can be explained by the presence of optical aberrations, and demonstrate a post-processing technique to retrieve the source quantity with improved accuracy. This work presents a guide to predict and mitigate aberration induced artefacts in quantitative NV-based widefield imaging and in spectral imaging more generally.
I Introduction
A broad class of quantum sensors relies on the optical readout of a property of an atomic or atom-like system, such as the transition frequency between two discrete energy levels or the quantum phase of a superposition of states.[1] A prime example of such a quantum sensor is the nitrogen-vacancy (NV) centre in diamond, whose electron spin can be readout optically allowing the measurement of its spin resonance, spin lifetime and spin coherence. These quantities in turn can be used to extract quantitative information about the local environment, such as the static magnetic or electric field, or the spectral density of magnetic fluctuations.[2, 3] A strength of these quantum sensors is their accuracy, which derives from the fact that the quantum property being measured has a well defined relationship with the quantity of interest. For instance, under appropriate conditions the frequency splitting in the electron spin resonance spectrum of the NV centre is given by where GHz T-1 is the NV gyromagnetic ratio and is the magnetic field projection along the NV symmetry axis.[4, 2] As the constant has been precisely measured and is expected to be robust against a wide range of perturbations,[4, 5] the NV centre is commonly used as an absolute, calibration-free magnetometer (measuring the projection ).
However, when quantum sensors are employed to image spatial variations of a measurand, additional complexities in the readout system may cause systematic errors in the apparent value of the measurand across the image. In particular, widefield optical readout of an array of quantum sensors is a convenient and rapid way to perform imaging with a sub-micrometer resolution (limited by optical diffraction) over a large field of view.[6, 7, 8] However, the widefield platform’s parallel nature makes it prone to cross-talks due to optical aberrations, raising the question of the accuracy of the supposedly local measurement. Here we define aberration as the departure from an ideal imaging system – which maps a point in the object plane (the array of quantum sensors) onto a single point in the image plane (the camera sensor) – causing a spread of the light in the image plane, characterised by the point spread function (PSF).[9] Sources of aberrations may include optical diffraction, the non-ideal focusing properties of the lenses employed, light scattering along the imaging path, and experimental imperfections such as defocusing and lateral drifts during data collection. In this paper, we analyse the impact of optical aberrations on the accuracy of widefield quantum microscopy, by introducing a simple model that extends the concept of PSF to the case of spectral imaging. Specifically, we consider the type of spectral imaging where the quantity of interest resides in the spectral peak positions, as is the case with NV-based static magnetic imaging. We note, however, that our model can be easily extended to other forms of spectral imaging including outside quantum microscopy, e.g. fluorescence lifetime imaging.[10, 11, 12, 13]

Widefield imaging of arrays of NV centres in diamond, also known as quantum diamond microscopy,[7, 8] has been increasingly used for the rapid, quantitative mapping of magnetic fields and other quantities (electric field[14], strain[15, 16]), especially for the characterisation of external samples such as magnetic materials[17, 18, 19, 20, 21, 22, 23] or current-carrying electronic devices[24, 25, 26, 27, 28, 29] placed in close proximity to the diamond. For these applications, the accuracy of the magnetic field measurements is critical as it is used to estimate materials parameters or analyse transport phenomena in detail. In particular, our study is motivated by two recent observations. First, a study by Tetienne et al. has uncovered an apparent anomaly in the magnetic field generated by current-carrying metallic wires fabricated on the diamond sensor.[30] This apparent anomaly, as we will show, can be resolved via the consideration of optical aberrations. Second, Fu et al. have observed the presence of background NV photoluminescence (PL) in a quantitative study of magnetic rock samples, and applied a correction to the apparent magnetic field (they multiplied by a factor of 2) to account for this background contribution.[31] We will present a simple model to systematically predict the transformation required to correct aberrant raw data in a range of scenarios.
The paper is organised as follows. We first present the general theoretical framework for accounting for optical aberrations in spectral imaging, and specify it to the case of spectral peak finding (Sec. II). We then use the model to simulate the magnetic field imaging of two test systems, a magnetic material and a current-carrying wire, under various scenarios of optical aberrations and illumination conditions (Sec. III). The resulting errors and imaging artefacts will be discussed qualitatively and characterised quantitatively. We will then demonstrate a post-processing technique utilizing basic deconvolution algorithms to retrieve the source quantity with improved accuracy (Sec. IV). Finally, we will apply the model to experimental data reported by Tetienne et al.[30] and resolve the apparent magnetic anomaly (Sec. V). This work will serve as a guide to correctly analyse data from quantitative widefield imaging based on NV centres or similar quantum sensors. It may also be relevant to similar peak finding problems in spectral imaging outside quantum microscopy, and can be extended to other forms of spectral imaging such as lifetime imaging.
II Theoretical framework
II.1 General problem
The principle of spectral imaging is depicted in Fig. 1(a). In the case of widefield imaging, the data cube is acquired by optically recording images [spatial dimensions ] for various values of the spectral variable . A spectrum can then be formed at every pixel and analysed to extract an estimate of a quantity of interest, where is the estimator [Fig. 1(b)].
The optical response of the imaging system is modelled using the concept of a PSF, defined as the system’s impulse response . If is the true optical intensity map of the object, for instance the PL emission map of an array of NV centres, then the intensity map recorded by the imaging system for each is a convolution with the PSF,
(1) |
where is the convolution operator. We will use and to refer to true and apparent intensity maps, respectively. Note that throughout the paper continuous integrals are used for generality rather than the discrete sums required in practice.
One approach to account for the optical response of the imaging system is to deconvolve Eq. 1 for at each value (i.e. correcting the whole data cube), before attempting to extract . However, this process is not only computationally intensive, but the PSF is often a priori unknown. In widefield NV experiments the PSF may be especially difficult to measure as optical aberrations will vary between samples and cannot be easily characterised in situ. Therefore, it is important to develop an understanding of how a non-ideal PSF affects the estimate based on the uncorrected (blurred) data, and develop strategies to efficiently predict and correct errors.
When the experimentally determined data cube is analysed by applying the estimator pixel by pixel, a spatial map of the estimate is obtained,
(2) |
where is the forward transformation we seek to determine [Fig. 1(c)]. In general, this transformation from the true estimate to the apparent estimate cannot be cast in terms of a convolution with a PSF – not even a modified PSF.
The goal of this paper is to examine this transformation in scenarios relevant to quantum microscopy. Specifically, we will consider the important case of peak finding, when the estimator is chosen to determine the position of a peak in the spectrum. This position may be, for instance, the resonance frequency of an electron spin transition of the NV centre in the magnetic resonance spectrum, which is then converted e.g. to a magnetic field (often after two or more resonance frequencies are determined, and using the expression for the Zeeman splitting ). However, we stress that the presented framework can be applied (at least numerically) to analyse any estimator, including any arbitrary data fitting algorithm. For example, when the spectral variable corresponds to a time delay () and the optical intensity decays over time according to , a common quantity of interest is the characteristic time of the decay, . In this case, a common estimator is the value of the best fit to the data using the assumed exponential decay function. This scenario applies, for instance, to fluorescence lifetime imaging,[12, 13] or with NV centres to spin lifetime (relaxometry) and decoherence imaging.[10, 11]
II.2 Peak finding
We now derive an explicit expression for the transformation in the case where the quantity of interest is the position of a peak in the spectrum. While is typically estimated through fitting the spectrum to an appropriate model (e.g. a Gaussian or Lorentzian function), for our purpose it is convenient to consider the simplest possible estimator suitable for peak finding, namely we define as the expectation value of the variable with probability distribution ,
(3) |
In the case of a spectrum with zero baseline and a symmetric lineshape as depicted in Fig. 1(b), this estimator yields the central position of the peak. Thus, it constitutes a good model of peak fitting algorithms that are typically used to analyse more complex spectra (e.g. with a non-zero or even non-constant baseline, or multiple partially overlapping peaks).
Applying the estimator Eq. 3 to the experimentally determined data cube , Eq. 2 becomes
(4) |
We can further simplify the expression by introducing the mean optical intensity across the spectrum,
(5) |
where are the bounds of the integral, with a similar definition for the mean intensity of the apparent spectrum, . This definition gives
(6) |
As we can see, in general the apparent map is not simply a convolution of with the optical system’s PSF, because of the factor . However, we can re-write Eq. 6 as a convolution of the product ,
(7) |
such that the true estimate can be recovered with a simple operation on the raw data,
(8) |
where represents a deconvolution operation. Equation 8 expresses the inverse transformation to be applied to the normally processed data to account for optical aberrations [Fig. 1(c)]. This procedure is vastly simplified compared with the brute force approach of deconvolving the entire data cube before processing (2 deconvolutions instead of hundreds typically). We will now examine a few limit cases for the PSF and the mean intensity map .
II.3 Limit cases
First, if the optical imaging system is ideal, i.e. where is the Dirac delta function, then the apparent estimate obviously matches the true one at every pixel, .
In practice, the PSF always has a finite width corresponding to at least the optical diffraction limit. An interesting limit case is then found when the optical intensity is completely uniform across the field of view, . In this case, Eq. 6 becomes a trivial convolution, . That is, the apparent estimate is simply a blurred version of the true estimate in the same way every individual optical image is blurred.
A particular model of a PSF relevant to widefield NV experiments deserves special consideration. Indeed, it has been observed that the PL image of an NV layer as recorded by a camera contains not only an image of the object but also a background contribution.[31] This background is believed to be the result of reflections of the light emitted by the NVs on the surfaces of the diamond slab, forming secondary defocused images on the camera sensor.[32] More generally, any form of light scattering will add a background contribution if it reaches the camera sensor. This background light still contains spectral information but is now delocalised across many pixels of the recorded image. In the case of a full delocalisation on the scale of the camera field of view, we can write the PSF as
(9) |
where the primary image is modelled as an ideal (delta function) response for simplicity, and is the fraction of background contribution ( is the area of the field of view, ensuring that is normalised to unity). We then obtain
(10) |
where
(11) |
is the mean value of the estimate over the field of view. In imaging experiments, we are often interested in measuring small local changes of a quantity relative to a uniform background value . This difference is then
(12) | |||||
(13) |
Thus, any local change will appear reduced by the fraction . In this scenario, the correction to apply to the processed data is trivial, although precise determination of the fraction is critical to the resulting accuracy. In the magnetic imaging experiments of Fu et al.,[31] the authors estimated a background contribution of by an independent optical characterisation, and corrected their apparent magnetic field maps by inverting Eq. 12, i.e. .
In general, however, the PSF will likely be less trivial than the simple case examined above. Moreover, the uniform intensity assumption is rarely valid because of spatial inhomogeneities in the emitting object or in the illumination conditions. For instance, in widefield NV experiments the laser illumination spot has a finite size and suffer from inhomogeneities (including due to interference effects), and the light collected from the NV layer is also not uniform either due to intrinsic spatial variations in NV properties or density, or due to the presence of a sample external to the diamond that modulates the optical emission or collection. In Sec. III, we numerically simulate some of these scenarios.
III Simulating aberrant magnetic images

To illustrate the impact optical aberrations have both qualitatively (imaging artefacts) and quantitatively (systematic errors), we calculate the apparent using Eq. 6 under various conditions for two typical test problems: imaging of the stray magnetic field from a micromagnet, and imaging of the Ørsted magnetic field from an electric current.
III.1 Stray field imaging of a micromagnet
We first simulate magnetic field imaging of a micromagnet, as would be performed using arrays of NV centres.[17, 18, 19, 20, 21, 22, 23] The simulated micromagnet is a flake-like structure (thickness nm, lateral size m) with uniform out-of-plane magnetisation (resulting in an areal magnetization mA) placed near the array of quantum sensors (standoff nm) [Fig. 2(a)]. The stray magnetic field produced by the flake is measured in the plane of the sensor, projected onto a given axis; here we consider the projection, denoted as . The true magnetic field map for the simulated flake is shown in Fig. 2(b).
We now compute via Eq. 6 the apparent field map, , for various assumptions for the PSF and the mean optical intensity map [previously denoted as , but for simplicity we will drop the subscript in the rest of the paper]. The results are presented in Fig. 2(c) in the form of a table, where each column corresponds to a different PSF, and each row corresponds to a different intensity pattern. Each element in the table shows the resultant apparent field map , and a line cut comparison with the ground truth , for the associated PSF and intensity pattern.
The optical intensity map recorded by the camera sensor is the result of the illumination pattern (how much light the quantum sensors receive in the first place), the optical response of the quantum sensors (how much light they re-emit in the form of PL), and the collection efficiency (how much of the emitted PL makes it to the camera sensor). The measured intensity map will therefore depend on many factors including the profile of the excitation beam, the homogeneity of the quantum sensing array, and the optical properties of the magnetic sample. The latter is particularly important with metallic samples, which may locally quench the PL emission or enhance the PL collection depending on the standoff distance.[30] Here we consider three distinct patterns displayed in the far left column of Fig. 2(c): (i) a spatially uniform intensity (top row); (ii) a Gaussian profile, at roughly the width of the sample (100 m) (middle row); and (iii) the same Gaussian profile modulated with a random chessboard pattern at relative intensity of 0.1, 0.8 and 1.0 (bottom row). Case (i) represents the ideal imaging situation, (ii) the more common situation where the sensing array is illuminated by a finite-size but smooth laser beam, and (iii) a worst-case scenario where the optical intensity varies on a scale comparable to that of the magnetic field variations, due e.g. to laser beam imperfections, inhomogeneities in the sensing array, or quenching by surface contaminants. For the PSF, we model a few important examples, displayed in the far top row of Fig. 2(c), namely Gaussian and Lorentzian profiles with full width at half maximum (FWHM) of 300 nm or m, as well as a Gaussian profile with a vertical offset similar to the limit case expressed by Eq. 9. The 300 nm Gaussian PSF roughly corresponds to the diffraction limit with a high numerical aperture (NA) objective lens. The Lorentzian and wider Gaussian profiles thus represent different scenarios of aberrations beyond the diffraction limit.
Examining the results in Fig. 2(c), we see that a near-diffraction-limited Gaussian response (column 1) produces an apparent field quantitatively very similar to the true field, with only a very minor blurring, regardless of the optical intensity pattern. A wider Gaussian PSF response (column 2) shows more blurring, but no anomalous quantitative features for any of the intensity patterns. Adding a global offset to the optical signal of to the PSF of column 1 (column 3) produces a field with sharp features (i.e. no additional blurring) of a reduced magnitude. Crucially, the field magnitude reduction depends on the optical intensity pattern. For instance, the Gaussian illumination leads to a smaller apparent reduction compared to uniform illumination (31% vs 48% reduction, relative to the case). We see this change because in the uniform illumination case there is a larger contribution from regions far from the flake which experience no magnetic field. Finite-size (Gaussian) illumination helps to restrict those long-range contributions but also leads to more subtle errors, for instance the apparent field becomes slightly positive outside the flake (as evidenced by the light red background in the image) when the true field has a negative tail there; this is because the apparent field outside the flake where the true PL is low is dominated by contributions from inside the flake where the PL is high. We note that means that 50% of the PL collected from a given quantum sensor is delocalised across the entire field of view, which models the situation in Ref. 31, highlighting the importance of precise characterisation of both the PSF and optical intensity pattern. The effect of the global offset on the PSF is more visually apparent for the chessboard PL pattern, where local dark PL regions appear blocky in the field map with a reduced magnitude. Again, this difference is because the weight of the local contribution (carrying information about the true local field) is being modulated, locally changing the apparent net field. The Lorentzian PSF (columns 4 and 5) leads to an apparent magnetic field that displays the blocky anomalous measurement of column 3 for a chessboard PL pattern, see Fig. 2(d) for a magnified image. Additionally, a significant blurring and reduction in apparent field strength are observed for each PL pattern. This reduction is seen even with FWHM nm due to the wide tails of the Lorentzian profile which dramatically increase the effect of remote contributions. Taking the uniform PL case, we find an apparent reduction in maximum field strength (relative to the true field) of 91% for the 300-nm Lorentzian PSF, compared to only 25% for the 300-nm Gaussian. With the 300-nm Lorentzian PSF, the apparent field is also very sensitive to the PL pattern unlike with the Gaussian PSF, with a reduction of up to 97% (relative to true field) in the most quenched region of the chessboard PL pattern. These observations highlight again the importance of precisely accounting for both the PSF and the optical intensity pattern.
We note that the blocky imaging artefacts appear where there is minimal local optical signal (squares at intensity of 0.1 relative to the maximum of 1.0) and thus the tails from neighbouring regions dominate, whereas the areas of moderate relative signal (squares at 0.8) report the field more faithfully. Aberrant measurements can thus be recognised by features in a measurand at locations of low PL intensity. In practice, however, rather than a random PL modulation pattern as simulated here, PL modulations are often correlated with the true magnetic field distribution itself (e.g. due to PL quenching from the magnetic sample), which means artefacts may be difficult to visually recognise. Systematically applying the inverse transformation to the apparent field will therefore be an important step for accurate quantitative analysis of widefield measurements (see Sec. IV).
III.2 Ørsted field imaging of a charge current

Magnetic field imaging is also useful to analyse current distributions via the Ørsted magnetic field they produce.[26, 28, 25, 27] In the context of imaging artefacts, a difference with the case studied above is that the field from a current is typically not confined within the field of view and so edge effects become important, whereas when imaging a magnetic material one often adjusts the field of view in order to fully capture the stray field.
To simulate this scenario, we consider the current in a flat wire (width m) parallel to the diamond surface (standoff nm) carrying a current density of A/m [Fig. 3(a)]. The assumed PL intensity pattern is again a Gaussian-chessboard [Fig. 3(b)], and we focus on the and components of the Ørsted field. The true field maps and are shown in Fig. 3(c,d). The worst-case PSF from the previous section, a wide (FWHM) Lorentzian, is utilized to calculate the apparent PL intensity and field [Fig. 3(e-g)] according to Eq. 6. Both apparent field components have strong suppression of the local field where there is less local optical signal, as can be quantified by the profiles in Fig. 3(h). Clearly, the apparent field is not simply a blurred version of the true field, for instance is reduced by 53% in the middle of the wire in this region of reduced PL despite the true being uniform over the 40-m width of the wire; highlighting again the far-reaching effect of the Lorentzian tails from neighbouring regions.
Near the borders of the image, the PL intensity is very small due to the Gaussian illumination spot. As a result, the apparent field near the top and bottom borders is reduced compared to the centre of the image, despite the true Ørsted field being uniform along the wire. Such a correlation between apparent field and illumination pattern can serve as an indicator of aberrant measurements. While this indicator is naturally present when imaging current distributions, for magnetic materials it is possible to move the illumination spot in such a way that the magnetic sample is located in the tail of the illumination spot, revealing more clearly the presence or not of a correlation.
IV Controlling for aberration in simulated magnetic images


Having described the forward problem (), we now turn to the required backward transform (; Eq. 8) to correct for these aberrations, which is a deconvolution problem. We will test the process on the most anomalous images from the previous section, the images of a micromagnet (Sec. IV.1) and a wire carrying current (Sec. IV.2), under a 1 m (FWHM) Lorentzian PSF with a Gaussian-chessboard emission pattern.
Deconvolution (or image restoration) is a difficult problem in general and an entire discipline in itself. The goal of this section is thus not to optimize the inversion algorithm in full generality, which should be done for each individual data set once the conditions (e.g. PSF, noise) are known. Instead we aim to validate the feasibility of such a process and identify the key challenges. To this end we restrict ourselves to only the most basic methods: Wiener-Hunt deconvolution[33] (non-iterative, denoted ‘W’), and Richardson-Lucy deconvolution[34, 35] (iterative, denoted ‘R’), both implemented by scikit-image in Python.[36] Each method requires the choice of a suitable regularization parameter; for the simulated data sets shown here we used a balance of unity (Wiener-Hunt), and 15 iterations (Richardson-Lucy). Additionally, our backward problem actually requires two deconvolution operations (see Eq. 8), one directly on the PL map and another on the field-PL product . We find that using the Richardson-Lucy method on the former and the Wiener-Hunt method for the latter produces the best results (denoted ‘R&W’) for simulated data, as will be detailed below. In contrast, we performed a trial optimisation on the experimental measurements in Sec. V and decided upon the Richardson-Lucy method with 75 iterations.
The quantitative nature of widefield NV microscopy is often utilized to reconstruct source quantities, such as magnetization or charge current density.[37, 8] We will thus use both the stray magnetic field and the source quantity to estimate our aberration correction fidelity. For brevity we will not detail the reconstruction process here (which follows the Fourier inversion method in Ref. 37), referring to the operation with the symbol . The operation will transform the magnetic field ( or ) into a source magnetization and a current density for Sec. IV.1 and Sec. IV.2, respectively.
IV.1 Aberration correction: Micromagnet simulation
Our first test simulation is the micromagnet as presented in Fig. 2(a). As we have seen in the previous section, the apparent magnetic field map imaged through an aberrative optical system [Fig. 4(a)] is distinctly anomalous where the local PL emission is reduced, alongside a globally reduced magnitude. Applying the deconvolution operation (R&W method) now [Fig. 4(b)], we see a decreased field modulation under low PL squares as well as restored field strengths at the edge of the flake. The magnetization reconstructions are shown in Fig. 4(c,d) for Fig. 4(a,b) respectively. The magnetization map after the aberration correction has been applied [Fig. 4(d)] is noticeably larger in magnitude, and with sharper edges. To quantify the fidelity of the backward process we take line cuts [Fig. 4(e)] across the flake edge and under a low PL square, for both the magnetic field and magnetization maps. The Wiener-Hunt method clearly overestimates both the field and the magnetization (green line), while the Richardson-Lucy method appears poorly regulated and is wildly different from the aberration-free profile (black dotted line). When the two methods are combined however (red line), both the magnetization and stray field match well, except at the highest spatial frequencies (i.e. there is still significant blurring in these highly quenched regions). We note that the quantity of interest in such measurements is the areal magnetization inside the flake, where the aberration correction fidelity is relatively good, and sharpness issues at the edge of the flake (or at PL intensity steps) are generally of less importance. Compared with a reconstruction directly from the aberrant data set (grey dashed line), the combined R&W method is an order of magnitude improvement in relative error percentage. Note also that the correction to the magnetization map is roughly a factor of two on the apparent image, aligning with that used in Fu et al.[31]. The aberration control fidelity across each magnetic field image for each method can be quantified via histograms of their relative error [Fig. 4(f)]. A similar histogram for the relative error in the magnetization is qualitatively very similar (not shown). If no deconvolution method is employed [black line] the relative error is grouped about 50% – again agreeing with Fu et al.[31]. The Wiener-Hunt method (green line) shifts the weight of the histogram to larger errors, whilst the Richardson-Lucy algorithm (orange line) provides a larger peak at errors below 25%, with the side effect of a noticeable increase at errors over 100%. The combined R&W method in comparison is much more accurate, shifting the weight of the histogram to a large peak below 10%, whilst also reducing the weight at the larger errors.
IV.2 Aberration correction: Charge current simulation
Aberration-induced artefacts can be of drastically different magnitudes for different components of a vector magnetic field image, as can be seen in Fig. 3(h). To analyse the influence of this dependence we will now investigate the fidelity of the backward operation on the simulated current density data set, which has more in-plane signal than the micromagnet data set. We again utilize a 1 m (FWHM) Lorentzian PSF and a Gaussian-chessboard emission pattern as in Fig. 3, however we now reconstruct the source current density, first without a deconvolution operation [Fig. 5(a)]. A clear modulation of the current density can be seen, as well as a decrease in global current density magnitude (30%). We can insert a R&W-deconvolution operation [Fig. 5(b)] which is far more accurate, albeit without completely homogenizing the background. The same process, but using the in-plane component [Fig. 5(c)] yields an even more anomalous background and clear modulations of the current density in the wire. Line cuts across the wire [Fig. 5(d)] highlight that whilst reconstruction from is more accurate away from the emission-quenched regions, these aberrant regions are more complex to correct, and thus (appropriately corrected) is a preferred reconstruction pathway – contrary to the aberration-free case where using the in-plane field is advantageous.[37] Numeric instability or other forms of inaccuracy at sharp edges appear to dominate the errors, but over the centre of the wire the R and R&W methods are largely accurate within 10%. Counter to the micromagnet case [Fig. 4(d)] the R and R&W methods have minimal differences. This similarity is replicated in a relative error histogram [Fig. 5(e)], where both the R and R&W methods clearly outperform the deconvolution-free and W methods.
IV.3 Discussion
We have explored a few deconvolution methods here, but undoubtedly there are other methods that will be better in some or all scenarios. For example, we determined the Richardson-Lucy method (75 iterations) was the most stable for the experimental measurements in the next section (Figs. 6,7). Further work is required to investigate other approaches to improve the fidelity of this procedure, key to accurate quantitative imaging. We highlight that our work did not simulate the stability of these algorithms to noise in the data, which is an important challenge to the accuracy of aberration-corrected quantitative widefield NV magnetometry.
V Resolving the current anomaly

We now use our model to re-analyse previously published data from Tetienne et al.[30] that showed an apparent magnetic anomaly. The experiments in Ref. 30 involved imaging the Ørsted magnetic field from current-carrying metallic wires fabricated on a diamond sensing chip, thus realising the situation depicted in Fig. 3(a), but the effect of optical aberrations had been ignored. Here, we start by estimating the PSF in an imaging set-up similar to that used in Ref. 30, and then apply the resulting transformations and to the data.
V.1 Estimation of the PSF
A common method to estimate the PSF of an optical system is to image a pseudo point emitter. However, here we want to characterise the PSF in situ, i.e. using a dense NV layer near the diamond surface, in the same conditions as for widefield NV imaging. To this end, we excite a small area of the NV layer and compare the spot size in the PL image with that of the excited region. The experimental set-up is identical to that used for quantum microscopy experiments except that the laser is here tightly focused on the NV layer instead of being defocused [Fig. 6(a)].
Similar to the conditions in Ref. 30, we used a diamond plate of thickness m containing a thin layer of NV centres confined within nm of the surface. The diamond plate was glued on a glass coverslip, with the NV layer facing the opposite (air) side. Our widefield microscope employs a green laser ( nm) for excitation of the NV layer in an epi-illumination configuration, and an oil-immersion objective lens (Nikon CFI Super Fluor 40x, ). A tube lens (focal length mm) is used to form an image on the camera, either of the NV PL when a bandpass filter is inserted ( nm) or of the green light reflected off the diamond surface when the filter is removed.
The green and PL images thus obtained are shown in Fig. 6(b) and Fig. 6(c), respectively, plot with a logarithmic intensity scale to emphasise the tails of the spots, while line cuts plot on a linear scale are shown in Fig. 6(d). We verified that the green and PL focal planes coincide, i.e. both spots appear smallest for the same position of the diamond along the optical axis. We also made sure the NV PL was not saturated.
For a perfect optical system free of aberrations, and assuming the rear aperture of the objective is uniformly illuminated, the laser spot in the focal plane (i.e. at the NV layer) should be an Airy disk with a FWHM nm; the diffraction limit. In our experiments, the laser does not fill the objective uniformly, and additionally we expect aberrations due to the high refractive index of diamond (the objective is designed for imaging through glass). Likewise, a point source emitting at nm will ideally form an image on the camera that is an Airy disk with FWHM nm; this is the diffraction-limited PSF of the imaging system (approximated to a 300-nm Gaussian PSF in Sec. III). But aberrations are also expected due to imaging through the diamond as well as other optical imperfections. These may include intrinsic aberrations from the objective and tube lens, imperfect positioning of the tube lens, and diffuse light scattering within the various optical media (diamond, glue, glass coverslip, immersion oil) and at the interfaces (including at the diamond surfaces which exhibit some roughness).
We found that the line cuts in Fig. 6(d) are best fit with a Moffat distribution
(14) |
where is the distance to the centre, characterises the width of the distribution, and the prominence of the tails ( corresponds to a Lorentzian distribution while the limit corresponds to a Gaussian distribution). The FWHM is given by . The Mossfat distribution is commonly employed to model the PSF in astronomical imaging, capturing the effects of atmospheric turbulence and diffuse scattering.[38, 39] For the green spot in Fig. 6(d), we find a mainly Gaussian character (), albeit wider than expected, FWHM 480 nm. The NV PL spot is much wider (FWHM 940 nm) and has a Lorentzian character (), which can be seen by the long tails visible in a log-scale image [Fig. 6(c)]. Assuming the image of the reflected green light is roughly representative of the actual excitation spot at the NV layer, we can then obtain the PSF by deconvolving the relation where and are the measured (and normalised) PL and green distributions. All deconvolutions in this section are achieved with 75 iterations of the Richardson-Lucy algorithm. The resulting PSF is shown as a dashed line in Fig. 6(d), and is best fit with a Moffat distribution with and FWHM nm. This fit represents a lower bound of the PSF width as the green spot at the NV layer may be smaller than it appears on the image which also includes a convolution. We leave a more thorough measurement of the PSF and a detailed analysis of its origin for future work.
Summarising, we found that in our set-up the PSF is wider than the diffraction limit by a factor of and has a mainly Lorentzian character, with significantly wider tails compared to an ideal Airy pattern (or its Gaussian approximation). As we saw in Sec. III, such tails are an important source of imaging artefacts in spectral imaging.
V.2 Aberration prediction and correction

We now use the PSF estimated above to re-interpret the data in Ref. 30. We examine a particular experiment where the green illumination was highly non-uniform, see photo of the device in Fig. 7(a) and apparent PL image () in Fig. 7(b). Here, a ramp of AlOx was deposited on the diamond surface before fabricating the current-carrying metallic wire. The varying distance between the NV layer and the top-most reflective interface (oxide-air or oxide-metal) leads to the observed interference pattern. Using the PSF estimated in Fig. 6(d) (i.e. Moffat distribution with and FWHM nm), the true PL emission map can be reconstructed via direct deconvolution [Fig. 7(c)]. The true PL emission is noticeably sharper and of higher contrast (with respect to the interference pattern) than the raw image acquired.
When a constant current mA is passed through the metallic wire, an Ørsted magnetic field is produced. The theoretical prediction for the in-plane magnetic field component (, perpendicular to the current direction) and out-of-plane component () are shown in Fig. 7(d), where we assumed a uniform current density across the wire and a uniform standoff distance nm. We can now apply the transformation (Eq. 6) to the true field maps to predict the apparent field maps using the PL map and PSF as inputs. The result is shown in Fig. 7(e) and can be compared with the experimentally measured apparent magnetic field shown in Fig. 7(f). The main experimental features are broadly reproduced by the simulation, namely the overall reduction in field strength compared to theory, and the modulation correlated with the PL intensity. Conversely, the measured apparent field can be used to reconstruct the true field by applying the inverse transformation (here ) via Eq. 8, Fig. 7(g), which can be compared with the theoretical field, Fig. 7(d). The expected field strength is largely recovered and the modulation attenuated.
Comparisons are facilitated by examining line cuts along the wire [Fig. 7(h)]. The corrected field is within of the theoretical field (compared to an error of up to 50% before correction) except in the top part of the images [left-hand side in Fig. 7(h)] which will be discussed below. Despite the simplicity of our model and assumptions, it thus provides a solid basis to explain the key features in our initial measurements, and to dramatically improve the accuracy of the estimated field. Refining the model to obtain a better agreement is beyond the scope of this work, but here we outline some possible improvements that could be made in the future. First, the PSF is unlikely to be the same at every point on the sample, especially between regions covered by metal and/or oxide of varying thickness. A point-by-point mapping of the PSF and an extension of the model to account for a non-uniform PSF would certainly improve its accuracy.[40, 41] Second, the peak finding estimator Eq. 3 is a crude approximation of the way the magnetic field is estimated in practice (which is via fitting of the electron spin resonance spectrum), in particular it ignores the fact that the spin contrast is not uniform across the image and may vary independently of PL intensity variations, whereas Eq. 3 applies a weighting proportional to the PL intensity only. Numerically modelling the exact data fitting process would provide a more accurate description at the cost of increased computation time.
V.3 Discussion
We conclude this section with a reflection on the implications of our findings on the apparent magnetic field anomaly reported in Ref. 30. This apparent anomaly is best exemplified by examining the top part of the images in Fig. 7(b-g), where the apparently measured field [see map in Fig. 7(f)] is much smaller (by a factor of ) than the theoretical field [Fig. 7(d)] under the metallic wire. In light of our model, we can now explain this apparent discrepancy. This top region happens to correspond to a regime where the true PL intensity () is largely quenched by the metallic wire which is in direct contact with the diamond surface in this region. There, the apparent magnetic field is therefore mainly due to delocalised contributions from remote unquenched regions. Since these unquenched regions away from the current experience zero magnetic field, the apparent field in the quenched region is very small, as observed, and is largely unrelated to the theoretical expectation. Thus, the apparent anomaly is just that – an apparent anomaly caused by an extreme case of spectral imaging aberrations. It is also unsurprising that the reconstruction in Fig. 7(g) largely fails in the quenched region since there is little information about the local field in the data, although a refined model as discussed above may improve the outcome.
As for the data set presented in Fig. 7, all other measurements and observations reported in Ref. 30 can be explained by the present model, at least qualitatively. It is therefore reasonable to conclude that there was no actual anomaly in the electrical behaviour of the device, just imaging artefacts in the magnetic field measurements; the apparent anomaly is resolved. This case study illustrates how a seemingly trivial blurring effect can have significant consequences on quantitative analysis of widefield NV imaging measurements, and highlights the importance of image restoration for future experiments.
VI Conclusion
Widefield quantum microscopy is an increasingly used technique to map magnetic and other fields, in particular for the quantitative analysis of magnetic materials and current distributions. Despite calibration-free accurate measurement a claimed benefit of the technique,[8] the accuracy of quantum diamond microscopy has not been characterised in detail thus far. Here we have shown that optical aberrations can introduce large systematic errors in the measured image exceeding a simple blurring. A framework was developed to account for the measurement’s spectral dimension, both in predicting anomalous measurements as well as a method to control for aberrations via a deconvolution approach. The combination of large tails on the PSF with local emission quenching were established as the cause of previously reported imaging artefacts, which informed a prescription to identify them in the future. Further work is required to develop a method to characterise the (possibly spatially variant) response of an imaging system in situ with the diamond and sample present, as well as inform on the source of aberrations. Other imaging modalities such as spin relaxometry demand a separate and thorough treatment to identify the magnitude of artefacts in their results. This work will help researchers to identify and control for aberration in widefield quantum microscopy and related techniques and provides a framework to facilitate further improvements to their accuracy.
Acknowledgements.
We thank N. Dontschuk, D. McCloskey, D. Simpson, G. Balasubramanian and V. Jacques for stimulating discussions. This work was supported by the Australian Research Council (ARC) through grants CE170100012, FT200100073 and DP220100178. I.O.R. and A.J.H. are supported by an Australian Government Research Training Program Scholarship. S.C.S gratefully acknowledges the support of an Ernst and Grace Matthaei scholarship.References
- Degen, Reinhard, and Cappellaro [2017] C. L. Degen, F. Reinhard, and P. Cappellaro, “Quantum sensing,” Reviews of Modern Physics 89, 035002 (2017).
- Rondin et al. [2014] L. Rondin, J.-P. Tetienne, T. Hingant, J.-F. Roch, P. Maletinsky, and V. Jacques, “Magnetometry with nitrogen-vacancy defects in diamond,” Reports on Progress in Physics 77, 056503 (2014).
- Casola, van der Sar, and Yacoby [2018] F. Casola, T. van der Sar, and A. Yacoby, “Probing condensed matter physics with magnetometry based on nitrogen-vacancy centres in diamond,” Nature Reviews Materials 3, 17088 (2018).
- Doherty et al. [2013] M. W. Doherty, N. B. Manson, P. Delaney, F. Jelezko, J. Wrachtrup, and L. C. L. Hollenberg, “The nitrogen-vacancy colour centre in diamond,” Physics Reports 528, 1–45 (2013).
- Felton et al. [2009] S. Felton, A. M. Edmonds, M. E. Newton, P. M. Martineau, D. Fisher, D. J. Twitchen, and J. M. Baker, “Hyperfine interaction in the ground state of the negatively charged nitrogen vacancy center in diamond,” Physical Review B 79, 075203 (2009).
- Steinert et al. [2010] S. Steinert, F. Dolde, P. Neumann, A. Aird, B. Naydenov, G. Balasubramanian, F. Jelezko, and J. Wrachtrup, “High sensitivity magnetic imaging using an array of spins in diamond,” The Review of Scientific Instruments 81, 043705 (2010).
- Levine et al. [2019] E. V. Levine, M. J. Turner, P. Kehayias, C. A. Hart, N. Langellier, R. Trubko, D. R. Glenn, R. R. Fu, and R. L. Walsworth, “Principles and techniques of the quantum diamond microscope,” Nanophotonics 8, 1945–1973 (2019).
- Scholten et al. [2021] S. C. Scholten, A. J. Healey, I. O. Robertson, G. J. Abrahams, D. A. Broadway, and J.-P. Tetienne, “Widefield quantum microscopy with nitrogen-vacancy centers in diamond: Strengths, limitations, and prospects,” Journal of Applied Physics 130, 150902 (2021).
- Braat et al. [2008] J. J. M. Braat, S. van Haver, A. J. E. M. Janssen, and P. Dirksen, “Assessment of optical systems by means of point-spread functions,” in Progress in Optics, Vol. 51, edited by E. Wolf (Elsevier, 2008) pp. 349–468.
- Steinert et al. [2013] S. Steinert, F. Ziem, L. T. Hall, A. Zappe, M. Schweikert, N. Götz, A. Aird, G. Balasubramanian, L. Hollenberg, and J. Wrachtrup, “Magnetic spin imaging under ambient conditions with sub-cellular resolution,” Nature Communications 4, 1607 (2013).
- Simpson et al. [2017] D. A. Simpson, R. G. Ryan, L. T. Hall, E. Panchenko, S. C. Drew, S. Petrou, P. S. Donnelly, P. Mulvaney, and L. C. L. Hollenberg, “Electron paramagnetic resonance microscopy using spins in diamond under ambient conditions,” Nature Communications 8, 458 (2017).
- Webb et al. [2002] S. E. D. Webb, Y. Gu, S. Lévêque-Fort, J. Siegel, M. J. Cole, K. Dowling, R. Jones, P. M. W. French, M. A. A. Neil, R. Juškaitis, L. O. D. Sucharov, T. Wilson, and M. J. Lever, “A wide-field time-domain fluorescence lifetime imaging microscope with optical sectioning,” Review of Scientific Instruments 73, 1898–1907 (2002).
- Bowman et al. [2019] A. J. Bowman, B. B. Klopfer, T. Juffmann, and M. A. Kasevich, “Electro-optic imaging enables efficient wide-field fluorescence lifetime microscopy,” Nature Communications 10, 4561 (2019).
- Broadway et al. [2018] D. A. Broadway, N. Dontschuk, A. Tsai, S. E. Lillie, C. T.-K. Lew, J. C. McCallum, B. C. Johnson, M. W. Doherty, A. Stacey, L. C. L. Hollenberg, and J.-P. Tetienne, “Spatial mapping of band bending in semiconductor devices using in situ quantum sensors,” Nature Electronics 1, 502–507 (2018).
- Broadway et al. [2019] D. A. Broadway, B. C. Johnson, M. S. J. Barson, S. E. Lillie, N. Dontschuk, D. J. McCloskey, A. Tsai, T. Teraji, D. A. Simpson, A. Stacey, J. C. McCallum, J. E. Bradby, M. W. Doherty, L. C. L. Hollenberg, and J.-P. Tetienne, “Microscopic imaging of the stress tensor in diamond using in situ quantum sensors,” Nano Letters 19, 4543–4550 (2019).
- Kehayias et al. [2019] P. Kehayias, M. J. Turner, R. Trubko, J. M. Schloss, C. A. Hart, M. Wesson, D. R. Glenn, and R. L. Walsworth, “Imaging crystal stress in diamond using ensembles of nitrogen-vacancy centers,” Physical Review B 100, 174103 (2019).
- Le Sage et al. [2013] D. Le Sage, K. Arai, D. R. Glenn, S. J. DeVience, L. M. Pham, L. Rahn-Lee, M. D. Lukin, A. Yacoby, A. Komeili, and R. L. Walsworth, “Optical magnetic imaging of living cells,” Nature 496, 486–489 (2013).
- Glenn et al. [2017] D. R. Glenn, R. R. Fu, P. Kehayias, D. Le Sage, E. A. Lima, B. P. Weiss, and R. L. Walsworth, “Micrometer-scale magnetic imaging of geological samples using a quantum diamond microscope,” Geochemistry, Geophysics, Geosystems 18, 3254–3267 (2017).
- Toraille et al. [2018] L. Toraille, K. Aïzel, É. Balloul, C. Vicario, C. Monzel, M. Coppey, E. Secret, J.-M. Siaugue, J. Sampaio, S. Rohart, N. Vernier, L. Bonnemay, T. Debuisschert, L. Rondin, J.-F. Roch, and M. Dahan, “Optical magnetometry of single biocompatible micromagnets for quantitative magnetogenetic and magnetomechanical assays,” Nano Letters 18, 7635–7641 (2018).
- Fescenko et al. [2019] I. Fescenko, A. Laraoui, J. Smits, N. Mosavian, P. Kehayias, J. Seto, L. Bougas, A. Jarmola, and V. M. Acosta, “Diamond magnetic microscopy of malarial hemozoin nanocrystals,” Physical Review Applied 11, 034029 (2019).
- Broadway et al. [2020a] D. A. Broadway, S. C. Scholten, C. Tan, N. Dontschuk, S. E. Lillie, B. C. Johnson, G. Zheng, Z. Wang, A. R. Oganov, S. Tian, C. Li, H. Lei, L. Wang, L. C. L. Hollenberg, and J.-P. Tetienne, “Imaging domain reversal in an ultrathin van der waals ferromagnet,” Advanced Materials 32, 2003314 (2020a).
- Meirzada et al. [2021] I. Meirzada, N. Sukenik, G. Haim, S. Yochelis, L. T. Baczewski, Y. Paltiel, and N. Bar-Gill, “Long-time-scale magnetization ordering induced by an adsorbed chiral monolayer on ferromagnets,” ACS Nano 15, 5574–5579 (2021).
- McLaughlin et al. [2021] N. J. McLaughlin, H. Wang, M. Huang, E. Lee-Wong, L. Hu, H. Lu, G. Q. Yan, G. Gu, C. Wu, Y.-Z. You, and C. R. Du, “Strong correlation between superconductivity and ferromagnetism in an fe-chalcogenide superconductor,” Nano Letters 21, 7277–7283 (2021).
- Nowodzinski et al. [2015] A. Nowodzinski, M. Chipaux, L. Toraille, V. Jacques, J. F. Roch, and T. Debuisschert, “Nitrogen-vacancy centers in diamond for current imaging at the redistributive layer level of integrated circuits,” Microelectronics Reliability 55, 1549–1553 (2015).
- Tetienne et al. [2017] J.-P. Tetienne, N. Dontschuk, D. A. Broadway, A. Stacey, D. A. Simpson, and L. C. L. Hollenberg, “Quantum imaging of current flow in graphene,” Science Advances 3, e1602429 (2017).
- Ku et al. [2020] M. J. H. Ku, T. X. Zhou, Q. Li, Y. J. Shin, J. K. Shi, C. Burch, L. E. Anderson, A. T. Pierce, Y. Xie, A. Hamo, U. Vool, H. Zhang, F. Casola, T. Taniguchi, K. Watanabe, M. M. Fogler, P. Kim, A. Yacoby, and R. L. Walsworth, “Imaging viscous flow of the dirac fluid in graphene,” Nature 583, 537–541 (2020).
- Turner et al. [2020] M. J. Turner, N. Langellier, R. Bainbridge, D. Walters, S. Meesala, T. M. Babinec, P. Kehayias, A. Yacoby, E. Hu, M. Lončar, R. L. Walsworth, and E. V. Levine, “Magnetic field fingerprinting of integrated-circuit activity with a quantum diamond microscope,” Physical Review Applied 14, 014097 (2020).
- Lillie et al. [2019] S. E. Lillie, N. Dontschuk, D. A. Broadway, D. L. Creedon, L. C. Hollenberg, and J.-P. Tetienne, “Imaging graphene field-effect transistors on diamond using nitrogen-vacancy microscopy,” Physical Review Applied 12, 024018 (2019).
- Scholten et al. [2022] S. Scholten, G. Abrahams, B. Johnson, A. Healey, I. Robertson, D. Simpson, A. Stacey, S. Onoda, T. Ohshima, T. Kho, J. Ibarra Michel, J. Bullock, L. Hollenberg, and J.-P. Tetienne, “Imaging Current Paths in Silicon Photovoltaic Devices with a Quantum Diamond Microscope,” Physical Review Applied 18, 014041 (2022).
- Tetienne et al. [2019] J.-P. Tetienne, N. Dontschuk, D. A. Broadway, S. E. Lillie, T. Teraji, D. A. Simpson, A. Stacey, and L. C. L. Hollenberg, “Apparent delocalization of the current density in metallic wires observed with diamond nitrogen-vacancy magnetometry,” Physical Review B 99, 014436 (2019).
- Fu et al. [2020] R. R. Fu, E. A. Lima, M. W. R. Volk, and R. Trubko, “High-sensitivity moment magnetometry with the quantum diamond microscope,” Geochemistry, Geophysics, Geosystems 21, e2020GC009147 (2020).
- Pham et al. [2011] L. M. Pham, D. Le Sage, P. L. Stanwix, T. K. Yeung, D. Glenn, A. Trifonov, P. Cappellaro, P. R. Hemmer, M. D. Lukin, H. Park, A. Yacoby, and R. L. Walsworth, “Magnetic field imaging with nitrogen-vacancy ensembles,” New Journal of Physics 13, 045021 (2011).
- Hunt [1972] B. Hunt, “Deconvolution of linear systems by constrained regression and its relationship to the Wiener theory,” IEEE Transactions on Automatic Control 17, 703–705 (1972).
- Richardson [1972] W. H. Richardson, “Bayesian-Based Iterative Method of Image Restoration,” JOSA 62, 55–59 (1972).
- Lucy [1974] L. B. Lucy, “An iterative technique for the rectification of observed distributions,” The Astronomical Journal 79, 745 (1974).
- van der Walt et al. [2014] S. van der Walt, J. L. Schönberger, J. Nunez-Iglesias, F. Boulogne, J. D. Warner, N. Yager, E. Gouillart, and T. Yu, “Scikit-image: Image processing in Python,” PeerJ 2, e453 (2014).
- Broadway et al. [2020b] D. Broadway, S. Lillie, S. Scholten, D. Rohner, N. Dontschuk, P. Maletinsky, J.-P. Tetienne, and L. Hollenberg, “Improved current density and magnetization reconstruction through vector magnetic field measurements,” Physical Review Applied 14, 024076 (2020b).
- Anisimova, Bednář, and Páta [2013] E. Anisimova, J. Bednář, and P. Páta, “The Point Spread Function Variations inside Wide-field Astonomical Images,” Acta Polytechnica 53, 1 (2013).
- Sandin [2014] C. Sandin, “The influence of diffuse scattered light: I. The PSF and its role in observations of the edge-on galaxy NGC 5907,” Astronomy & Astrophysics 567, A97 (2014).
- Berisha and Nagy [2014] S. Berisha and J. G. Nagy, “Iterative Methods for Image Restoration,” in Academic Press Library in Signal Processing, Vol. 4 (Elsevier, 2014) pp. 193–247.
- Sawchuk [1974] A. A. Sawchuk, “Space-variant image restoration by coordinate transformations,” Journal of the Optical Society of America 64, 138 (1974).