Introduction

Rapid developments in the field of nanotechnology call for experimental methods capable of providing information at sufficiently high spatial resolution. In the field of nano-magnetism, there are several well-established techniques such as x-ray magnetic circular dichroism1 (XMCD), spin-polarized scanning tunneling microscopy2,3, magnetic exchange force microscopy4 or electron holography5. However, these methods lack either depth sensitivity or spatial resolution. The electron magnetic circular dichroism (EMCD) technique6, a (scanning) transmission electron microscopy ((S)TEM) analogue of XMCD, in principle offers depth-sensitivity simultaneously with atomic spatial resolution.

EMCD has gone through a rapid development since its proposal in 20037 and the first experimental demonstration in 20066. It has been shown that the STEM geometry can be used8,9 and that this can be exploited to both improve the signal to noise ratio (SNR) of an EMCD signal10 as well as map magnetic moments in real space11,12. In the domain of high spatial resolution, EMCD has been detected using convergent beams of atomic size in a classical three-beam geometry13, utilizing phase ramps introduced by beam shift14, in zone axis orientation15,16, and using atomic size beams distorted by four-fold astigmatism17,18. Recent experiments with a weakly convergent electron beam, using both geometric and chromatic aberration correction, led to a detection of EMCD from individual atomic planes19. Despite some impressive achievements, the EMCD technique is still under development, primarily due to the struggle with low magnetic signal strength and its sensitivity to dynamical diffraction effects and experimental artifacts. In an effort to overcome these difficulties, there is a need for both innovative experimental design and data analysis methods.

Recently, it was proposed to use patterned apertures for the collection of EMCD signals20. This approach is expected to bring several advantages. First, it enables acquisition of EMCD over the whole range of spatial resolutions, down to atomic scale. Second, it should offer a dose-efficient approach, because it utilizes a larger fraction of the inelastically scattered electrons than other acquisition geometries, thereby improving the signal-to-noise ratio (SNR) of the notoriously weak EMCD signal. Third, it offers a path to a single-pass STEM acquisition of the spectra, if the data from the whole CCD camera can be recorded at each scan point. This occurs because the geometry of the aperture filters electrons scattered with different transition matrix elements having conjugated orientations of \(q\) and \({q}^{{\prime} }\) into the upper and lower portions of the post-prism CCD camera, resulting in their simultaneous acquisition. The difference between these EELS spectra, typically referred to as “chiral plus” and “chiral minus” yields the EMCD signal, to which sum rules can be applied to calculate magnetic moments21,22. Related experiments have demonstrated the feasibility of this approach23,24.

Here, we report our experimental progress towards single-pass STEM-EMCD on a cubic metallic iron sample using a patterned aperture as well as advances in data processing that are necessary to search for and extract potential EMCD signals. This second part proves to be particularly challenging given the complex distribution of magnetic scattering on a zone-axis as well as the nature of geometric distortions present in 2D electron energy-loss spectroscopy (EELS) dispersion plane. We begin with an outline of our hardware implementation including the design and installation of an 8-blade patterned aperture with a mirror symmetry plane oriented parallel to the spectrometer dispersion axis. We then detail the acquisition scheme and describe the steps needed to reproduce the experimental method. Subsequently, we summarize our analysis focusing on the impacts of 1) sample orientation and 2) momentum transfer in the non-dispersive axis (denoted \({q}_{y}\) in this manuscript). We reveal that the most promising candidate EMCD signals are detected at high \({q}_{y}\) values extracted from regions of the sample that are oriented close to the Fe \(\left[001\right]\) zone axis. If a larger range of sample orientations are included in the analysis, we still observe a potential EMCD signal; however, its strength is diminished. We also observe that the range of \({q}_{y}\) vectors plays a crucial role in this experiment, even observing an inversion of the signal sign on Fe \({L}_{3}\) that is not reciprocated on Fe \({L}_{2}\), which we interpret in terms of experimental errors. We conclude this manuscript with a discussion of these observations with accompanying theoretical considerations. The data and code required to reproduce this analysis are provided and freely distributed25. A version of the script formatted for publication detailing the analysis is provided in the supplementary information.

Results

The experiment presented in this manuscript was designed to test two hypotheses that have been previously proposed. The first hypothesis is that an 8-blade patterned aperture can detect an EMCD signal on the \(\left[001\right]\) zone axis of bcc iron. Given that simulations show that the EMCD signal is not very sensitive to the convergence angle and, thus, the ultimate spatial resolution of the probe20, these experiments were performed with a probe width that was much larger than what would be required for probing atomic columns. This allows the use of a more easily modified non C\({}_{s}\)-corrected microscope configured with a large probe current of 2 nA to optimize the signal-to-noise ratio of the EELS spectra.

The second hypothesis is that, given the complexity of magnetic scattering on a zone-axis, the strength and, potentially, sign of a corresponding EMCD signal should depend strongly on the momentum transfer vectors that are allowed to pass to the spectrometer due to the patterned aperture. This is expected to depend both on the rotation of the diffraction pattern with respect to the patterned aperture as well as the tilt of the crystal. To test this, the TEM was operated in STEM mode and STEM-diffraction was performed to acquire convergent beam electron diffraction (CBED) patterns from the same region that was probed for EELS. This allows for the crystallographic orientation to be locally extracted and correlated to EMCD signal strength and sign. We achieve this by looking at the EMCD signal as a function of both \({q}_{y}\) and tilt away from the zone-axis. Methodological details are provided in the methods section below.

Mirrored ventilator aperture

