Parallel mode differential phase contrast in transmission electron microscopy, II: K$_2$CuF$_4$ phase transition

In Part I of this diptych, we outlined the theory and an analysis methodology for quantitative phase recovery from real-space distortions of Fresnel images acquired in the parallel mode of transmission electron microscopy (TEM). In that work, the properties of the method, termed TEM-differential phase contrast (TEM-DPC), were highlighted through the use of simulated data. In this work, we explore the use of the TEM-DPC technique with experimental cryo-TEM images of a thin lamella of a low temperature two-dimensional (2-D) ferromagnetic material, K$_2$CuF$_4$, to perform two tasks. First, using images recorded below the ordering temperature, we compare the TEM-DPC method to the transport of intensity one for phase recovery, and discuss the relative advantages the former has for experimental data. Second, by tracking the induction of the sample as it is driven through a phase transition by heating, we extract estimates for the critical temperature and critical exponent of the order parameter. The value of the latter is consistent with the 2-D XY class, raising the prospect that a Kosterlitz--Thoules transition may have occurred.


Introduction
In Part I of this two-part series , we showed that the real-space distortions of Fresnel images taken in a transmission electron microscope (TEM) of samples supporting electro-or magneto-static fields may contain information su icient for quantitative recovery of the electron-optical phase imparted on the imaging electrons. The technique, which we refer to as TEMdi erential phase contrast (TEM-DPC), has origins dating back decades (Fuller & Hale, 1960), but has gone largely unused since then. In part, this is because previous approaches have used pa erned films or shadow masks to form texture suitable for assessing the image distortions, which required modification of the microscope and limited mapping to stray magnetic (Wade, 1976;Suzuki et al., 1997;Suzuki et al., 2000;Shimakura et al., 2003) and electric fields (Sasaki et al., 2010) beyond the sample. Another reason is the tremendous success since its early adoption in electron microscopy (Bajt et al., 2000;De Graef & Zhu, 2001) of methods for phase recovery through solving the transport-of-intensity equation (TIE) (Teague, 1983). This is a result of the TIE technique allowing phase characterisation across a sample and in vacuum in a standard TEM using data obtained at di erent defocus levels.
The fundamental principle behind the TIE and TEM-DPC methods is the same, but whereas TIE uses changes in intensity as the beam propagates, TEM-DPC uses changes in displacement as the beam propagates. This di erence endows each technique with distinct properties, and these are encoded in the principle equations. For the transport of intensity approach (Paganin & Nugent, 1998), the TIE equation relates the phase, φ, imparted by the sample on the electron beam of wavelength λ to the rate of change in image intensity, I , with respect to defocus, f : where the z -axis is taken to lie anti-parallel to the beam propagation direction, I o is the in-focus image intensity, −2 ⊥ is the inverse Laplacian, and the subscript indicates the plane perpendicular to the beam. This equation is a simplified form, valid in cases where the in-focus image intensity is spatially uniform (we use the full equation later in our data analysis). For TEM-DPC, the phase gradient is related to the lateral deflection, ∆r ⊥ , at defocus ∆f by: where ⊥ is the gradient operator. One of the most notable di erences in these equations is the absence of image intensity terms in the TEM-DPC one. As a result of this, the TEM-DPC technique is intrinsically less sensitive to systematic errors arising from changes in illumination than is the TIE method. There are intensity factors that influence the ability to extract ∆r ⊥ , and we refer to the accompanying part of this work for a detailed discussion of them . We discussed di erent methods for quantifying ∆r ⊥ and reported a methodology based on well-established non-rigid image alignment methods (Kroon & Slump, 2009;Jones et al., 2015) in Part I. This approach makes use of structural contrast originating from small intrinsic imperfections that are present in almost all samples and, consequently, enables phase extraction across an entire sample without modification of the microscope. Using simulated data from di erent magnetic samples, we showed that the TEM-DPC technique has further potential benefits over the TIE one in some cases. One such case arises when the structural contrast is particularly large compared with that from magneto-or electro-static fields supported by the sample.
In this work, we apply the TEM-DPC technique and methodology developed in Part I to experimental cryo-TEM Fresnel images from a sample of K 2 CuF 4 that contains small but important imperfections naturally absent from idealised simulations. This material may be regarded as one of several layered Heisenberg systems with planar anisotropy (Bramwell & Holdsworth, 1993) which behave as quasi 2-D spin systems within certain temperature windows. For K 2 CuF 4 , this window is at low temperatures (the exact window is discussed in detail later), where a modified Kosterlitz-Thouless (KT) transition was observed through neutron sca ering and static magnetisation measurements reported almost 40 years ago (Hirakawa, 1982). In our recent work on this material , we reported real-space, direct observations of vortex and anti-vortex structures at a single temperature, consistent with the excitation types expected from the KT transition (Berezinskii, 1971(Berezinskii, , 1972Kosterlitz & Thouless, 1973), but possibly modified by anisotropies arising from the finite sample size.
In the following, we briefly summarise the relevant measurement details before comparing the TIE and TEM-DPC methods using data from below the ordering temperature. We find that the la er technique can have advantages at sample edges, and also when additional image distortions from imperfection in the microscope optics are present. We then apply the TEM-DPC method to the analysis of data acquired at multiple temperatures across the phase transition in order to characterise the magnetic textures during the transition and extract estimates for the critical temperature and critical exponent of the ordering parameter. The values of the critical parameters are consistent with previous reports (Hirakawa & Ikeda, 1973) and are suggestive of a material with a 2-D XY character. These results confirm that the TEM-DPC technique and analysis methodologies presented constitute a valuable tool with prospects for use in the characterisation of wide range of samples in materials science.

Experiment
The sample under study was taken from a bulk crystal of K 2 CuF 4 and thinned to an electron-transparent thickness of ∼150 nm using a standard focused ion beam preparation technique (Scha er et al., 2012). Imaging of the liquid He cooled sample was performed in an Hitachi H-1000FT electron microscope equipped with a highly coherent cold-field electron source operated at an acceleration voltage of 1 MV (Kawasaki et al., 2000). Multiple datasets were acquired at fixed and variable temperatures by recording videos with a Gatan Orius camera at 1 frame/sec using Gatan Digital Micrograph TM for later analysis. With an out-of-plane field of 100 Oe applied to the sample, it was found to be uniformly magnetised. In the following, we focus on a dataset where the sample was driven through a phase transition by heating the sample from 5 K to 7 K, with an out-of-plane field of 25 Oe applied to the sample (pointing into the page in the images shown later), and a defocus of 44 mm. In this dataset, the pixel size was 10.46 nm, which is much smaller than needed to resolve the magnetic texture in the Fresnel images, but is suitable to resolve details of the non-magnetic contribution to the image contrast.

CTEM and Fresnel Images
The top row of Figure 1 shows conventional TEM (CTEM) and Fresnel images of the K 2 CuF 4 sample under study. In the in-focus image [ Fig. 1(a)], the bright straight vertical line towards the right hand side of the sample and the two jagged bright lines at the top and bo om of the sample are cracks that occurred during temperature cycling. These conveniently allow the film to remain largely strain free and also break the exchange coupling on all three edges, defining the area of the sample on the le hand side that we will investigate. The le hand edge of the transparent section is connected to a much thicker region of the material, allowing good thermal contact to the cooled sample holder. The semi-circular dark ring segments are di raction e ects in the single crystal material as a result of bend contours. The width of the sample was determined from this image to be 5 µm, and this value was used as a reference to calibrate the pixel size of all defocused images.
Fresnel images at temperatures below [ Fig. 1 , which amplifies the non-magnetic contrast during the distortion analysis. (f) The distortion field that maps (c) to (b), obtained with a regularisation size of 2 pixels. The maximum magnitude is 5 pixels; the image size is 528×774 pixels; and only 1 in 30 arrows are shown along each axis. (g) The FM image of (b) with the magnetism induced image distortion removed using the distortion field in (f). The local image intensities are maintained in this procedure. (h) The equivalent di erence Fresnel image of (d) made with the unwarped image of (g), showing clear magnetic intensity variations due to cancellation of the non-magnetic contrast in the aligned images. The plo ed intensity scale in (d) and (h) are the same. 44 mm was determined from the contrast transfer function minima in reciprocal space using an automatic procedure discussed in the appendix and depicted in Figure A1. This defocus value is an order of magnitude larger than that typically used for permalloy thin films in a 200 kV microscope, and was used to provide suitable image intensity variations and distortions for the smaller wavelength electrons at the higher acceleration voltages used here ( ∆r ⊥ ∝ λ∆f , from Eq. (2)). At such large defocus values, changes in magnification and barrel distortion are common artifacts that can arise from the microscope optics. These Fresnel images were recorded at the same nominal magnification as the in-focus image and the same number of pixels are shown for all images in the top row of Fig. 1. The smaller pixel size of the sample and the rounded edges at defocus make it clear that these artifacts are present in the experimental Fresnel data. Another factor which will influence our analysis is the change in the apparent position of the bend contour with changes in focus [c.f. Figs. 1(a) and 1(b)]. This occurs as a result of small changes in the illumination conditions and, as we will see later, most strongly a ects the TIE analysis.
The most striking feature of the Fresnel images is the strong non-magnetic contrast arising from fine surface texture. Only the barest hints of this are visible in the CTEM image [ Fig. 1(a)], suggesting its origin is a mixture of phase and amplitude modulations. However, also present but barely perceptible by eye in the Fresnel images is a very weak intensity contrast from the magnetic induction of the sample. Some details of the magnetic contrast may be seen in the di erence image [ Fig. 1(d)]. Before this image could be calculated or the data analysed, the image stack was aligned rigidly using each en-tire image, including the support frame, in order to remove lateral sample dri during heating. Were the sample intact, standard Fourier approaches to image registration could have been used. However, because di erent parts of the cracked sample move at di erent rates, we instead used the scale-invariant feature transform (SIFT) (Lowe, 2004) provided in the Fiji image processing package (Schindelin et al., 2012) to rigidly align our data. This approach matches keypoints between images and, in our case, preferentially aligned the K 2 CuF 4 film. In cases where the sample moves as one and the support structure is transparent or has well defined edges, this approach can also be of use by allowing only the fixed support structure to determine the alignment, thereby avoiding any bias from regions of the images undergoing distortion due to the sample induction.
In the di erence image [ Fig. 1 , the presence and circulation direction of vortices may be inferred from the high frequency image texture and the relative brightening and darkening of the vortex cores, respectively. The locations of the vortices are marked by regions of small high-frequency signal amplitude and azimuthal lines of contrast. At those sites, the image deformation is low because a component of the moment lies out of plane and, thus, deflection of the beam is reduced. The darkening (brightening) at the bo om (top) of the image indicates that the vortices are clockwise (anticlockwise) as a result of divergence (convergence) of the beam. The changes in intensity from the magnetic contrast is ∼7 % of the average intensity, while the structural intensity range is ∼10× larger than this. Even though the two signal strengths are suitable for the TIE and TEM-DPC analyses, the much larger structural contrast potentially allows for much faster acquisitions with lower doses, which may be advantageous for time resolved studies.
The bo om row of Fig. 1 shows the results of calculations performed on the top row data, with a small crop to remove unused data. To enhance sensitivity to the high frequency structural contrast and minimise the influence of the low frequency magnetic contrast in the TEM-DPC analysis, image derivatives were used as the source and target images between which the distortion fields were calculated; an example derivative image is shown in Fig. 1(e) (corresponding to the FM data in Fig. 1(b)). We note that the non-rigid analysis methodology developed in Part I of this work and used here allowed the inclusion of the entire sample and support structure areas in these analyses. This was not possible in our earlier work  on account of the choice of B-spline basis (Arganda-Carreras et al., 2006;Schindelin et al., 2012) for the distortion field.
The image distortion field extracted from the FM and PM images a er di erentiation [ Fig. 1(f)] clearly shows the vertical crack and the regions where the two mag-netic vortices of opposite circulation direction are acting as converging or diverging lenses at the top and bo om of the sample, respectively. The maximum vector field magnitude is relatively small at 5 pixels, approximately equal to 1% of the 528 pixel wide image or, equivalently, to a real space distance of ∼50 nm. As a result, the FM image a er applying the inverse of the mapped deformation field [ Fig. 1(g)] appears very similar to the original image [ Fig. 1(b)] by eye. However, as the 'unwarping' process used was interpolation of the image at the new coordinates, the local image intensity is maintained while the shape is subtly changed. The di erence [ Fig. 1(h)] between this unwarped FM image and the PM reference image shows that almost all high frequency non-structural components are now absent, allowing the weak intensity changes between images from the magnetic vortices to be more clearly observed.
The image distortion field in Fig. 1(f) and in all experimental TEM-DPC analysis was determined using nonrigid alignment to a reference image from the sample in the PM regime, and with a Gaussian regularisation σ of 2 pixels, corresponding to a full-width-half-maximum size of ∼49 nm. Note that the distortion resolution is much be er than this contribution to the spatial resolution, and that other factors will also influence the overall spatial resolution. Further discussion and examples of the regularisation and its influence on the signal strength and noise level, and on the spatial resolution is given in the Appendices (see Figure A2 and related discussion). Next, we will compare the TEM-DPC and TIE methods to extract the sample induction at base temperature, before considering intermediate and higher temperatures.

TIE and TEM-DPC Induction Maps
In all following analyses, we extract the sample electronoptical phase using Eq. (2) defined in the introduction for the TEM-DPC method, and the full version of the TIE one for that method: For both techniques, we convert the extracted phase (or phase gradient) to sample induction using the appropriate equations (defined in Part 1) for a more direct interpretation of the data. Figure 2 shows the induction maps from analysis of the data in Fig. 1 plo ed as magnitude (top row), angle (middle row), and a combination of the two (bo om row). The direction of the induction is indicated by the hue, while the brightness (black to colour) indicates the vector magnitude, as shown by the colour wheels. All panels have the same scaling from 0 (black) to 45 mT for Comparison of induction maps for the K 2 CuF 4 sample at 5 K, from di erent TIE methods and the TEM-DPC one applied to the data in Fig. 1. The di erent analysis methods are shown in columns, as indicated by the column titles. The rows show the vector field magnitude (top), vector field angle (middle), and a combination of the two (bo om). Each row is plo ed on the same scale, indicated by the color bar or colour wheel against each row. The discontinuity in the TEM-DPC data to the right of the crack arose from a misalignment which went uncorrected. The dashed circles in the TEM-DPC data mark the location of an antivortex.
full colour, calculated from the projected induction using the known sample thickness. The first three columns show data from the TIE method using di erent input images, while the fourth column shows the results of the TEM-DPC analysis.
The first column of Fig. 2 shows the results of the conventional TIE analysis, using the FM image and the infocus image a er scaling it to ∼0.9× of its original size in order to match the scale of the FM image. The vector field magnitude [ Fig. 2(a)] is almost completely saturated due to systematic errors. The mean intensities of the Fresnel images used di er by only ∼0.5 % and normalising the intensities makes li le di erence; this error is due to subtle changes in the distribution of intensity rather than a net change in brightness of the illumination and it thus also influences the details of the extracted induction. In addition to this e ect, the images show significant texture due to structural contrast, and multiple strong bend contour features are visible in the angle data [ Fig. 2(b)], due to changes in their position and intensity between images.
A natural choice to improve the conventional TIE analysis is to replace the in-focus image with the PM one, so that the illumination changes are minimised, and to use the unwarped version of the FM image so that structural contrast cancels, as we saw in Fig. 1(g). The problem with this approach is that structural contrast from using the PM image in place of I 0 in Eq. (3) will still influence the results. This can be overcome in cases where the structural contrast in the PM image can be removed by filtering. In this process, it is important to maintain the overall intensity variations from the non-structural contrast, which will o en be possible in thin film samples. Our dataset has many thickness and intensity changes and is particularly di icult to filter, so to demonstrate this approach we simply use as I 0 a flat image with values taken from the 50 percentile value of the PM image. As a result, we expect some details of the induction will not be accurately recovered, particularly at locations of changing intensity such as near the sample edges. The results of doing this are shown in the second column of Fig. 2. This is the first dataset to show the clear presence of two vortices, and it does indeed produce TIE results with the minimum influence of structural contrast.
The third column of Fig. 2 shows TIE analysis results from a modified method using the PM and FM images with no unwarping. These plots are more mo led than those in the second column, but have improved sharpness at the sample edges. The third column data compare well with the TEM-DPC data in the fourth column, showing the validity of the TEM-DPC analysis methodology presented which, we emphasise, uses largely independent information from the TIE method: displacement rather than intensity. This level of agreement was only possible because the microscope optics and electron source were relatively stable during the experiments; if they were not, then even the modified TIE methods would show systematic errors.
Perhaps the most obvious di erence between data from the TEM-DPC method and that from the most accurate TIE one [third column of Fig. 2] is the noise level, where the data from the former has a slightly more speckled appearance due to very small imperfections in the alignment of the structural features. All of the TIE data appear smooth due to the filtering e ect of the Fourier space methods used to perform the analysis, which reduces the spatial resolution. This e ect, in combination with the image distortion, can be seen by comparing the magnitude and angle plots towards the top of the vertical crack; while the TIE data show smooth and continuous profiles, the TEM-DPC data is sharp and much more discontinuous, giving crisp edges. A further improvement in the TEM-DPC method is the reduction in Fresnel fringes in the induction data from the rapidly varying sample thickness, which may be seen by comparing the bo om edges of Figs. 2(k) and 2(l). The main reason for this is that the influence of intensity contrast is suppressed in favour of structural contrast (see Fig. 1(e)), which is also the reason for the reduced influence of the bend contour in the TEM-DPC data (cf. Figs. 2(g) and 2(h)).
Looking now at the magnetisation topology, the vortices seem to be somewhat modified by the finite sample size, each approaching a Landau-like state with approximately 90 o walls in the corners. The magnetisation mostly lies parallel to the edges formed by the cracks which break the exchange coupling (there may be some dipolar coupling across the vertical crack). The resulting configuration resembles the diamond-state seen in rectangular shaped structures due to shape anisotropy. However, looking in detail at the TEM-DPC data, we can see it is only a resemblance: the pa ern is o set from the sample edges; at the center of the le hand edge of the transparent region is a complete anti-vortex [circled in Figs. 2(h) and 2(l)]; and the magnetisation configuration continues into the thicker section of material to the le . The relatively sharp angular transition marked by a blue to red/orange transition between this anti-vortex and the top vortex [ Fig. 2(h)] suggests that these structures are connected, and it has been suggested that these may have formed through a KT transition as the sample was cooled . A repeat measurement with 10 Oe applied out-of-plane and a defocus of 19 mm showed similar vortex and anti-vortex structures to those shown here, but of the opposite chirality and located in slightly di erent positions. Next, to further test for evidence of a KT-like transition, we examine data at multiple temperatures acquired under the same experimental conditions as that used for the data in Fig. 2.

Phase Transition
Having compared the di erent analysis methods above, we now explore details of the phase transition. K 2 CuF 4 has been shown to have multiple regimes of spin coupling at di erent temperatures and fields. As the temperature is decreased at zero field, a transition from a 2-D Heisenberg to 2-D XY regime has been estimated to occur at 7.3 K, with 3-D correlations beginning to develop below 6.6 K, leading to a 3-D XY regime (Hirakawa, 1982). In almost all materials, multiple e ects may influence the results around the critical point(s), including crystalline and sample shape anisotropy, dipolar interactions, finite in-plane size e ects, finite thickness, external fields, and domain configuration. These e ects are discussed in detail in a review by Vaz et al. (2008), and are likely to influence the properties of our sample to some degree, as discussed in our earlier work . While keeping this in mind, it is nevertheless worth extracting what information we can from the experimental data. Figures 3(a)-3(f) show the TEM-DPC induction maps at di erent temperatures across the phase transition, with the data either masked beyond the sample edges or cropped near their locations. A video of the full transition is included in Supplemental, and is further described in the Appendices. As the sample is heated through the phase transition, the magnetisation and thus induction reduces in magnitude and the vortex structures break down as the sample becomes paramagnetic (strictly speaking, there may remain a small amount of magnetisation which is stabilised by the out-of-plane external field, to which our measurements are insensitive). To track the transition, we use as a proxy for the order parameter the mean induction, B me an , in the region between vortex cores marked by the white dashed box in Fig. 3(d), where the magnetisation is approximately divergence-free. This quantity is plo ed as a function of temperature, T , in Fig. 3(g) for both the TIE method using the FM and PM images directly, and the TEM-DPC method, which agree very well with one another, with both traces showing a clear transition at a temperature of around 6 K. A separate measurement with a field of 50 Oe applied to the sample at a fixed temperature of 6.1 K showed variations in contrast with time, indicative of thermally activated oscillations between di erent states.
Earlier neutron di raction measurements of the temperature dependence of the magnetisation of K 2 CuF 4 found that it followed Bloch's T 3/2 law at low temperatures, with a saturation magnetisation B s = µ 0 M (T = 0) = 123.4 mT and a Curie temperature, T c , of 6.25 K (Hirakawa & Ikeda, 1973). Our measurements do not reach low enough temperatures to accurately estimate B s from the data. In our case, the maximum value plo ed of ∼30 mT, may also be influenced by a combination of the broad nature of the vortex cores and their proximity to one another, both of which will reduce the measured induction at a given temperature. The finite thickness of the sample may also modify the magnetic configuration, as discussed in detail in our earlier work .
Driven through a phase transition, the relaxation time of a system diverges and the properties of the out-ofequilibrium system are characterised by intrinsic interactions, and fall within one of several universality classes. As a real, finite system is enlarged, the properties will approach those of the class to which it belongs, and are uniquely described by a set of critical exponents. At temperatures close to the phase transition, the magnetisation and thus B should follow (Vaz et al., 2008): where β is a critical exponent for the ordering parameter, and T c is a critical temperature. It has long been known that for an isotropic 2-D XY-system, the system must be finite for ordering to occur at a finite temperature (Mermin & Wagner, 1966). However, consistent with theory, many experimental quasi 2-D XY magnetic systems have been found to show universal scaling with a β value of 0.23 (Bramwell & Holdsworth, 1993). Although a range of β values are reported from experiments on di erent materials, in part as a result of their di ering crystal field strengths (Taroni et al., 2008), the value in K 2 CuF 4 has been measured to be 0.22 at temperatures close to Mod. T c (Hirakawa & Ikeda, 1973), consistent with the 2-D XY class. At lower temperatures, the value has been found to increase to 0.33±0.03 (Hirakawa & Ikeda, 1973), close to the β values of classes with a 3-D character (3-D Heisenberg: 0.369 (Campostrini et al., 2002); 3-D XY: 0.349 (Campostrini et al., 2001)).
While a full study of all factors that may influence the properties extracted from our measurements of this system would be extremely challenging and lies beyond the scope of this work, we may gain some insight into how β and T c are a ected by the magnetisation topology by fi ing Eq. (4) across the dataset to the net induction in 10×10 pixel subsets, in each of which the induction is relatively uniform. Away from the sample edges and the vortex cores, the values and errors are relatively uniform and it is from here, in the centre between the two vortices, that the induction profiles of Fig. 3(g) were taken. As the magnetisation in this region lies in a relatively uniform direction, the result of analysing the average of all pixels from this area produces very similar results to the average of the extracted spatially resolved parameters. The results of fi ing Eq. (4) to the averaged data is shown by the solid line in the inset to Fig. 3(g), and gives values of T c = 6.0 ± 0.1 K and β = 0.26 ± 0.03, where the error in the former is from the temperature calibration, while that in the la er is from the quality of the fit. The temperature range used in this fit was determined by how well the data conformed to Eq. (4) and is shown by the grey background in Fig. 3(g). Our estimate of T c agrees well with the previously reported value. Although the error in the extracted β value is higher than would be ideal, the value itself lies closer to that expected of the 2-D XY class than it is to those of 3-D systems, and thus is suggestive of a system with 2-D XY character.
Finally, it is worth commenting briefly on the direct observations of the phase transition. In the pure XY-class, the transition at finite temperatures is described by the KT mechanism (Kosterlitz & Thouless, 1973), where bound vortex and anti-vortex pairs with zero net vorticity form and mediate the transition. These bound pairs may be mobile below the phase transition temperature and, when driven towards higher temperature, are expected to unbind at the KT temperature (Pokrovsky, 1999), while thermal spin fluctuations grow. Ideally then, to unambiguously observe a KT transition in real-space alone, the sample should be large compared to the scale of the defects that form during the transition, which is unfortunately not the case here. While this does not exclude the possibility that the vortices and anti-vortices formed during a KT transition (indeed, the exponent β is suggestive of 2-D XY character), further work is required to fully understand all aspects of the observed behaviour. Ideally, this work would be done with thinner samples of a greater lateral extent which would allow direct visuali-sation of more dynamics during the phase transition, and thus access to other properties and critical exponents, the correlation function, in particular.

Conclusions
Using the TEM-DPC technique for quantitative phase recovery from Fresnel images and the non-rigid image alignment tools reported in Part I of this work , we have characterised the induction of a thin lamella of K 2 CuF 4 , a material of increasing interest for the quasi 2-D ferromagnetism it supports. We have compared the TEM-DPC technique with the TIE one using the same data obtained below the K 2 CuF 4 ordering temperature, and shown that the former method has potential advantages over the la er in the analysis of experimental data. This includes in areas near to sample edges, where fieldinduced distortion of the images breaks the assumptions of TIE method, and also in the common situation where small unavoidable changes in illumination or image distortion arise from the microscope optics.
By mapping the K 2 CuF 4 sample induction through a temperature-driven phase transition with the TEM-DPC method, we have extracted estimates for the critical temperature, T c , and critical exponent, β , of 6.0 ± 0.1 K and 0.26 ± 0.03, respectively. These values agree with earlier reports using di erent techniques and are suggestive of the sample having a 2-D XY character. This, together with the direct observation of vortex and antivortex structures, gives further support to the suggestion that a KT-like transition Togawa et al. (2021) has occurred.
This initial experimental demonstration of the TEM-DPC technique shows that it works well to extract the features of a magnetic sample, and has the potential to characterise other material systems and sources of magnetic or electric fields through recovery of the electron-optical phase.
Original data files for the work reported herein are available at DOI: TBA. All substantive simulation, analysis, and visualisation code is freely available in the open source fpd Python library (fpd devs, 2015).

Automated defocus determination
The defocus level of a Fresnel image is commonly estimated from the first zero crossing of the contrast transfer function (CTF), with the relevant spatial frequency determined from inspection of a Fourier transform of the spatially calibrated image. In this work, we use multiple zeros of the CTF to obtain a generally more reliable and accurate estimate of the defocus in an automated procedure. The procedure is implemented in the defocus_from_image function of the tem_tools module of the open source fpd Python package (fpd devs, 2015), and is described below with reference to Figure A1. Figure A1(a) shows the region of the original Fresnel image selected for analysis, with the axes labeled in pixels. This image is Fourier transformed and the result azimuthally averaged to produce the profile shown in Fig. A1(c). Here, multiple minima can be seen; their location are indicated by the red vertical dashed lines. To determine the optimum location of the minima, a contrast metric is calculated for all possible spatial frequencies of the first CTF minimum (a measure of the defocus value) within a specified range of the Nyquist frequency. The metric value used is the mean of the contrast (a − b/a + b) at and between the predicted minima. This metric is shown in Fig. A1(b), where a clear peak exists at the optimum location of the first CTF minimum. The equivalent defocus value was determined automatically by finding the location of the peak, which is marked by a red vertical dashed line. In this particular case, the defocus value was 44 mm, as indicated in the annotation of Fig. A1(b).

Distortion Field Extraction
In our previous analysis  of experimental K 2 CuF 4 data using the theory outlined in Part I of this work, we used the BUnwarpJ (Arganda-Carreras et al., 2006) plugin for the open source image processing package Fiji (Schindelin et al., 2012). This plugin calculates elastic deformations between images on a basis represented by cubic B-splines, through iterative minimisation of a total energy term. The term is primarily set by the dissimilarity between the source and target images, with optional regularisation terms based on the divergence and curl of the deformation fields (set to zero in our analysis). While 16×16 intervals in the grid of B-splines (the 'super fine' se ing of BUnwarpJ) adequately accounted for the deformations seen in the data, there was very limited control over the spatial resolution, and great care had to be taken around the edges of the sample.
The method and so ware tools for extraction of the distortion field reported in Part I of this work overcomes the above limitations by using a di erent approach, that of nonrigid alignment of Fresnel images using a gradient descent method Kroon & Slump (2009). Advancement of this iterative algorithm was regulated by convolution of updates to the cumulative displacement field with a 2-D Gaussian distribution of standard deviation σ, which essentially controls the spatial resolution of the extracted data, up to any limits imposed by the microscope optics and sample related contributions to the same. Custom regularisations may also be used in our analysis tools, but these tend to be slower than Gaussian regularisations and they also complicate interpretation of the spatial resolution.
The main scale of relevance for alignment to work correctly is the non-magnetic texture, which is comparable to the image distortion scale. To reduce the probability of the alignment procedure ge ing stuck in local minima, the input images could The values shown are per pixel and the data is plo ed against spatial resolution. Note that the x -axis is reversed to match the data order shown in other panels. The data in the manuscript was produced using a final σ value of 2 (marked by a vertical dashed line in (e)-(g)), which provides a good compromise between resolution and noise.
have been initially filtered to remove higher frequency components. Instead, the alignment was initially performed with a much larger σ value, and the process repeated using the previous displacement field as the initial values for the next step, with σ decreasing at each step (the first displacement field was taken as zero). By doing so, we are in e ect including only the lowest frequency components and then successively adding higher frequency ones. In principle, a single alignment can be performed and the regularisation modified in real time according to the live feedback provided by the GUI. However, the sequential approach described here allows the process to be automated and for us to observe the compromise between spatial resolution and the noise level by having access to the intermediate results. Figure A2 summarises the results of the alignment process as σ is successively reduced by a factor of 2 from 32 pixels until it reaches 0.5 pixels. The entire dataset was aligned simultaneously across multiple CPU cores, but for simplicity we show only the data at the base temperature of 5 K where the sample is ferromagnetic. Figures A2(a) -A2(c) display metrics during the alignment procedure. Each vertical dashed line marks the end of a sequence of iterations at the constant σ values shown in the annotations to (a). To visualise the distortion field, we show maps of the displacement vector field magnitude at each of these points in the panels of Fig. A2(d). The small area of discontinuous displacement field to the right of the sample arose from a local minima and went uncorrected. Figures A2(e) -A2(g) show the results of an analysis of the signal-to-noise ratio (SNR) in the images of Fig. A2(d), plo ed against the spatial resolution.
As the alignment proceeds, the normalised root mean square error (NRMSE) [ Fig. A2(a)] rapidly reduces and then tends towards a plateau at around σ = 4 pixels, before decreasing again to a lower plateau. At each step, the rate of change of the NRMSE [ Fig. A2(b)] rapidly decreases and tends towards a plateau, indicating that faster alignment would have been achieved by adapting the number of iterations of the algorithm across the σ values; we use a fixed number here for demonstration purposes. In our particular case, the corner between the NRMSE plateaus occurs when the magnitude of the displacement field [ Fig. A2(c)] has already reached close to its maximum value, and we thus interpret this feature as the point beyond which only small amplitude, high frequency signals are being added to the displacement field, and these are more likely to include noise or unwanted signal. This interpretation is confirmed by visual inspection of the displacement maps [ Fig. A2(d)] and the SNR analysis plots [Figs. A2(e) -A2(g)], discussed below.
It can o en be di icult to estimate the SNR ratio of single images with a high degree of confidence. The signal power is simple to calculate and its value per pixel is shown in Fig. A2(e). For the noise power, we adopt one of the methods we found success with previously (Paterson et al., 2020), based on wavelet shrinkage (Donoho & Johnstone, 1994) and provided by the scikit-image package (van der Walt et al., 2014). The noise power per pixel obtained from this analysis is shown in Fig. A2(f). As expected from the images in the figure, the noise starts at a low level and then rapidly increases as σ is reduced below 4 pixels. We note that the extracted values will underestimate contributions to the apparent noise from small systematic imperfections in the alignment, which contributes to the slightly mo led appearance of the images. Nevertheless, the extracted values still give an indication of the relative noise level in the data, and also demonstrate a useful method for characterising progression of the alignment. The SNR values are shown in Fig. A2(g) and begin to decrease at a spatial resolution of ∼10 pixels.
For the properties of the sample magnetisation and images used here, σ = 2 pixels was used for the data presented in the manuscript. Each pixel was ∼10.46 nm in size, making the fullwidth-half-maximum resolution ∼49 nm. This point is marked by the vertical dashed lines in Figs. A2(e) -A2(g), and it provides a reasonable compromise between spatial resolution and noise. However, even smaller σ values could be used and the data further processed to keep only the desired components. These include edge-preserving filters such as a total variation (TV) regularisation, or ones which do not handle discontinuities well, such as smoothed splines, but only a er cropping the data (TV or other custom filters may be applied during the alignment, but these tend to be slower than using a simple Gaussian filter). That no cropping is required here is one of the significant advantages of our approach. When dealing with multiple images, then any filtering may be improved by taking advantage of the additional dimension (temperature, in our case), and this also opens the possibility for the application of multivariate analyses such as dimensionality reduction. The data in the manuscript was presented without any filtering. Figure 3 shows TEM-DPC induction maps from the K 2 CuF 4 sample at selected temperatures as it was heated through a phase transition with a 25 Oe field applied out-of-plane. The supplemental video shows TEM-DPC induction maps at all temperatures between 5.0 K and 7.0 K, using an identical colour wheel for the vector field.