Annealing of focused ion beam damage in gold microcrystals: an in situ Bragg coherent X-ray diffraction imaging study

An in situ Bragg coherent X-ray diffraction annealing experiment on focused ion beam damaged gold microcrystals is presented.


Introduction
Focused ion beam (FIB) techniques utilize a beam of energetic ions, often gallium (Ga) extracted from liquid metal, to remove material at the micro-and nanoscale (Rajput & Luo, 2015). The ability to control sample features at these previously inaccessible length scales has furthered the understanding of material properties, e.g. by enabling the exploration of size-dependent material behaviour. Most notably, the 'smaller-is-stronger' effect has been extensively studied using nanoindented FIB-machined specimens (Uchic et al., 2004;Greer & De Hosson, 2011). The deformation behaviour of these samples varied significantly, depending on several competing mechanisms. One mechanism, exhibited by polycrystalline copper films (Kiener et al., 2007) and Mo alloy single crystals (Bei et al., 2007), shows that FIB damage can lead to a dense population of defects, making the escape of dislocations at the surface more difficult, which causes an apparent hardening. On the contrary, softening has been reported in FIB-fabricated Mo alloy micropillars with a low initial defect density (Shim et al., 2009). Here FIB-induced dislocation loops act as sources for glide dislocations, leading ISSN 1600-5775 to a reduction in yield stress (Shim et al., 2009). Additionally, FIB can cause other material changes such as amorphization (Basnar et al., 2003), local recrystallization (Rubanov & Munroe, 2004), twin nucleation (Lou et al., 2018), and intermetallic phase formation (Babu et al., 2016), to name a few.
Experiments on gold (Au) microcrystals have shown that FIB milling can cause lattice strains that extend more than 100 nm below the surface of the material (Hofmann et al., 2017a(Hofmann et al., , 2018. This can be a major concern as samples are no longer in their original state and these FIB-induced loads will act in addition to externally applied stresses. Notwithstanding, FIB remains a regularly used tool for 3D material characterization (Nan & Wang, 2019), micromechanical test sample fabrication (Brousseau et al., 2010), and top-down preparation of transmission electron microscopy (TEM) samples (Rubanov & Munroe, 2004;Rajput & Luo, 2015). The severity of FIB-induced sample modification depends on specific milling conditions (Hü tsch & Lilleodden, 2014). Methods introduced to mitigate this damage must be versatile and effective to allow FIB milling to reach its full potential as a micromachining tool.
Numerous approaches have been suggested for removing FIB damage: use of a plasma FIB (Ernst et al., 2017), postmilling low energy (2 keV) ion polishing (Giannuzzi et al., 2005), sacrificial coatings (Rubanov & Munroe, 2001), chemical etching (Roediger et al., 2011), and post-manufacture heat treatment (Kiener et al., 2012;Lee et al., 2016). Here we investigate the effects of annealing, a process that increases defect mobility and thereby provides a pathway for the removal of FIB-induced defects and, more importantly, the resulting strains. To evaluate the effectiveness of annealing for FIB-induced strain removal, we require a technique that allows nanoscale spatial resolution and high strain resolution. Previous in situ TEM studies have been performed, showing that temperatures of half the material's melting point were sufficient to remove FIB-induced dislocation loops in Al micropillars (Lee et al., 2016) and reduce defect density in FIB-made Cu samples (Kiener et al., 2012). However, TEM is limited to thin samples, where the close proximity of free surfaces can dominate behaviour. Hence, we require a technique capable of capturing high strain resolution information in 3D micrometre-sized volumes.
Bragg coherent X-ray diffraction imaging (BCDI) allows for 3D-resolved nanoscale strain measurements and can provide 3D spatial resolution of less than 10 nm (Cherukara et al., 2018) as well as strain resolution on the order of $ 2 Â 10 À4 (Carnis et al., 2019;Hofmann et al., 2020). BCDI involves fully illuminating a crystalline sample inside the coherent volume of an X-ray beam, which is approximately 1 mm Â 1 mm Â 1 mm at third-generation synchrotron sources (Clark et al., 2012;Hofmann et al., 2017b). Once the Bragg condition is met for a specific hkl reflection, the diffraction pattern is collected on a pixelated area detector positioned perpendicular to the outgoing wavevector in the Fraunhofer diffraction regime. By rotating the sample about a rocking axis, a 3D coherent X-ray diffraction pattern (CXDP) is collected as the detector sequentially intersects different parts of the chosen 3D Bragg peak in reciprocal space (Robinson et al., 2001). If the CXDP is oversampled by at least twice the Nyquist frequency (Miao & Sayre, 2000), at least 4 pixels per fringe period, iterative phase retrieval algorithms that apply constraints in real and reciprocal space can be used to recover the phase (Fienup, 1982;Robinson et al., 2001). The amplitude and phase in reciprocal space are related to the real-space object via an inverse Fourier transform (Miao & Sayre, 2000;Robinson et al., 2001;Clark et al., 2012) followed by a space transformation from detector conjugated space to orthogonal lab or sample space (Yang et al., 2019;Li et al., 2019;Maddali et al., 2020). The resulting amplitude, (r), where r is the position vector, is proportional to the effective electron density of the crystalline volume associated with the particular crystal reflection. The phase, (r), corresponds to the projection of the lattice displacement field, u(r), onto the Bragg vector, Q hkl , of the hkl crystal reflection under consideration, Previously, BCDI has been used to investigate annealing of 3C-SiC nanoparticles (Hruszkewycz et al., 2018), diamond nanoparticles , magnetite crystals (Yuan et al., 2019) and metallic glass (Chen et al., 2020). Furthermore, BCDI has been extensively used to study Au subject to iron diffusion (Estandarte et al., 2018), copper diffusion (Xiong et al., 2015) and catalytic oxidation (Suzana et al., 2019). However, these experiments only considered one reflection, and thus only the strain along the Bragg vector could be resolved. Our previous BCDI studies found that FIBmilled Au crystals had large phase features corresponding to lattice dilation and contraction (Hofmann et al., 2017a(Hofmann et al., ,b, 2018. These features were concentrated at the top and on the side of the milled crystals -on the surfaces exposed to the FIB beam. Defects such as stair-rod dislocations and their corresponding Burgers vectors were identified in the FIB-affected sample volume (Hofmann et al., 2017a(Hofmann et al., , 2018. This contrasts the comparatively flat, homogeneous phase observed in the as-grown crystals (Harder & Robinson, 2013;Hofmann et al., 2017aHofmann et al., , 2018. The study by Hofmann et al. (2018) further characterized the removal of substantial FIB damage by using a 5 keV polishing step. The ability to capture these observations throughout an entire 3D volume with high strain sensitivity and spatial resolution makes BCDI attractive for the study of FIB-damaged materials.
Here we investigate the in situ annealing of FIB-milled Au microcrystals using BCDI to examine how the 3D strain and crystal morphology evolve as a function of temperature. We demonstrate the successful measurement of two unique reflections for two separate FIB-milled Au crystals during an in situ annealing cycle from 23 C (room/ambient temperature) to 587 C. After recovering the amplitude and phase of the crystals, we identify temperatures where structural changes occur through observations of crystal facet areas, Pearson's normalized cross-correlation coefficient, r, of u hkl (r) and binary morphology masks, and average strain in different crystal regions of interest (ROIs), which are defined according to their FIB exposure. The use of two reflections for each sample highlights subtle differences in the lattice relaxation, which is observed to be dependent on the crystallographic direction and the geometry of the sample. We also consider the diffusion of Ga in Au and the self-diffusion of Au to determine which mechanism is probably responsible for specific changes. With four reflections, we faithfully identify temperatures where transitions in crystal shape, r, and average strain occur to evaluate the effectiveness of annealing in eliminating FIB-induced material damage.

Experimental methodology 2.1. Sample preparation
Au microcrystals were prepared on a [001]-oriented silicon substrate with a 100 nm-thick thermally grown oxide layer. First, the wafer was spin-coated with ZEP resist and patterns of 2 mm wide lines were produced on the substrate using electron-beam lithography. Following the removal of the resist, the wafer was coated with a 3 nm-thick Cr adhesion layer followed by 40 nm of Au. A pattern of Au lines remained on the substrate after a 'lift-off' procedure was used to remove the unpatterned areas. Next, the sample was annealed at 1000 C in air for 10 h, dewetting the lines to form microcrystals ranging from 200 nm to 1 mm in diameter. Scanning electron microscopy (SEM) was used to select suitable crystals for this study.
Using a Zeiss AURIGA FIB-SEM, candidate crystals were subjected to FIB milling with Ga ion energy of 30 keV and beam current of 20 pA, as this closely mimics the final milling cut during the manufacture of micromechanics test specimens (Kiener et al., 2008;Li et al., 2015;Gong et al., 2015). Approximately one-third of the crystal was removed using an incremental trench-milling mode. SEM imaging rather than low dose FIB imaging was used to position the FIB milling scan, as our previous results indicate that even a single FIB image can induce large lattice strains in the Au microcrystals (Hofmann et al., 2017a). Fig. 1(a) shows high-resolution SEM micrographs of the chosen FIB-milled microcrystals, crystal A and B, in excellent agreement with their respective morphologies recovered from BCDI at room temperature in Figs. 1(b) and 1(c). Crystals A and B were $ 10 mm apart on the substrate.

Bragg coherent X-ray diffraction
Synchrotron X-ray diffraction measurements were carried out at the Advanced Photon Source (APS), Argonne National Laboratory, USA. Before BCDI measurements, micro-beam Laue diffraction at beamline 34-ID-E was used to determine the lattice orientation of the crystals on the silicon wafer. A procedure for the alignment of BCDI measurements, based on Laue diffraction orientation measurements, is provided elsewhere (Hofmann et al., 2017b).
BCDI measurements at beamline 34-ID-C used an X-ray beam with 9 keV photon energy ( = 0.138 nm) and a spot size of 760 nm Â 750 nm (full width at half-maximum) using Kirkpatrick-Baez mirrors (Kirkpatrick & Baez, 1948). The Si substrate was clipped onto a heater cell available at the beamline shown in Appendix A. A CXDP was collected on a 256 Â 256 pixel quadrant of a Timepix detector (Amsterdam Scientific Instruments) with a GaAs sensor and pixel size, p, of 55 mm Â 55 mm positioned at a distance, D, of 1.2 m away from the sample to ensure that the diffraction pattern was oversampled (Sayre, 1952). The lower bound for D was determined by D = 2dp/, where d is the sample size. The (002) and ð1 " 1 11Þ reflections were measured for crystal A and the (200) and ð11 " 1 1Þ reflections for crystal B at every temperature step. At ambient temperature, the ð1 " 1 11Þ reflection for crystal A was rotated through an angular range of 0.7 while the remaining reflections occupied a range of 0.6 . For each rocking curve, a slice through the CXDP was captured every 0.004 with 0.2 s exposure time and 20 accumulations. A total of 175 increments were collected for the ð1 " 1 11Þ reflection and 150 increments for the other reflections. Each CXDP measurement was repeated multiple times to optimize the signal-to-noise ratio. For crystal A, 8 scans were collected for the (002) reflection and 14 for the ð1 " 1 11Þ reflection, while for crystal B, 9 scans were collected for the (200) reflection and 10 for the ð11 " 1 1Þ reflection at room temperature. The angular range, number of accumulations, number of repeated scans and exposure time were adjusted at higher temperatures to sufficiently sample the temperature range as discussed in Section 2.2.1. From 90 C onward, an angular range of 0.7 with 0.004 steps was used, i.e. 175 increments were collected in the rocking scan for CXDPs above room temperature, and 10 accumulations were taken instead of 20.   Only 3 repeated scans were collected between 90 C and 209 C inclusive. From 213 C onward, a 0.1 s exposure time was used and only 2 scans were measured, with the exception of the ð1 " 1 11Þ reflection at 213 C where 3 scans were measured. After performing flat-field and dead-time corrections, the repeated scans were aligned using a 3D version of the approach proposed by Guizar-Sicairos et al. (2008) to maximize their cross-correlation and only scans with r greater than 0.975 were averaged to return the CXDP used for phasing. All scans were summed and used for phase retrieval.
2.2.1. In situ annealing. The temperature was increased using the step and hold temperature profile shown in Fig. 2.
Here we note that the calibrated temperature of the Au microcrystals, T calibrated , is different from the temperature recorded using the thermocouple, T measured . This discrepancy arises from the thermal resistance between the thermocouple (attached to the sample clip), and the microcrystals in the heating setup, shown in Appendix A. To calculate T calibrated from T measured , we use the samples as local measurement devices. We consider the thermal expansion of pure Au, thermal = Au ÁT, where ÁT is the temperature change and Au is the linear thermal expansion coefficient (Howatson et al., 2009), to define T calibrated . We assume that implanted Ga ions after FIB milling have negligible effect on the Au thermal expansion coefficient, as the ions only penetrate 20 nm below the surface (Hofmann et al., 2018).
Since Au has a face-centred cubic crystal structure, lattice thermal expansion acts uniformly in all directions, causing the Bragg angle to decrease with increasing temperature. To track the Bragg peak, an alignment macro was run during the temperature ramp that ensured the diffractometer was positioned such that the maximum intensity was always centred in the top left quadrant of the detector immediately before the start of the rocking scans. This protocol ensured that the strain measured by BCDI was relative to the zero-strain reference region for each reflection as explained in Section 2.3, allowing a comparison between temperatures. By tracking the change in detector position at every temperature step, i, the lattice parameter, a i , at each step can be calculated, where i is the Bragg angle, S i is the outgoing wavevector (the detector position) and S 0 is the incident wavevector. Using a i and the literature value of Au , we calculate T calibrated , where thermal;i ¼ a i À a 23 C a 23 C : Fig. 3 shows the discrepancy between thermal plotted against T calibrated and T measured . The correction for T calibrated was determined by averaging over the four reflections, with a mean standard deviation of $ 8 C, indicating good agreement amongst the four reflections.
In this paper all temperatures noted refer to T calibrated rather than T measured unless specified. The temperature profile (shown in Fig. 2) has three varying temperature steps so as to capture the entirety of the annealing process whilst retaining a high sampling rate between 209 and 409 C. At low temperatures the migration energy was believed to be too high for noticeable interstitial and vacancy movement, hence larger The annealing temperature profile as a function of time. Changes in the temperature step size are marked by the red dashed lines. (a) T calibrated was raised from room temperature to 209 C using $ 50 C steps with a ramp rate of 2 C min À1 . (b) From 209 C to 409 C, $ 5 C steps were used with a ramp rate of 50 C min À1 . Finally, from 409 C to 587 C, $ 20 C steps were used with a ramp rate of 50 C min À1 . The ramp rate reported here is with respect to T measured and was lower in (a) to ensure that the alignment macro could update the positions of the reflections for larger temperature steps.

Figure 3
A comparison of thermal plotted against (a) T measured and (b) T calibrated for each reflection. thermal was calculated using equations (2) and (3) by tracing the angular position of the detector during annealing. In (a), the measured thermal averaged over all reflections (red line) does not agree with the predicted thermal (blue line) when plotted using T measured . In (b), the measured thermal plotted using T calibrated (determined by Au ) overlaps with the the predicted thermal as intended. temperature steps of $ 50 C were used. Below T Hü ttig , the Hü ttig temperature, which marks the threshold for surface atom mobility (127 C for Au) (Odarchenko et al., 2018), no changes are expected. Indeed, in this experiment, we focus on atomic mobility over tens of nanometres below the surface, as this is the thickness of the layer in which Ga implantation causes atomic displacement damage (Hofmann et al., 2018). Such solid-state diffusion is expected to occur above T Tammann , the Tammann temperature (327 C for Au) (Odarchenko et al., 2018), thus, from 209 C, $ 5 C steps were taken to increase the temperature resolution of our data set in order to capture structural transitions. It is important to note that the Hü ttig and Tammann temperatures are semi-empirical (T Hü ttig = 0.3T melting ) and (T Tammann = 0.5T melting ) and depend on surface texture, orientation, morphology and particle size (Moulijn et al., 2001) based on the Gibbs-Thomson equation (Thomson, 1871). After reaching 409 C, the temperature was increased using $ 20 C steps. This was because much of the FIB damage was expected to already have been removed, based on a study showing the near complete recovery of nanoindented Au microcrystals annealed at $ 0.65 times the melting temperature (596 C for Au) .

Phasing of the diffraction data
Before the real-space, complex-valued electron density of the crystals can be reconstructed, the phase of the diffracted wavefield must be recovered using an iterative phase retrieval algorithm (Robinson et al., 2001). The use of established phase revival algorithms enables the recovery of the object by iteratively applying real and reciprocal space constraints to an initial guess (Robinson et al., 2001;Williams et al., 2003;Marchesini et al., 2003;Clark et al., 2012). Here, the starting guess for each reflection is of particular interest, as seeding with a good start guess generally results in a faster convergence. At each temperature (except the initial and final temperatures), we could seed the reconstruction with the reconstruction from the previous or succeeding temperature step (see Appendix B). We instead seed each reconstruction with itself through multiple rounds , with the initial round being seeded with a random guess (see details in Appendix C).
Once the phases were retrieved, the strain fields, (r), projected along the Bragg vector were calculated using These strain fields are relative to the zero-strain reference of the reconstruction. The assumption of close to zero lattice strain beyond a distance of $ 150 nm from the FIB-milled surface has previously been validated (Hofmann et al., 2017a(Hofmann et al., , 2018. Thus, we establish a 40 Â 40 Â 40 voxel volume centred on the bulk ROI's ( Fig. 9) centre of mass, a region relatively unaffected by FIB-induced strain, as the strain reference for every reconstruction . The amplitude threshold is 0.30 for all reconstructions. Furthermore, each final object is eroded by 1 voxel in an attempt to remove a phasing surface artefact caused by steep phase gradients across the air-sample interface convolved with the resolution function (Carnis et al., 2019). We report the 3D spatial resolution to be $ 23 nm. This was determined by differentiating two amplitude line profiles drawn across the air-sample interface and fitting each of them with a Gaussian. The final spatial resolution was the average of the full width at half-maximum of the two Gaussians for all reconstructions. We note that the resolution is somewhat dependent on the measurement directions in reciprocal space and the geometry of the sample. Appendix D shows a plot of the spatial resolution of each line profile for each crystal reflection with respect to temperature.

Results and discussion
3.1. Crystal strain and morphology Fig. 4 shows a comparison of the strain found along each reflection, Q hkl , of the FIB-milled crystals between the initial and final temperature. At room temperature, the reconstructed crystal morphologies are rough, especially on the surface of the milled face where complex sputtering and redeposition processes compete, which results in a pitted surface morphology. In Fig. 4 the four trench-like features visible on the surface of the (200) reflection for crystal B are near-surface dislocations caused by the milling process. These manifest as pipes of missing intensity in the amplitude of the reconstruction and are at the centre of a phase vortex Ulvestad et al., 2015a;Hofmann et al., 2017aHofmann et al., , 2020Dupraz et al., 2017). The phase vortices of the (200) reflection are identified in Appendix E. Dislocations are visible only when Q hkl Áb 6 ¼ 0 (Williams & Carter, 2009) and therefore are not necessarily visible for all reflections. For crystal B, the dislocations are visible only for the (200) data. From two reflections alone it is not possible to uniquely identify the Burgers vector of these dislocations, although it is likely that it is of (a/3) h110i type (Hofmann et al., 2017a).
The room-temperature 2D strain slices for each reflection are comparable in magnitude, with a maximum strain of $ 1.5 Â 10 À3 , to published data for glancing incidence FIB damage in Au (Hofmann et al., 2018). The same publication reports a thin compressive region followed by a tensile region along the milled face, which is prominently observed here in the (200) reflection for crystal B. A previous normal incidence FIB-milling study on Au microcrystals at room temperature (Hofmann et al., 2017a) reported a compressive layer at the top of the samples, caused by normal incident angle ions impacting the top of the crystal from the tails of the FIB probe. This is seen in the (002) reflection for crystal A and both the (200) and ð11 " 1 1Þ reflections for crystal B. After heating to 587 C, the strain and the crystal morphology have changed dramatically (Fig. 4) and present a relatively constant strain in the 2D slices. Additionally, the surface morphology is observed to become smooth and evolution of the facets is observed. Supplementary videos research papers 554 David Yang et al. Annealing of focused ion beam damage in Au microcrystals (SV) SV1 and SV2 show the evolution of the surface morphology and internal strain for each crystal. In Fig. 4 the dislocations or pits on the milled face in the (200) reflection disappear after roughly (1) 296 C, (2) 352 C, (3) 372 C and (4) 380 C, indicated by the elimination of phase vortices, as surface restructuring is well underway. These temperatures are mostly consistent with being above the Tammann temperature (327 C) for Au.

Facet area
With increasing temperature, both milled faces expanded outwards along the z-direction and became rounder at the bottom, demonstrating the formation of low-index facets, shown in Fig. 5, as a means to reduce the overall free surface energy. Facet areas were computed by calculating the area of the crystal whose isonormal is within a 19 angular threshold of a given facet normal unit vector. In principle a maximum angular threshold of 27.4 could be used, which is half the angle between {111} and {100} planes. Our chosen tolerance is below this maximum value since not all facets are fully developed, and the edges of the crystal are rounded and thus should not be classified as part of a facet. Fig. 6 and supplementary video SV3 show facet area evolution as temperature increases for both crystals. Fig. 4 shows that the facet at the bottom right edge of crystal A that appears after 410 C (see supplementary video SV1) is ð00 " 1 1Þ and the facet at the bottom left edge of crystal B that appears after 441 C (see supplementary video SV2) is ð1 " 1 1 " 1 1Þ. The identification of these facets is based on Fig. 5 and supplementary video SV3. The formation of low-index facets has been suggested to relieve strain (Kim et al., 2018), and contribute to thermodynamic equilibrium (Kovalenko & Rabkin, 2015). However, we do not fully reach the Winterbottom thermodynamic equilibrium shape (Winterbottom, 1967) due to finite measurement time. For Au, the order of free surface energies for low index facets is {111} < {100} < {110} based on ab initio techniques that concur with the number of nearest-neighbour broken bonds (Galanakis et al., 2002). Thermodynamically, the formation of a ð1 " 1 1 " 1 1Þ facet is most favourable, shown in crystal B. However, the production of the ð00 " 1 1Þ facet in crystal A and the disappearance of the ð00 " 1 1Þ facet in crystal B after 527 C are not improbable as normal movement of facets in dislocation-free single crystals can be restricted by the magnitude of the nucleation barriers if the crystal is larger than a few nanometres (  2000). In crystal B, the ð00 " 1 1Þ facet shrinks after 527 C but the ð1 " 1 1 " 1 1Þ facet grows, suggesting that the latter is a lower energy configuration.

Normalized displacement field cross-correlation matrix
To pinpoint transitions in strain, we consider a Pearson r correlation matrix of the displacement fields between different temperatures for each reflection. When analysing single reflections, this method has been used (Yau et al., 2017;Ulvestad et al., 2015b) to infer structural transitions. The value of r between each combination of temperatures was computed using equation (5) (Ulvestad et al., 2015b), where x n is the value for a given voxel and temperature, " x x is the mean of the entire array for that temperature, y n is the value for the same voxel at another temperature and " y y is the mean of the entire array at that temperature. By definition, r = 1 for the diagonal because the same array is perfectly correlated to itself. Before computing r, each crystal was shifted such that it was in the middle of the 256 Â 256 Â 256 voxel array, which was subsequently cropped to a 98 Â 186 Â 126 voxel array, still fully encapsulating the crystal, to speed up r computation.
The r matrix is shown in Fig. 7 for u hkl (r). Before using equation (1) to calculate u hkl (r), phase ramps were eliminated by centring the Fourier transform of the complex electron density and a phase unwrapping algorithm (Cusack & Papadakis, 2002) was used to remove phase wraps. Furthermore, we accounted for arbitrary phase offsets by establishing a 40 Â 40 Â 40 voxel volume centred about the bulk ROI's centre of mass as the zero-phase reference for every reconstruction, similar to the procedure adopted for strain in Section 2.3.
Structural transitions in the sample are identified by sharp changes in r presented in Fig. 7. Surprisingly the two reflec-  Normal vectors for each separately coloured facet are shown at 23 C and 587 C for both crystals. Note that only vectors pointing out of the page in the top and bottom views are drawn for clarity. The coordinate axes are positioned in sample space and plotted with a length of 250 nm.

Figure 6
Low-index facet areas of crystals A and B as a function of temperature. See Fig. 5 for facet locations on the crystal. tions from crystal A have different temperatures where the most significant changes occur: abruptly after 410 C in the (002) reflection and less abruptly at 380 C in the ð1 " 1 11Þ reflection. These transitions are also reflected in the facet area plot for crystal A in Fig. 6. The discrepancy between transition points could be due to the ð00 " 1 1Þ facet forming at 380 C but grows significantly larger after 410 C.
Some of these abrupt changes in r occur as a result of sudden relaxation events associated with the removal of a defect, such as dislocations (3), removed at 372 C, and (4), removed at 380 C, from Fig. 4 and supplementary video SV2. In crystal A the (002) reflection has reached a steady annealed state after 410 C, but this annealed state is less defined in the other reflections. Examining the same family of reflections can lead to different conclusions, as crystal B shows less abrupt transitions within the r matrices [especially the (200) reflection] that suggest a more gradual recovery of the lattice. In addition to these prominent transitions within the r matrix, less pronounced fluctuations are present and here are attributed to the oscillation between intermediate annealing states.
The differences in observations between reflections from the same crystal arises because not all defects are visible in every reflection and the projection of associated displacement fields varies for each combination of Burgers vector and scattering vector. This variance in material transformation points highlights the importance of multi-reflection analysis, as it can be misleading to derive conclusions from just a single r matrix.

Normalized morphology cross-correlation matrix
To separate morphology-related changes from lattice displacement changes, the r correlation matrix of the morphology is shown in Fig. 8. The morphology of a crystal was created by applying a 0.30 threshold to the reconstructed amplitude.
There is good agreement between the morphology r matrices and the facet area plots. For instance, the disappearance of the ð00 " 1 1Þ facet in crystal B shown in Fig. 6 after 527 C can also be clearly identified in the ð11 " 1 1Þ reflection in Fig. 8. Notable changes in r for u hkl (r) in Fig. 7, marked by hollow black arrows in Figs. 7 and 8, are different to changes in r for the morphologies shown in Fig. 8. There are less abrupt r changes in Fig. 8, suggesting that annealing causes smaller incremental changes in morphology, different from the sudden changes in u hkl (r) (see Fig. 7). However, there are changes in u hkl (r) that cannot be seen in the facet area plots in Fig. 6 or the morphology matrices in Fig. 8, namely around $ 310 C in the ð1 " 1 11Þ reflection in Fig. 7. Changes in strain that cannot be explained by changes in morphology can be examined directly in the next section.

Average lattice strain in regions of interest
We will now consider the average strain within particular regions of the crystal, illustrating key differences in the local lattice environment. The average lattice strain for a reflection was computed by calculating the strain for each voxel using equation (4)  Reflection-specific r matrices between u hkl (r) for different temperatures. The difference in r values corresponds to structural evolution. The (002) reflection for crystal A shows an abrupt r change after 410 C, suggesting the abrupt removal of most defects. This is less evident in the ð11 " 1 1Þ reflection for crystal B, which shows many subtle structural changes as a function of temperature. The red dashed lines indicate where the temperature sampling changed. Black arrows represent the most noticeable changes in displacement.

Figure 8
Reflection-specific r matrices for the morphology at different temperatures. The difference in r values corresponds to morphology evolution. There is a more gradual r transition as the temperature increases compared with Fig. 7. The red dashed lines indicate where the temperature sampling changed. Black arrows represent the most noticeable changes in displacement as observed in Fig. 7. electron density magnitude greater than 0.30. Each crystal has been divided into four ROIs, shown in Fig. 9, according to how the Ga beam has interacted with the sample. The ROIs are labelled glancing, normal, corner and bulk. The glancing ROI is defined as 100 nm (20 voxels) from the surface of the milled face where the Ga beam impinged on the sample at glancing incidence. Although the FIB milling was intended to be normal to the substrate, the milled face is $ 80 from the local sample surface normal. This is caused by the tail of the Gaussian-like FIB probe profile not being able to fully reach the bottom of the crystal. The normal ROI is 100 nm from the top of the crystal, corresponding to the region where the FIB beam arrives approximately normal to the sample surface. The corner ROI is the volume that joins the glancing and normal regions. Previously the corner was seen to have the most defects (Hofmann et al., 2018). The bulk ROI is the remaining part of the crystal. The average lattice strain for the different ROIs at every temperature point is shown in Fig. 9.
In Fig. 9, the strain within the bulk ROI remained approximately zero for all reflections and temperatures because no FIB-induced strain was present prior to annealing. The room temperature data are similar to the values reported previously (Hofmann et al., 2018). As the temperature increases, we see that FIB damage is removed, and the average strain converges to zero. We observe that the glancing and normal ROIs behave similarly regardless of reflection, with the normal ROI having more compressive strain than the glancing ROI. This suggests that the FIB tail imparts more damage to the top face of the crystal than does glancing incidence milling to the milled face, in agreement with previous work (Hofmann et al., 2017a(Hofmann et al., , 2018. The most reflection-dependent ROI is the corner, where both the average magnitude and the sign of strain vary. For the corner ROI in crystal A, the (002) reflection shows tensile strain whereas the ð1 " 1 11Þ reflection shows compressive strain of similar average magnitude for the same crystal. The average strain magnitude can be dependent on the reflection. This is observed in the corner ROI for crystal B at room temperature, where the (200) reflection has nearly twice the average strain magnitude of the ð11 " 1 1Þ reflection. These significant differences would not be evident from single reflection BCDI experiments.
The average strain curves approach zero at $ 410 C in Fig. 9. This is above the Tammann temperature (327 C) and matches the temperature where facet change is observed for crystal A in Fig. 6 and where structural changes occur for the (002) reflection for crystal A in Fig. 7. Above $410 C there is little strain evolution, indicating that most of the damage in the crystal has been annealed out. Further evidence for this transition point can be seen in the standard deviation magnitudes of Fig. 9. Below $ 410 C, the standard deviation magnitudes for the glancing, normal and corner ROIs (plotted in Appendix F) are greater than that of the bulk ROI. Above $ 410 C, the standard deviations across all ROIs are similar, indicating that the average strain across all ROIs has become equally homogeneous. The removal of strain inside the crystals can also be seen by comparing the maximum intensity slices of the CXDPs in Appendix G and noting the change in fringe sharpness before and after annealing. The evolution of these CXDP slices can be seen in supplementary videos SV4 and SV5.
We also note that the differences in the rate of average strain removal seem to depend on the severity of the initial FIB damage. It appears that having a higher initial average strain magnitude leads to a greater initial change in average strain. This is most apparent when comparing the rate of average strain change in the corner, glancing and normal ROIs for any reflection, as well as solely the corner ROIs in crystal B.

Analysis technique comparisons
It is interesting to compare information extracted from the facet area plots, r matrices and average strain plots. While we see that the facet area plots and displacement r matrices can highlight distinct transition points, only major changes can be confidently identified. In particular, crystal transitions can be readily identified in the facet area plots and displacement r matrices but remain harder to resolve when observing average strain plots and morphology r matrices. The primary advantage of the average strain plots over the consideration of r matrices is the ability to identify the magnitude and the direction of strains in various ROIs, which can confirm whether the FIB-induced strain has indeed been removed.  Average lattice strain in different ROIs as a function of temperature. Vertical bars correspond to the standard deviation of the strain. Over the annealing cycle, the average strain in each reflection gradually decreases and stagnates after $ 410 C, as does the magnitude of the standard deviation. The magnitude and direction of the average strain is reflectiondependent, especially in the corner ROIs. The coordinate axes are positioned in sample space and plotted with a length of 250 nm. The red dashed lines indicate where the temperature sampling changed. The rendered crystals show the locations of the ROIs.
The seemingly abrupt structural evolution in the facet area plots and displacement r matrices contrasts the more uniform rate of strain change observed in the average strain plots and morphology r matrices. The facet area plots and displacement r matrices portray annealing as a process controlled by sudden substantial changes, implying a rapid evolution in morphology and removal of strain after a certain temperature is reached, as shown by the formation of facets in Fig. 6 and the r for u hkl (r) in Fig. 7. For the same reflection in the morphology r matrices in Fig. 8 and in the average strain plots in Fig. 9, annealing appears as a gradual process, by which the change in temperature leads to a progressive change in lattice relaxation and facet edge softening. The trench-like dislocations observed in Fig. 4 gradually decrease in size but also fully disappear once certain temperatures are reached, seen in supplementary video SV2, exhibiting both gradual and sudden changes in crystal structure as a result of annealing.
The accuracy of these observations is limited by our spatial resolution and sampling time. To better resolve defect dynamics, faster scans and higher photon flux are required, which the Advanced Photon Source Upgrade Project promises to deliver. Regardless, the conclusions drawn from each of the analysis techniques are complementary and reveal different aspects of the crystal behaviour, but point towards an annealing temperature of 380-410 C. These methods are suitable for the analysis of individual reflections, but can benefit from the incorporation of multiple reflections, enabling more comprehensive comparisons to be made.

Diffusion considerations
Scan times on the order of minutes for BCDI rocking curves limit fast structural changes from being resolved. However, we are able to capture structural evolution on the timescale of the rocking scans, such as the formation of facets, disappearance of dislocations and relative changes in u hkl (r). These changes can be interpreted in terms of the diffusion of Ga in Au, the selfdiffusion of Au at the surface or within the bulk of the crystal and the escape of dislocations to the free surface. Fig. 10 shows the temperature and time required for diffusion of Ga over lengths from 1 nm to 20 nm, as well as self-diffusion of Au over 1 nm to 100 nm. We use diffusion coefficients for these two systems as they provide an indication of relative atomic mobility at various temperatures. The diffusion coefficient of Ga in Au was obtained from Gupta et al. (1987), while the selfdiffusion of Au was obtained from Makin et al. (1957). We determine the time required for 1 nm of diffusion as a function of temperature, for each scenario, as shown by the exponential curves in Fig. 10. The penetration depth of Ga under the FIB conditions used is $ 20 nm (Hofmann et al., 2018), thus we calculate the time required for a diffusion length of 20 nm as the upper limit of Ga diffusion. Diffusion lengths between 1 and 20 nm are shown as a grey region between the 1 nm and 20 nm curves. Similarly, for the selfdiffusion of Au, diffusion lengths between 1 and 200 nm are relevant, as the greatest change in facet area is about 4000 nm 2 (Fig. 6). Superimposed on this time-temperature plot is the temperature history of the present Au samples (dotted blue line), indicating the time spent at each temperature during the annealing process.
To Fig. 10 we can further add the changes in u hkl (r) crosscorrelation observed as a function of temperature (Fig. 7). From $ 190 C until $ 410 C there is a gradual reduction in the cross-correlation value. Considering the diffusion lengths of Ga and Au, this change at lower temperatures up to $ 280 C is likely to be driven by bulk Ga diffusion and Au surface diffusion. Above this temperature bulk Au self-diffusion may be responsible. At $ 410 C, Fig. 7 shows a rapid change in cross correlation coefficient, suggesting major structural changes as discussed above. The diffusion curves in Fig. 10 suggest that this is associated with the rearrangement of Au rather than Ga atoms.
On Fig. 10 we have superimposed the temperatures at which removal of dislocations is observed (black lines labelled 1 to 4, consistent with dislocation numbers in Fig. 4), as well as the temperatures at which the ð00 " 1 1Þ and ð0 " 1 1 " 1 1Þ facets are formed (green and purple lines, respectively, consistent with Figs. 5 and 6). Apart from the removal of dislocation 1, which is at the The time required for the bulk diffusion of Ga over lengths from 1 to 20 nm (light grey region) and Au diffusion over distances from 1 to 200 nm (dark yellow region) throughout the annealing. Superimposed are temperature points where dislocations in Fig. 4 disappeared, temperature points where facets have formed in Fig. 6, and temperature regions where the u hkl (r) r values changed noticeably (see Fig. 7). The dotted blue line shows the time-temperature trajectory of the Au sample in this study, indicating the time spent at each annealing temperature. The red dashed lines indicate where the temperature sampling changed. overlap between Ga diffusion and Au diffusion dominated areas, all other structural changes appear to be driven by Au migration.

Conclusion
We have presented an in situ BCDI study of the annealing of FIB-induced damage in Au microcrystals. Two separate crystals with two reflections each were measured, confidently switching between reflections and samples, during an annealing cycle. By tracking the change in detector position, we could use the thermal strain of the microcrystals for temperature calibration. We have also presented a new approach that monitors the reduction of free surface energy by following morphology evolution through the formation of facets. The annealing process was analysed using facet areas, cross-correlation matrices and average strain plots, which provide complementary information. Surprisingly, two different reflections from the same crystal can show different behaviour. This highlights the need to measure multiple reflections in order to gain a complete picture of sample evolution. Full annealing was achieved at a temperature of 380-410 C. However, the complexity of the process becomes apparent when trying to evaluate the rate of strain removal, as the facet area plots and displacement r matrices portray annealing as an abrupt process, while the morphology r matrices and average strain plots show much more gradual changes. The gentle evolution of the crystal below $ 280 C is likely the result of bulk Ga diffusion and Au surface diffusion whilst more substantial changes (i.e. removal of dislocations and formation of facets) above $ 280 C are likely dominated by the self-diffusion of Au. This experiment demonstrates that annealing is a viable option for the removal of FIB damage as evident by a decrease in strain heterogeneity inside the crystal, removal of defects on the crystal surface and reduction of mean strain in FIB-damaged areas. Annealing can thus be used as a method to remove FIB-induced sample damage prior to further modification of a sample, e.g. nanoindentation, bending etc.
We anticipate that the techniques developed here could be used to pioneer novel in situ BCDI measurements in complex environments for multiple samples and reflections simultaneously. The processed diffraction patterns, final reconstructions and data analysis scripts are publicly available at: https:// www.doi.org/10.5281/zenodo.4423216.
APPENDIX A 34-ID-C heater cell Fig. 11(a) shows the heater within a furnace enclosure. Fig. 11(b) shows a rendering of the enclosure cover, consisting of a stainless-steel cover plate attached to a base using stainless-steel threaded rods and nuts. Only two rods were used to minimize the obstruction of incident and reflected X-rays. The circular hole in the plate was covered with a quartz window to allow observation of the sample with a confocal microscope with a 5Â objective lens during the annealing experiment.
The sides of the furnace enclosure cover were covered with metalized Kapton (not shown) to allow for transmission of X-rays and favourable thermal transport for cooling of the film.

APPENDIX B Effect of seeding on the retrieved electron density
This section addresses how the seeding of the phase retrieval algorithm influences the final object's amplitude and strain. For a CXDP at an arbitrary temperature, we consider the following options: (1) Seeding with the reconstruction from the temperature step immediately below the current temperature, except if the current temperature is 23 C, in which case a random guess is used.
(2) Seeding with the reconstruction from the temperature step immediately above the current temperature, except if the current temperature is 587 C, in which case a random guess is used.
(3) Seeding with a random guess regardless of the current temperature.
A simpler phase retrieval algorithm compared with the one listed in Appendix C was implemented to exaggerate the differences in the final reconstructions. A pattern of 20 error reduction (ER) and 180 hybrid input-output (HIO) iterations was repeated three times followed by 20 ER iterations, for a total of 620 iterations. This algorithm was applied to each CXDP padded to a size of 256 Â 256 Â 176 voxels. After phase retrieval, each object was mapped into orthogonal sample space and the strain was calculated using equation (4) and the procedure found at the end of Appendix C.
To compute the error between two reconstructions generated using two different seeding approaches, we sum the difference between the two reconstructions for each voxel, n, and normalize it over the union of the morphologies (created using an amplitude threshold of 0.30) for that particular reflection and temperature. This yields equations (6) and (7) for the strain error and amplitude error, respectively,  (a) The sample clipped in the heater cell as seen through the heater enclosure window. Note that the thermocouple is attached to the clip, which contacts the silicon substrate. This results in thermal resistance between the Au crystals and the thermocouple, causing the discrepancy between the measured and actual temperature of the sample. (b) A rendering of the furnace enclosure cover. The scale bar corresponds to 20 mm.

Mask
; ð6Þ where seeds a and b are any two of the three seeding scenarios listed previously. Fig. 12 shows how the strain and amplitude for reconstructions generated using each seeding variable compare.
In Fig. 12 we observe that no two seeds generate reconstructions that are exactly the same, which would otherwise be represented by a line with negligible differences. Spikes on the plots point out that at least one reconstruction did not converge as well as the others. At temperatures where all error comparison lines overlap, the reconstructions are equally different from each other. The average strain error is $ 2 Â 10 À4 , which agrees well with the uncertainty seen in previous studies (Hofmann et al., 2017a(Hofmann et al., , 2018. The red lines in Fig. 12 represent the error between between the two non-random seeds, and are in general lower than the error between either seed and the random guess. This shows that phasing with a seed generates reconstructions that converge more rapidly, compared with phasing with a random guess. However, we cannot conclude whether phasing with a reconstruction from the next or previous temperature step yields a more accurate result. Thus, we decided for each reconstruction to be seeded with itself at the same temperature from the previous phasing round (except for the first round, where a random guess was used for all temperatures), instead of seeding with a reconstruction at a different temperature in the same round as explained in Section 2.3.

APPENDIX C Phase retrieval
The reconstruction process for every CXDP was executed in four stages, similar to the approach used by Hofmann et al. (2020), using the output from the previous stage to seed the next phasing stage (listed below). Note the (002) reflection for crystal A and (200) and ð11 " 1 1Þ reflections for crystal B at room temperature were padded to a size of 256 Â 256 Â 176 voxels to make them consistent with the other CXDPs in the study.
(1) Each CXDP was seeded with a random guess. A guided phasing approach with 40 individuals and four generations was used (Chen et al., 2007). The first and second generations used low resolution data while the remaining generations used full resolution data. For each generation, a block of 20 ER and 180 HIO iterations, with = 0.9, was repeated three times. This was followed by 20 ER iterations, which were averaged to return the final object. The best reconstruction was determined using a sharpness criterion, as it is the most appropriate metric for crystals containing defects Ulvestad et al., 2017). The shrinkwrap algorithm (Marchesini et al., 2003) was used to periodically update the real-space support.
(2) The reconstruction was seeded with the output from stage 1. This stage was identical to the previous except now we account for the longitudinal and transverse partial coherence (Clark et al., 2012) using the Richardson-Lucy deconvolution algorithm.
(3) The reconstruction was seeded with the output from stage 2. A block of 20 ER and 180 HIO iterations was repeated 15 times, followed by 1000 iterations of ER. The final 50 ER iterations were averaged to produce the final output. The same partial coherence settings in stage 2 were included, but guided phasing was omitted.

Figure 12
The amplitude and strain error, computed using equations (6) and (7), respectively, between reconstructions obtained using different seeding approaches. Each line represents the error between any two of the three seeding variables. The red error line has the lowest error on average. The large error spikes are the result of poorly converged solutions. The red dashed lines indicate where the temperature sampling changed.
(4) Stage 3 was repeated, using the output from stage 3 as the seed.
Next, phase offsets of 0, À=2 and =2 were applied to the electron density for each reconstruction and the resulting phases outside À to were returned to this range by adding or subtracting 2. The resulting reconstructions for each of the three offsets were transformed from detector conjugated space to orthogonal sample space with a voxel size of 5 nm Â 5 nm Â 5 nm. Phase ramps were eliminated by centring the Fourier transform of the complex electron density. This set of phase offset data was differentiated and the minimum gradient for each voxel was used to calculate the strain, preserving its sign, to avoid discontinuities which otherwise arise at dislocation cores .

APPENDIX D Spatial resolution
We note that the spatial resolution is dependent on the measurement directions in reciprocal space and the geometry of the sample. The spatial resolution was calculated by considering two line profiles that cross the air-sample interface for each reflection: one normal to the top face and the other normal to the milled face. The spatial resolution was determined by differentiating the profiles and fitting the resulting peak with a Gaussian. The average 2 of the fitted Gaussian at each temperature step is reported as the spatial resolution. A plot of the spatial resolution versus temperature is shown in Fig. 13.

APPENDIX E Dislocations in crystal B, (200) reflection
The phase for crystal B's 200 reflection at room temperature is shown in Fig. 14. Vortex-like phase features that resemble dislocations are highlighted. These features are present in the trench-like regions shown in Fig. 4.

APPENDIX F Standard deviation of average strain
The standard deviation of the strain for a particular ROI provides information about strain heterogeneity within the ROI. This can be used to evaluate the extent of annealing, whereby a lowered standard deviation corresponds to a more relaxed crystal lattice. The strain standard deviation versus temperature for all ROIs is plotted in Fig. 15.

APPENDIX G CXDP comparison
Differences in the collected CXDPs at different temperatures show evidence of structural change. The asymmetry in the Bragg peak is indicative of strain within the crystal lattice. A comparison of the CXDPs at 23 C and 587 C is shown in Fig. 16. Spatial resolutions with respect to temperature for each reflection. The overall average for each crystal is the mean of the point averages across all temperatures. The spatial resolution for this experiment, 23 nm, is the overall average for all reflections. The red dashed lines indicate where the temperature sampling changed.

Figure 14
A phase isosurface rendering of crystal B's 200 reflection at room temperature, showing phase vortices reminiscent of dislocations marked by black arrows. The coordinate axes are positioned in sample space and plotted with a length of 200 nm. Here the amplitude threshold is 0.04 and no phase unwrapping was performed.

Figure 15
Standard deviation of strain for different ROIs at each temperature point. As annealing proceeds, the standard deviation follows a decreasing trend in all ROIs, which shows a reduction in strain heterogeneity across all reflections. After $ 410 C, all standard deviation values are fairly constant, suggesting that FIB-induced strain has been removed.

Figure 16
Central slice of the unprocessed CXDPs at the lowest and highest temperatures for each reflection. The asymmetry in the CXDP slices before annealing indicates a high degree of strain. This strain is alleviated after heat treatment, which is demonstrated by the centrosymmetric fringes at 587 C. The evolution of the raw CXDPs for each reflection during heat treatment can be seen in supplementary videos SV4 and SV5.