The pattern used for this aperture is presented on the left side of Fig. 1b. It is an 8-blade mirror-symmetry design optimized for single-pass EMCD acquisition on the \(\left[001\right]\) zone axis of a cubic material, as proposed by Negi et al.20. In this figure, the energy dispersion axis is oriented vertically. The right side of Fig. 1b shows a slit aperture that was not used in this experiment. The large holes surrounding the pattern allow for electrons to pass through the aperture plate to the high-angle annular dark field (HAADF) detector located at the spectrometer entrance. This aperture was suspended in the beam path by an electrically grounded arm mounted on a movable table, as shown in Fig. 1a. The table allowed for fine adjustments of the aperture position prior to evacuation of the camera chamber. The entire system was made vacuum compatible and placed into the negative chamber of a JEOL 2100F TEM, as shown in Fig. 1c. Adjustments were made by opening the chamber door, requiring venting and subsequent evacuation of the camera chamber. The aperture position on the Ultrascan camera in the EELS spectrometer is presented in Fig. 2a. We note that, unlike the rotation of the diffraction pattern, the alignment between the patterned aperture and the EELS spectrometer is fixed and, thus, critical to be correctly set prior to the experiment.

Figure 1
figure 1

(a) Design of the aperture holding arm suspending the aperture into the beam path. (b) The aperture plate. This design includes one slit (right) and one 8-blade mirror-symmetry patterned aperture (left). Switching between the two was accomplished by venting the chamber and adjusting the position. The large annular holes permit the use of the lower HAADF detector. (c) Placement of the aperture table into the TEM camera chamber.

Figure 2
figure 2

(a) Experimental diffraction pattern recorded on the GIF CCD showing the electron optical conditions. The probe was centered on the grain of interest (see Fig. 3). (b) 2D EELS spectrum acquired using the electron optical conditions presented in (a). The \({q}_{y}\) axis represents the momentum transfer that would be expected for a slit oriented normal to the spectrometer dispersion plane. The oxygen edge visible at 532 eV comes from the Al\({}_{2}\)O\({}_{3}\) capping layer and is primarily dominant in the background regions. The magenta brackets denote the angular span of the EMCD sign inversion on Fe \({L}_{3}\) observed in Fig. 9.

Following adjustment of the aperture position, a suitable iron grain was brought into the field of view following the methodology presented in the methods section. The goniometer was tilted to align the grain along the \(\left[001\right]\) zone axis and the diffraction pattern was rotated using the projector system of the TEM to align the \(\left[010\right]\) axis with the spectrometer dispersion axis. Figure 2a shows the CBED pattern from this orientation as well as its associated rotation to the patterned aperture, allowing for exact calculation of the collection angles. The probe position for this pattern was close to the center of the grain.

The spectrometer was operated in frame acquisition mode and a series of 2D EELS spectra were acquired using the experimental conditions detailed in the methods section. A summation over all of the 2D EELS images following alignment along the energy axis is presented in Fig. 2b. The iron edges are visible as vertical streaks at 709 and 723 eV. This \(q-E\) diagram is aligned vertically with the aperture placement on the CBED pattern in Fig. 2a, illustrating the experimental concept.

Of note here is how the shape and orientation of the mirrored ventilator aperture determines the regions of scattering angles collected by the detector. The \({q}_{x}\) dimension is integrated out, leaving only \({q}_{y}\) and \(E\) dependences in the acquired dataset. Considering the shape of the mirrored ventilator aperture, the \({q}_{y}\) values close to 0 thus consist of a sum over a wide range of \({q}_{x}\), whereas the higher \({q}_{y}\) values will be more selective in the probed \({q}_{x}\) range.

4D-STEM experiments

The 4D datacubes from both the CBED patterns and the 2D EELS images are summarized in Fig. 3. The STEM-DP 4D datacube reveals that the orientation of the probed iron grain varies as a function of the probe position. This variation may have been caused by a slight beam tilt induced while scanning such a large area, as this TEM is not equipped with descan coils. This tilt effect is exemplified in Fig. 3a–c. Two representative pixel positions (“A” and “B”) were chosen from this dataset, as displayed in Fig. 3a. The corresponding CBED patterns are displayed in Fig. 3b,c, respectively. This figure summarizes the more interactive experience of visualizing all of the collected CBED patterns as a function of probe position, which was performed using the PyXem plugin for Hyperspy26,27. The qualitative interpretation of this interactive experience was that the “upper-right corner” of the grain was oriented closer to the zone axis. Moreover, the grain appears to primarily rotate about the \(\left[110\right]\) axis. This rotation can be visualized by placing a virtual aperture away from the Bragg disks but centered on the \(\bar{1}10/1\bar{1}0\) Kikuchi line pair for the zone-axis orientation, as shown with the yellow box in Fig. 3b,c. This is illustrated in Fig. 4c and is discussed more quantitatively in the next section.

Figure 3
figure 3

(a) Virtual HAADF of the 4D STEM datacube over the grain of interest. The CBED patterns acquired at pixel position “A” and “B” are shown in (b) and (c), respectively. A gamma curve of 0.3 is applied to the grayscale mapping in these two images to enhance the visibility of the otherwise very weak Kikuchi lines, which are indexed and highlighted in cyan. The center of the \(000\) reflection is denoted with a red dot. The virtual aperture used to generate the VDF micrograph in figure 4c is also labeled and presented in yellow. (d) Summation over \(\Delta E\) and \({q}_{y}\) for the 4D EELS datacube. The 2D EELS spectra from pixel positions “A” and “B” are presented in (e) and (f), respectively.

Figure 4
figure 4

(a) Real-space micrograph created by using a virtual bright field aperture. (b) ROI selection using a threshold for the full grain mask. (c) Real-space micrograph created by using the virtual dark field aperture presented in figure 3. (d) The two orientation masks, “Orient 01” and “Orient 02” were generated by thresholding this image, and both are composited here. The exact thresholding parameters are provided in the supplementary information.

It should be noted that, since these datacubes were acquired using custom written hook-up scripts with the spectrum imaging subsystem in Digital Micrograph28, the synchronization between the probe position and the data acquisition is not perfect. A spatial distribution of the number of frames acquired per pixel is provided in the supplementary information. While most pixels contain one dataset, many contain zero or two. Nearest neighbor interpolation was used to fill the \(80\times 80\) pixel field of view.

Orientation mapping and selection of region of interest

To test the hypothesis that EMCD signal strength should vary with zone-axis mistilt, virtual bright field (VBF) and virtual dark field (VDF) images were generated using the STEM-DP datacube. The VBF image was formed by integrating over a box centered in the transmitted disk, and is presented in Fig. 4a. This effectively measures the loss of intensity to additional Bragg disks in the CBED patterns. Since the central grain was oriented along a zone-axis, significant intensity is lost and the grain itself appears dark. This image was thresholded to reveal a selection mask that restricts the region of interest to the zone-axis oriented grain, as presented in Fig. 4b and the supplementary information.

Within this grain, a rotation about \(\left[110\right]\) is observed, as discussed above. An estimate of the degree of this rotation (corresponding to a mistilt) can be obtained by generating a VDF image using the virtual aperture shown in Figs. 3b,c. The resulting VDF is presented in Fig. 4c. A significant increase in the intensity values of the pixels in this image thus represents, to a first approximation, an orientation that is closer to the \(\left[001\right]\) zone-axis geometry.

This VDF was qualitatively thresholded using an empirically-determined value to yield a spatial mask segmenting the grain scattering geometry close to a zone-axis and off of a zone-axis (details are provided in the supplementary information). The two regions of interest (ROI) are presented in Fig. 4d. We note that this segmentation is not intended to be quantitative: it merely serves as a way to test the hypothesis of whether there is a dependence of the EMCD signal strength on the sample orientation. The mask labeled “Orient 01” refers to the pixels where the CBED patterns show a closer to the zone-axis orientation, while “Orient 02” refers to pixels with a stronger tilt away from the zone-axis geometry. These orientation masks, as well as the “grain” mask from Fig. 4b, are used in the EMCD signal extraction below.

Candidate EMCD spectra

In this section, the two hypotheses described above are tested. The null hypothesis is defined as “no EMCD signal is detected.” As a detection criterion, we use the methodology outlined in Thersleff et al.13, where the confidence in a positive EMCD signal detection is expressed as the SNR of both the Fe \({L}_{3}\) and \({L}_{2}\) edges. Asserting the Rose criterion, a SNR of 5 or more on both the Fe \({L}_{3}\) and \({L}_{2}\) edges is necessary to confidently reject the null hypothesis (that no EMCD signal is present). EELS difference spectra with positive SNR, but lower than the Rose criterion, will be described here as “candidate” EMCD spectra, signifying the degraded confidence. Since the \({L}_{2}\) edge is more difficult to resolve, this will be the primary focus in the following discussion.

Influence of zone-axis mistilt

We begin by examining the influence the zone-axis mistilt has on the presence and sign of an EMCD signal. For this, we first use the spectra collected from the spatial region closest to the zone-axis orientation, denoted by the orientation mask 01 (see Fig. 4d). We also restrict ourselves to the outer \({q}_{y}\) range(17.6 – 24.2 mrad), as will be justified below. The candidate EMCD signal extracted from this region is presented in Fig. 5. Despite a relatively weak signal strength of less than 1% on Fe \({L}_{2}\), the SNR is 1.7 using these extraction settings. While this does not meet the Rose criterion, this gives a decent level of confidence that an EMCD signal can be detected in the data using this combination of extraction method, spatial sampling, and \({q}_{y}\) range.

Figure 5
figure 5

Candidate EMCD signal taken from the outer-most \({q}_{y}\) range and the spatial mask restricted to the region oriented closest to the Fe [100] zone-axis.

We now compare this signal to the one produced using the same \({q}_{y}\) integration range but collected from the spatial region exhibiting a larger mistilt from the zone-axis orientation, denoted by the orientation mask 02 (see Fig. 4d). The EELS difference signal in this region, presented in Fig. 6, shows a pronounced feature on Fe \({L}_{3}\) but no signal is visible on Fe \({L}_{2}\).

Figure 6
figure 6

Candidate EMCD signal taken from the outer-most \({q}_{y}\) range and the mask restricted to the region oriented furthest from the Fe [100] zone axis.

Influence of \({q}_{y}\)

We now shift the focus from the zone-axis mistilt to the influence of \({q}_{y}\). We begin by looking at all mistilt angles using the “grain” mask presented in Fig. 4b and integrating over all \({q}_{y}\) values. This describes the scenario most consistent with the theory and simulations from Negi et al.20. The result of the EMCD signal extraction is presented in Fig. 7. In this case, a weak candidate EMCD signal appears to be visible with a signal strength of 1.7 on Fe \({L}_{3}\). A weak but noticable signal (SNR = 1.0) is visible on Fe \({L}_{2}\) here as well, particularly when the cumulative sum of the EMCD signal is computed. Given the results of zone-axis mistilt (Figs. 5 and 6), the comparatively weak Fe \({L}_{2}\) signal strength may be partially explained by the inclusion of various off-axis samples.

Figure 7
figure 7

Candidate EMCD signal taken from the full \(q-E\) range and the mask covering the entire zone-axis oriented grain.

We can explore this further by restricting the \({q}_{y}\) range to 17.6–24.2 mrad, as above. Using the same ROI mask from Fig. 4b, we observe the results presented in Fig. 8. The SNR of Fe \({L}_{2}\) has now increased to 1.13, indicating a slightly improved confidence. This suggests that the \({q}_{y}\) range does influence the extracted EMCD signal, with higher \({q}_{y}\) values (representing an integration over fewer \({q}_{x}\) values) yielding a more convincing EMCD signal.

Figure 8
figure 8

Candidate EMCD signal taken from the outer-most \({q}_{y}\) range and the mask covering the entire zone-axis oriented grain.

We can study the effect of \({q}_{y}\) further by plotting the EMCD signal as a function of \({q}_{y}\) for each of the three ROIs masks. This is presented in Fig. 9. While the data are much noisier than with the previous figures (since no \({q}_{y}\) integration was performed), a weak signal on Fe \({L}_{2}\) is still visible for some \({q}_{y}\) values. Most significant in this visualization, however, is the observation that the EELS difference signal on \({L}_{3}\) clearly flips sign for middle \({q}_{y}\) values. The sign on \({L}_{2}\) does not appear to change. Inspection of Fig. 2a reveals that the \({q}_{y}\) range where flipping occurs has strong non-magnetic contributions from the \(110\) Bragg reflections, which are likely to enhance the noise and thus reduce the magnetic SNR.

Figure 9
figure 9

\({q}_{y}\)–EMCD maps for the three different ROI masks. The color scale denotes the fraction of the EMCD difference signal with respect to the maximum intensity of the Fe \({L}_{3}\) peak.

Discussion

Overall, the results of this experiment lead us to an optimistic assessment of the single-pass STEM-EMCD patterned aperture approach. While none of the observed signals meet the Rose criterion, some signals of statistical significance are nevertheless present. We also feel that this study has been particularly instructive at highlighting a number of limitations and outlining the challenges for this experiment, spurring the development of considerable data processing methods. Here, we discuss the observed trends in the data as well as the novel data processing techniques that we have developed that were necessary for us to draw our conclusions.

The first trend we discuss is the influence of zone-axis mistilt. We do observe a reduction in the strength of Fe \({L}_{2}\) for sample regions that are tilted further away from the zone-axis orientation. Importantly, this does not seem to come at the expense of a signal on Fe \({L}_{3}\). The loss of the Fe \({L}_{2}\) edge is something that has been observed in classical EMCD due to partial mixing of the magnetic and non-magnetic signals resulting from an asymmetrical orientation along the systematic row29,30. We may be similarly observing this mixing effect here, but in the zone-axis geometry. The clear lesson to be learned from this is that the EMCD signal is likely to be highly sensitive to sample orientation, requiring minimal beam tilt during scanning operations (potentially limiting the field of view) and high precision with the initial tilting settings.

The second observed trend is the influence of \({q}_{y}\), with the sign inversion on the Fe \({L}_{3}\) edge for \({q}_{y}\) values approximately between 10 to 15 mrad being particularly intriguing (see Fig. 9). While a sign inversion is not observed for simulations with a perfectly oriented mirrored ventilator aperture20, such sign inversions would be theoretically possible for a small rotation of the \(\left[010\right]\) direction in the diffraction pattern from the mirror symmetry axis (which is physically aligned to the spectrometer energy dispersion axis). We observe such a rotation in this experiment, as indicated in Fig. 2 by the yellow arrow. In addition, small mis-alignments in the positioning of the aperture naturally lead to an asymmetry of the upper and lower diffraction half-plane (with respect to the mirror axis of the aperture), which, like the mistilt in the grain orientation, can also lead to further mixing of the magnetic and non-magnetic signals29,30. It is possible that failure to achieve a near-perfect alignment of the crystal symmetry directions with the spectrometer is among the strongest factors influencing the EMCD extraction. Hardware limitations of the TEM instrument used in this work make a better alignment extremely tricky. However, more stable microscope columns equipped with more projector lenses and deflectors should greatly simplify this alignment step. A final potential explanation for the sign inversion arises from the observation that the \({q}_{y}\) range where the inversion takes place coincides with the region on the diffraction pattern that contains a strong contribution from Bragg diffraction. As denoted by the magenta bars in Fig. 2, the region of sign inversion corresponds to the region where three Bragg reflections (\(1\bar{1}0\), 200, and 110) overlap after the \({q}_{x}\) dimension is collapsed in the magnetic prism. This yields a band of high intensity in the subsequent \(q-E\) diagram (see Fig. 2). The elastic scattering from these Bragg diffracted beams does not contribute to the magnetic signal, but rather dilutes the total intensity by a non-magnetic component. This may lead to a stronger weight of the non-magnetic component in the resulting EMCD spectra which, when combined with the already weak magnetic component, would complicate extraction. Alternatively, this may be caused by dynamical diffraction effects, such as have been studied in previous reports31. However, in this case, we would expect a sign inversion on both edges rather than one edge preferentially. Future experiments would be needed to understand this effect in greater detail.

In addition to these experimental considerations, a serious challenge originates from the residual aberrations in the EELS spectrometer. Inspection of the raw data reveal that a number of spectral aberrations such as spectral blurring, energy offset, and even dispersion variations persist in the \({q}_{y}\) dimension of the \(q-E\) diagram. Given the complex distribution of magnetic scattering in the zone-axis geometry, such artifacts provide a major hurdle to the reliable extraction of an EMCD signal. While reasonable measures were taken to ensure that the off-axis dispersion was optimal, the non-standard approach taken in this study requires such adjustments to be made without the use of computerized automation. Consequently, spectral focus and astigmation were performed by hand. Although deemed to be sufficient when operating the TEM, the extremely stringent demands of EMCD signal extraction amplify even the smallest of alignment errors.

The approach we have adopted to meet these challenges at this stage is the development of more robust data processing techniques. Some of the steps necessary to extract candidate EMCD signals in this paper have not yet been debated in the EELS literature in detail. For this reason, we devote space here to outlining and justifying these steps, with the hope to stimulate a wider discussion on the topic. Simultaneously, we express hopes that future improved spectrometer hardware and automatic alignment procedures will remove the need of most (if not all) of these post-processing steps, as this would improve the quantitative performance over the whole range of EELS-based studies.

The first non-standard signal processing step that appears to be necessary for extracting an EMCD signal from these data is the addition of an energy dependence to the post-edge normalization. This seems to be a critical step: failure to use this approach results in a linear trend in the post-edge regions. Consequently, when we use a simple integral normalization, we find that the position of the post-edge window becomes overcritical, with the potential for human bias. The energy dependence is kept as simple as possible: a simple linear trend is regressed to the energy-dependent ratio between the chiral plus and minus spectra in the post-edge region. This approach has been taken previously by Schneider et al.32 (inspired from discussions within the XMCD community). We believe that this normalization routine is not only less prone to such bias, but can be justified on physical grounds as spectrometer aberrations mentioned above. In particular, we note that there is a slight curvature in the dispersion of the EELS spectra that bends them down along the increasing \(E\) direction. This may result in a linear post-edge trend, which we do, in fact, observe. While we are not yet certain about how this correction affects the quantification of magnetic moments, we observe that it is crucial in extraction of the EMCD candidate spectra presented in the Results section. For a routine deployment of this processing step, more detailed analysis is necessary than what can be provided in this work. Alternatively, hardware or software correction procedures to minimize the bending distortion need to be developed.

The second non-standard step involves the profile matching of the Fe \({L}_{2,3}\) edge shapes for both the chiral spectra via a peak broadening/sharpening function. This removes the influence of spectral broadening that we observe as a function of the \({q}_{y}\) dimension. This appears to be necessary due to residual geometrical aberrations in the spectrometer causing difficulties in achieving perfect focus along the entire \({q}_{y}\) dimension. Since quantitative EMCD utilizes spectral integrals, profile matching will not modify the quantification of an EMCD signal as long as the area under the peaks is invariant. We achieve this by applying the standard signal processing technique of subtracting a multiple of the smoothed second derivative of the spectrum from the spectrum itself. The peak profiles are matched using the optimization routine detailed in the Methods section below, and the step is parameterized.

The final non-standard step relates to the EMCD signal extraction itself. Rather than applying a step-by-step approach, as is typically done in the EMCD literature, we instead opted for a more holistic procedure. To this end, we have written an optimization routine in the Matlab programming language. This routine optimizes several parameters in the extraction steps, by modelling the resulting EMCD signal as two pseudo-Voigt peaks and applying a least-squares approach. It is described at length in the methods section. We believe that this results in a much more reliable and less bias-prone EMCD extraction and quantification. The code for this approach is available along with the data used for this study on Zenodo25 and we encourage the interested reader to explore this code on their own data and draw their own conclusions related to its reliability.

In conclusion, we have presented our progress towards the use of a patterned aperture designed to allow for a single-pass STEM-EMCD experiment on the zone-axis of a magnetic crystal. The analysis necessary to process these data spurred the development of considerable signal processing tools, which are published alongside this work25. The use of these tools following the procedures justified here lead us to observe candidate EMCD signals that appear to be correlated to the alignment of the specimen along its zone axis as well as having a dependence on the non-dispersion dimension of the \(q-E\) diagram, which we interpret in terms of theory and the geometry of the aperture / spectrometer coupling. Thus, we adopt an optimistic outlook for this experimental design.

Methods

Sample fabrication

The sample used for this experiment was prepared in the same manner as those used in Rusz et al.14 and Muto et al.33 A 10-nm-thick bcc Fe layer and a 3-nm-thick Al cap layer (to avoid oxidation of Fe) were deposited on 5-nm-thick Si\({}_{3}\)N\({}_{4}\) membranes by thermal evaporation in an ultra-high vacuum molecular beam epitaxy (UHV-MBE) system. Thicknesses were controlled by calibrated quartz microbalances. We estimate relative thickness fluctuations of about 3%, which ensures that no significant spectral intensity variation due to film thickness variation is expected. No ex situ or in situ preparation/cleaning was applied to the Si\({}_{3}\)N\({}_{4}\) membranes prior to the deposition. The membranes were kept at room temperature during the deposition. The Fe films were post-annealed at 750 \({}^{\circ }\)C for 120 min. to increase the lateral Fe grain size to about 50 nm. The deposition of the Al cap layers was carried out at room temperature. The disordered structure of the membranes (nanocrystalline or amorphous) led to a polycrystalline morphology of the metallic Fe/Al films. Air exposure after the deposition oxidised the Al cap layer to a depth of 1.5–2 nm. Since the Al layer is 3 nm thick, a closed AlO\({}_{x}\) layer is maintained even in the presence of surface roughness (likely for a polycrystalline film). Some metallic Al may remain at the interface to the Fe film. As oxidation of the Fe film could have substantial effects on the intensity ratio of the \({L}_{3}\) and \({L}_{2}\) edges, the film was examined with EELS to probe if any oxidisation of the Fe took place before or after the EMCD measurements; using the fact that the oxygen K edge can be easily distinguished between aluminium and iron oxides. Nevertheless we found no iron oxides within the detection limit of EELS (< 1 at%). The oxygen edges visible in Fig. 2b arise from averaging \(q-E\) over all 2D EELS frames, including those from the background region (where no iron grain was present).

Experimental equipment

The EMCD experiments were performed on a JEOL-2100F microscope operated at 200 kV. The TEM is equipped with a Gatan Image Filter (GIF) Tridiem model using an UltraScan 1000 CCD camera, which was used to acquire the 2D EELS data. Two additional CCD cameras are equipped at different column heights. An Orius camera is fitted above the viewing chamber at the height of the JEOL HAADF detectors. This camera runs at approximately 20 frames per second and has a large dynamic range, making it optimal for acquiring CBED patterns. This camera was used for acquisition of the 4D STEM-Diffraction datacube as well as inspecting the CBED patterns without the aperture shadow. The second CCD camera is an UltraScan 1000 situated between the viewing chamber and the GIF entrance. This was used for positioning the aperture, as it has a much wider field of view than the UltraScan camera attached to the spectrometer.

Image contrast in STEM mode was generated with two annular detectors and a secondary electron detector. The first annular detector is located above the viewing chamber and was seldom used because of the strong demagnification of the diffraction patterns necessary for the EELS experiments. The second annular detector is located at the spectrometer entrance. This detector could be used due to the HAADF pass-through that was built into the aperture (see Fig. 1b). However, since different camera lengths were needed for the 4D EELS and the STEM-diffraction experiments, yet the same area needed to be scanned, neither of these detectors was used for spatial registration. Instead, a secondary electron detector mounted above the sample was turned on. This position makes the contrast invariant to changes in the projector system of the TEM, ensuring high precision in the spatial registration of the probe between subsequent scans with different camera lengths. While the contrast was comparatively weak, the high probe current made it feasible to use for these experiments.

The TEM has a chamber directly below the viewing screen that is intended for film negatives. This was emptied and the custom aperture system described above was inserted. The aperture was positioned by the manual adjustment screws on the X-Y table (see Fig. 1) and its position with regards to the dispersion axis of the spectrometer was verified by inspecting its shadow on the CCD camera under parallel beam illumination. It was also verified by looking at the unfocused zero-loss peak when operating the spectrometer in spectroscopy mode. The aperture system was grounded to minimize charging and contamination effects, which were not observed even at high probe currents.

Data acquisition

STEM alignment

The condenser system in the TEM was aligned using custom settings tailored to this experiment. The probe current was maximized by adjusting the ratio between the CL1 and CL3 lenses, while the convergence angle was set by adjusting the ratio between CL3 and the mini-condenser lens CM. This is normally turned off in STEM mode for this instrument, but was manually engaged using the free lens control. It was observed that higher convergence angles lead to a reduction of alignment quality, so an optimal balance was found at a convergence semiangle of 4.2 mrad and probe current of 2 nA.

Following base alignment, a survey image of the sample was taken at high camera length using the upper HAADF detector. The probe was then moved by hand using the mouse in the Digiscan system and placed over candidate grains. Simultaneously, the Orius camera was used to observe the CBED patterns. The goal was to search for grains that were close to the Fe \(\left[001\right]\) zone axis yet were large enough to demonstrate the scanning capabilities of this experiment. The grain investigated in this paper required the goniometer to be slightly tilted to improve the orientation.

Diffraction conditions for the EELS experiments were configured using the projector system. As precise rotation of the CBED pattern with respect to the dispersion plane of the spectrometer is critical for this experiment, and since this is a non-standard procedure, manual adjustment using the free lens control was required. The rotation, focus, and demagnification of the CBED patterns were empirically optimized through manual adjustment of the four projector lenses in this TEM. This was performed using the Orius camera with the probe stationary on a neighboring grain whose orientation respective to the region of interest was known and subsequently verified by briefly placing the probe on the region of interest (see Fig. 2a). Diffraction focus was maintained by scanning the probe over a large area and minimizing lateral translations (corresponding to beam tilt) with the projector lenses.

4D EELS acquisition

Following optimization of the projector system, the spectrometer was switched to spectroscopy mode. The shape of the zero-loss peak was optimized in 2D EELS mode using both focus and stigmator lenses in the spectrometer system. Once the zero-loss peak shape was linear over a wide \({q}_{y}\) range, the drift tube was excited so that final tuning could be applied to the iron edges directly.

With the tuning completed, the sample was scanned. A survey image was acquired using the secondary electron detector and a grid of \(80\times 80\) pixels was defined over the region of interest with a spacing of 6.3 nm. A dwell time of 0.1 s was used and Digiscan was instructed to run in EDX mode yielding a scan speed of 8.7 pixels/s. A custom script was then executed to record the timestamp at each pixel position using Spectrum Imaging hook-ups in the Digital Micrograph scripting language28. These timestamps were written to a Digital Micrograph persistent tag structure. Simultaneously, the GIF CCD camera was switched to 2D EELS view mode and a second script was run that copied each frame to an empty data container34. A timestamp for each frame copy was also recorded to a persistent tag structure, allowing for the spatial position of the 2D EELS image to be associated with the pixel position in Digiscan. The exposure time on the camera was 0.1 s/frame which, including readout overhead, resulted in a data acquisition rate of 9.1 frames per second. A slight undersampling of the 2D EELS frames with respect to the probe position occurred, and this was mollified by filling missing frames using nearest neighbor interpolation. A spatial distribution of 2D EELS frames captured per pixel is provided in the supplementary information.

The spectrometer was set up for a dispersion of 0.2 eV and a vertical binning of 16. This yields a 2D EELS image for each readout cycle of \(32\times 2048\) pixels, spanning an energy range of 420–850 eV. The camera length was adjusted as above to yield a \({q}_{y}\) range from -27 to 27 mrad spanning the vertical diameter of the aperture. During acquisition, in a background thread, a sawtooth waveform was applied to the drift tube to continuously offset it35,36. The drift tube shifted the spectrum on the CCD camera by about 0.1 eV every second pixel. The purpose of this was to perform binned37 and iterative38 gain averaging.

STEM Diffraction acquisition

After the 4D EELS experiment was recorded, the projector system was changed to yield an optimal camera length for the Orius CCD camera. Critically, this very significant change to the projector settings has no influence on the contrast of the survey image generated with secondary electrons. Hence, the same survey image could be used to correct for the probe starting position. The same scripts used for recording timestamps in Digiscan28 as well as recording the camera in view mode34 were used to acquire all of the CBED patterns as the probe scanned across the region of interest. In this case, the exposure time was lowered to 0.002 s/frame using binning 4 and the center quarter of the CCD camera. This yielded a data acquisition rate of approximately 16 frames/s.

Data processing

4D datacube construction

Both the diffraction and 2D EELS data were stored as 3D image stacks in the Digital Micrograph format. The recorded timestamps were used to assemble these data into 4D datacubes. The timestamp at the beginning and end of each row was used to determine the range of images that would be assigned to that row. These were then resampled to 80 images using a time vector generated with the timestamps and nearest neighbor interpolation. The resulting spatial registration is visible in Fig. 3. It should be noted that this method does not lead to perfect spatial registration. Some scan jitter within each datacube is visible and the registration between datacubes is only accurate down to approximately 10 nm. This source of error negatively impacts the mapping capabilities of this experiment, but should have minimal influence on the overall observation of EMCD when summing over larger areas.

4D EELS pretreatment

Among the most important results of this study are the advances made in processing the 4D EELS datacubes. All of the analysis was performed in custom-written Matlab code that is provided as supplementary information.

First, pixel outliers (such as intense x-ray spikes) were removed by subtracting the moving average and then looking for deviations with a sigma of 5 or more. Any spectra above this threshold were replaced by the mean of the four nearest neighbors.

After removing strong outliers, the 2D EELS spectra were shifted to align along the energy axis. This procedure requires two steps. In the first step, the energy offset due to the drift tube at each probe position was estimated. The 2D EELS image from each pixel was vertically summed (summation along \({q}_{y}\)), yielding an EELS spectrum image datacube \((x,y,\Delta E)\) datacube with dimensions \({N}_{x}\times {N}_{y}\times {N}_{E}\). A reference spectrum was chosen and cross-correlated with all of the summed spectra over the Fe \({L}_{2,3}\) edges. Outliers were detected by looking for large deviations from the sawtooth drift tube function and linearly interpolated over. The resulting energy shift map was then saved and applied to a copy of the raw 4D data on a frame-by-frame basis.

This first step does not correct for shifts of the ionization edges along the \({q}_{y}\) dimension. To correct for these, an adaptation of the method employed by Witjes et al. for Raman spectra peak shift alignment is employed39. The roughly aligned 4D EELS datacube (having dimensions \({N}_{E}\times {N}_{{q}_{y}}\times {N}_{x}\times {N}_{y}\)) is rearranged into a 2D matrix having dimensions \({N}_{E}\times ({N}_{{q}_{y}}{N}_{x}{N}_{y})\). The implicit assumption here is that the entire dataset can be described as a series of 1D EELS spectra, which we denote as \({S}_{k}(E)\) where \(k\) represents the linear index of each individual 1D spectrum. We can assume that, in the absence of chemical shifts, the ionization edge of interest (Fe \({L}_{3}\) in this case) for all spectra should be exactly centered with the mean spectrum. Since this is not the case, we can more accurately describe the EELS datacube as:

$${S}_{k}({E}_{j})={A}_{k}\,f({E}_{j}+\Delta {E}_{k})$$
(1)

where \({A}_{k}\) represents an amplitude for the \({k}^{{\rm{th}}}\) spectrum, \(\Delta {E}_{k}\) represents the energy shift of the \({k}^{{\rm{th}}}\) spectrum and \({E}_{j}\) represents the energy vector of the mean. Thus, \(f({E}_{j})\) represents the mean spectrum that would be expected if all spectra were perfectly aligned. We can now expand \({S}_{k}({E}_{j}+\Delta {E}_{k})\) in a Taylor series about \(f({E}_{j})\):

$${S}_{k}({E}_{j})={A}_{k}\left\{f({E}_{j})+\Delta {E}_{k}\frac{\partial f}{\partial E}{| }_{{E}_{j}}+\frac{\Delta {E}_{k}^{2}}{2}\frac{{\partial }^{2}f}{\partial {E}^{2}}{| }_{{E}_{j}}+\cdots \ \right\}$$
(2)

which can be rewritten as

$${S}_{k}({E}_{j})={b}_{k,1}\,f({E}_{j})+{b}_{k,2}\frac{\partial f}{\partial E}{| }_{{E}_{j}}+{b}_{k,3}\frac{{\partial }^{2}f}{\partial {E}^{2}}{| }_{{E}_{j}}+\cdots \ .$$
(3)

In this case, \({b}_{k,i}\) denotes the \({i}^{{\rm{th}}}\) Taylor coefficient of the \({k}^{{\rm{th}}}\) spectrum. Critically, the ratio between the second and first Taylor coefficients

$$\frac{{b}_{k,2}}{{b}_{k,1}}=\frac{{A}_{k}\Delta {E}_{k}}{{A}_{k}}=\Delta {E}_{k}$$
(4)

meaning that these coefficients can be used to estimate the energy shift for each individual spectrum. The Taylor coefficients can thus be estimated simply by first estimating \(f({E}_{j})\) to be the mean of \({S}_{k}({E}_{j})\) and writing this to the first column of a matrix \(X\). Subsequently, this spectrum is smoothed, numerically differentiated, and placed in the second column. Using classical least squares regression

$$B={({X}^{t}X)}^{-1}{X}^{t}S$$
(5)

the Taylor coefficients and, thus, \(\Delta {E}_{k}\) can be estimated. This produces an energy shift correction that can be applied to each individual spectrum using Fourier shift theory to allow for sub-channel interpolation40. The procedure is iterated until \(\Delta {E}_{k}\) becomes negligibly small. It should be noted that the higher order Taylor coefficients can be used to correct for additional aberrations, such as peak broadening41,42. However, this becomes increasingly difficult in the limit of strong noise corruption, such as is present in this dataset.

The value of the energy shift \(\Delta {E}_{k}\) for each of these steps was saved and then added together. The final shift correction was then applied to the raw data, resulting in the optimal energy alignment. Subsequently, the 4D EELS datacube was truncated within the energy range 650–830 eV. This marks the end of the pretreatment stage for spectral data.

4D STEM DP pretreatment

The data processing workflow for the 4D STEM DP datacube is much less involved than for the 4D EELS datacube. Following interpolation into a 4D datacube, the data were visually explored using the PyXem software package27, which is an extension to Hyperspy26. This tool was used to produce qualitative orientation maps using virtual dark field images generated by placing a virtual aperture over the (0 1 1) Kikuchi line bands in the outer regions of the diffraction patterns.

EMCD signal extraction

The extraction of EMCD signals was performed using the fmincon function from the optimization toolbox in the Matlab programming language. An objective function was written that contains the following steps.

First, the desired \(q\)-range and orientation range was determined and single EELS spectra for both chiral plus and chiral minus were obtained by integrating over these regions of interest.

Second, the pre-edge background was modelled in the energy range 650–700 eV using an inverse power law

$${f}_{\pm ,{\rm{BG}}}(E)={f}_{\pm }(E)-{A}_{\pm }{E}^{{r}_{\pm }}$$
(6)

where \({f}_{\pm }(E)\) represents the raw extracted signal for chiral plus or minus, \({f}_{\pm ,BG}(E)\) is the background-subtracted signal, \(E\) is the energy vector (spanning the range 650–700 eV), and the remaining parameters are defined in Table 1. This model was subtracted from the raw spectra as shown in Eq. 6.

Table 1 Constraints for the parameters passed to fmincon in the EMCD signal extraction. Note that the EMCD amplitudes were not constrained to be positive and negative as above; rather, they were constrained to have opposite sign from each other.

In many cases, we noticed that the peak width of the chiral plus and chiral minus spectra was different. This yields a complex up-down-up EELS difference signal reminiscent of what one would expect for magnetite on the Fe \({L}_{3}\) edge. Inspection of the spectra indicates that this was almost certainly caused by residual spectral aberrations resulting from imperfect tuning of the \({S}_{x}\) and \({S}_{y}\) lenses in the spectrometer. Correction of these aberrations to the precision demanded by this EMCD experiment is likely not possible without computer assistance. To counteract this effect, we employ a profile matching routine at this stage of the objective function. The routine

$${f}_{-,s}(E)={f}_{-,{\rm{BG}}}(E)-{k}_{s}\frac{{\partial }^{2}{f}_{-,BG}(E)}{\partial {E}^{2}}$$
(7)

takes the second derivative of the smoothed chiral minus signal, scales it by \({k}_{s}\), and subtracts it from the original signal, yielding the same spectrum with a different peak width \({f}_{-,s}(E)\). \({k}_{s}\) is treated as a parameter that is allowed to vary during optimization. Negative values of this scalar will result in a peak broadening, emphasizing that the intent is to ensure that the peak shapes match rather than to modify the experimental energy resolution via peak sharpening. We also observe that the cumulative sum of the second derivative shows a zero crossing around 718 eV, indicating that the area underneath the modified peak is the same as before this procedure. A figure demonstrating this is presented in the supplementary information. Once the peak shapes are made similar to each other, a very small mismatch in the alignment of the chiral plus and chiral minus spectra was occasionally observed, usually on the order of 0.1 channels. We thus also shift the chiral minus by a non-integer amount \(\Delta E\) using Fourier shift theory. The shift amount is also parameterized in the objective function and allowed to vary when performing the optimization.

For the fourth step, a post-edge normalization was performed. The parameters for the post-edge normalization were determined by first computing the energy-dependent ratio between the background subtracted spectra, \(D(E)\)

$$D(E)=\frac{{f}_{+,{\rm{BG}}}(E)}{{f}_{-,s}(E)}.$$
(8)

A linear regression line with slope \(m\) and intercept \(d\) was fit to the post-edge ratios in the energy range 730–760 eV. This line was extrapolated over the entire background subtracted spectra and then multiplied by the chiral minus signal to normalize it to chiral plus.

Following the post-edge normalization, the spectra were normalized to the maximum value of either the chiral plus or chiral minus spectra and subtracted from each other, yielding \({f}_{{\rm{EMCD}}}(E)\). The normalization here is largely done for aesthetic purposes and simplifies the interpretation of the EMCD signal fitting parameters. This step has no impact on quantitative values extracted from EMCD spectra.

The sixth step entails the introduction of a model for the EMCD signal itself. Since this experiment was performed on bcc iron, we use a simple model of two pseudo-Voigt peaks

$$\begin{array}{l}{f}_{{\rm{fit}}}(E)={\left[{a}_{1}\eta {\left\{1+{\left(\frac{E-{c}_{1}}{{b}_{1a}+{b}_{1b}(E-{c}_{1})}\right)}^{2}\right\}}^{-1}+{a}_{1}(1-\eta )\exp \left\{-{\rm{ln}}(2){\left(\frac{E-{c}_{1}}{{b}_{1a}+{b}_{1b}(E-{c}_{1})}\right)}^{2}\right\}\right]}_{{L}_{3}}\\ \,+\,{\left[{a}_{2}\eta {\left\{1+{\left(\frac{E-{c}_{2}}{{b}_{2a}+{b}_{2b}(E-{c}_{2})}\right)}^{2}\right\}}^{-1}+{a}_{2}(1-\eta )\exp \left\{-{\rm{ln}}(2){\left(\frac{E-{c}_{2}}{{b}_{2a}+{b}_{2b}(E-{c}_{2})}\right)}^{2}\right\}\right]}_{{L}_{2}}\end{array}$$
(9)

where all the parameters are defined in Table 1. Note that \({a}_{1}\) and \({a}_{2}\) are constrained to have opposite sign. This model adds nine parameters to the optimization routine. The model is subtracted from \({f}_{{\rm{EMCD}}}(E)\), yielding residual errors. The objective function passed to fmincon minimizes the sum of the square of these errors.

The above steps lead to a total of 17 parameters that are allowed to vary by the fmincon function. These parameters were constrained to ranges listed in table 1. The errors arising from the pre-edge background range for both chiral plus and chiral minus were passed separately, so as to allow the optimization to favor a good fit to the input spectra rather than the subtracted result. The code used for this approach can be downloaded from Zenodo25 and the full analysis and figure generation script for this manuscript is formatted for publication in the supplementary information.