# Soft X-ray spectro-ptychography of boron nitride nanobamboos, carbon nanotubes and permalloy nanorods

Jaianth Vijayakumar, Hao Yuan, Nicolas Mille, Stefan Stanescu, Sufal Swaraj, Vincent Favre-Nicolin, Ebrahim Najafi, Adam P Hitchcock, Rachid Belkhou

<figure><img src="image_1.png" /></figure>

## To cite this version:

Jaianth Vijayakumar, Hao Yuan, Nicolas Mille, Stefan Stanescu, Sufal Swaraj, et al., Soft X-ray spectro-ptychography of boron nitride nanobamboos, carbon nanotubes and permalloy nanorods. Journal of Synchrotron Radiation, 2023, 30 (4), pp.746 - 757. 10.1107/s1600577523003399. hal-05095426

HAL Id: hal-05095426

https://cnrs.hal.science/hal-05095426v1

Submitted on 3 Jun 2025

HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
<figure><img src="image_3.png" /></figure>

<figure><img src="image_4.png" /></figure>

# Soft X-ray spectro-ptychography of boron nitride nanobamboos, carbon nanotubes and permalloy nanorods

Jaianth Vijayakumar,<sup>a*‡</sup> Hao Yuan,<sup>b,c</sup> Nicolas Mille,<sup>a</sup> Stefan Stanescu,<sup>a</sup> Sufal Swaraj,<sup>a</sup> Vincent Favre-Nicolin,<sup>d,e</sup> Ebrahim Najafi,<sup>f</sup> Adam P. Hitchcock<sup>b</sup> and Rachid Belkhou<sup>a*</sup>

Received 23 October 2022

Accepted 13 April 2023

Edited by A. Momose, Tohoku University, Japan

‡ Present address: Centre for X-ray Tomography
– UGCT, Ghent University, Proeftuinstraat
86/N3, 9000 Gent, Belgium.

**Keywords:** soft X-ray ptychography;
ptychography reconstruction; nanostructures;
nanomaterials.

**Supporting information:** this article has
supporting information at journals.iucr.org/s

Spectro-ptychography offers improved spatial resolution and additional phase spectral information relative to that provided by scanning transmission X-ray microscopes. However, carrying out ptychography at the lower range of soft X-ray energies (e.g. below 200 eV to 600 eV) on samples with weakly scattering signals can be challenging. Here, results of soft X-ray spectro-ptychography at energies as low as 180 eV are presented, and its capabilities are illustrated with results from permalloy nanorods (Fe 2p), carbon nanotubes (C 1s) and boron nitride bamboo nanostructures (B 1s, N 1s). The optimization of low-energy X-ray spectro-ptychography is described and important challenges associated with measurement approaches, reconstruction algorithms and their effects on the reconstructed images are discussed. A method for evaluating the increase in radiation dose when using overlapping sampling is presented.

## 1. Introduction

The increasing availability of high flux of coherent X-rays at third- and fourth-generation synchrotron light sources and X-ray free-electron lasers has led to greater use of coherence enhanced microscopies, such as coherent diffraction imaging (CDI) and ptychography (Pfeiffer, 2018). Ptychography is an extension of scanning transmission X-ray microscopy (STXM) which can provide better spatial resolution than conventional STXM (Hitchcock, 2015). Ultimately, it is expected that a fully optimized source, beamline optics and STXM/ptychography instrument will lead to an ultimate spatial resolution given by the diffraction limit at the X-ray wavelength used (~λ/2). In STXM, the integrated flux of X-rays transmitted through a raster-scanned sample is used to generate images. Sequences of such images, measured over a range of photon energies and photon polarizations, can be analyzed to reveal the spatially resolved chemical, electronic and geometric or magnetic orientational properties of the sample (Hitchcock, 2015). The spatial resolution of a conventional STXM is typically around 30 nm in current instruments, and depends on the properties of the Fresnel zone plate focusing optics, precision of scanning stages, mechanical stability and X-ray beam stability. The ptychography extension of STXM involves replacing the single-channel integrating detector with a 2D detector (camera), which is used to measure the coherent scattering/diffraction (Edo *et al.*, 2013) of the transmitted X-rays in the

<figure><img src="image_5.png" /></figure>

<figure><img src="image_6.png" /></figure>

OPEN ACCESS

Published under a CC BY 4.0 licence

<footnote><sup>a</sup>Synchrotron SOLEIL, L'Orme des Merisiers, BP 48, Saint-Aubin, 91192 Gif-sur-Yvette Cedex, France,</footnote>

<footnote><sup>b</sup>Department of Electrical and Computer Engineering, University of Victoria, Victoria, BC, Canada V8W 2Y2,</footnote>

<footnote><sup>c</sup>Department of Chemistry and Chemical Biology, McMaster University, Hamilton, Canada L8S 4M1,</footnote>

<footnote><sup>d</sup>ESRF – The European Synchrotron, 71 Avenue des Martyrs, 38000 Grenoble, France, <sup>e</sup>Université Grenoble</footnote>

<footnote>Alpes, Grenoble, France, and <sup>f</sup>The Chemours Company, Wilmington, DE 19899, USA.</footnote>

<footnote>*Correspondence e-mail: cptjaianth@gmail.com, rachid.belkhou@synchrotron-soleil.fr</footnote>
far field. A set of such images measured at positions where the spots overlap is then reconstructed using computational algorithms to form amplitude and phase images of the sample and the X-ray probe at the sample (Fienup, 1982; Dierolf et al., 2010a; Pfeiffer, 2018; Rodenburg & Maiden, 2019; Maiden et al., 2013).

Ptychographic reconstruction enhances spatial resolution relative to that achieved by a STXM measurement using the same zone plate, with full focus. Until now, soft X-ray ptychography has been carried out on synthetic (Shi et al., 2016; Shapiro et al., 2017; Wang et al., 2017a; Li et al., 2019; Gräfe et al., 2020) and biologically generated (Zhu et al., 2016) magnetic materials, fuel cells (Wu et al., 2018), catalyst particles (Wise et al., 2016), lithium battery materials (Yu et al., 2015, 2018; Shapiro et al., 2014; Sun et al., 2021), nanocomposites (Yuan et al., 2021; Bozzini et al., 2017), cement materials (calcium silicate hydrates) (Bae et al., 2015), diatoms (Rose et al., 2015; Giewekemeyer et al., 2011), fibroblast cells (Rose et al., 2018), organic thin films (Savikhin et al., 2019) and carbon nanotubes (Mille et al., 2022). Prior to the development of the HERMES low-energy ptychography capability (Mille et al., 2022), synchrotron-based ptychography at X-ray energies below 500 eV had not been reported, mainly due to limitations of the cameras used. In particular, measuring low-energy X-ray signals using a charge-coupled device (CCD) is challenging, due in part to their reduced sensitivity below 500 eV, and in part to slow image transfer times. Hence, characterizing organic samples by spectro-ptychography at the C 1s (K) edge, O 1s (K-edge) or N 1s (K-edge) is difficult. Carbon K-edge ptychography was only recently demonstrated for the first time (Mille et al., 2022). Examples of non-resonant ptychographic imaging of organic materials performed at X-ray energies higher than 500 eV were reported (Rose et al., 2015, 2018; Giewekemeyer et al., 2011; Savikhin et al., 2019; Beckers et al., 2011; Jones et al., 2014b). A recently developed, uncoated, scientific complementary metal-oxide-semiconductor (sCMOS) sensor has excellent performance over the soft X-ray energy range (100–2000 eV), high quantum efficiency, low background and fast data transfer (40 frames s⁻¹ at the full size of the sensor – 2048 × 2048 pixels). An extensive description of the detector (Desjardins et al., 2020) and results of proof-of-principle ptychography experiments at the C 1s edge (Mille et al., 2022) have been reported elsewhere.

Motivated by the availability of a suitable soft X-ray camera and ptychography processing capabilities, a soft X-ray ptychography setup was developed at the STXM endstation of the HERMES beamline at Synchrotron SOLEIL (Belkhou et al., 2015). Ptychography capabilities strongly rely on the properties of the instrument, sample and the employed methodology. For example, a high-resolution image can be reconstructed from a sample which scatters (diffracts) partially or fully coherent X-rays over large scattering angles [i.e. out to large values of the elastic X-ray scattering vector, **q**, where **q** = (4π/λ)sinΘ, λ is the X-ray wavelength and Θ is the scattering angle]. Methodology optimization may include: spot size, overlap between measured points, sampling pattern,

exposure time, and method of subtracting background signal. Most of these factors are known and their optimization has been addressed elsewhere (Edo et al., 2013; Mille et al., 2022; Batey et al., 2014; Bunk et al., 2008; Huang et al., 2017; Liu et al., 2013; Wang et al., 2017b; Dierolf et al., 2010b). Additional factors become important when measuring radiation-sensitive samples, such as organic polymers and biological samples. In such cases trade-offs are necessary to achieve an optimal ptychography measurement, while at the same time maintaining a sufficiently low dose that the results can be attributed to the original material, and not radiation damage products (Wang et al., 2009; Jones et al., 2014a). This can be achieved by a combination of reduced exposure time, reduced beam intensity and using a defocused probe beam. However, these approaches may reduce the signal-to-noise ratio which can potentially reduce the quality and spatial resolution of the reconstruction. Hence, one must optimize these parameters such that an efficient ptychography measurement can be performed within an acceptable dose.

Here we identify different measurement and reconstruction parameters to be taken into consideration to perform efficient and successful soft X-ray ptychography for a variety of samples. We describe different criteria based on the results from soft X-ray ptychography on carbon nanotubes (CNTs), boron nitride (BN) nanobamboo structures and permalloy nanowires; the former two scatter relatively less compared with the latter. We characterize the chemical, physical and electronic properties of these samples based on the microscopy and spectroscopy data obtained from the ptychography measurements. These samples were chosen to cover the following soft X-ray absorption edges: boron 1s (K-edge, 185–220 eV), carbon 1s (K-edge, 280–315 eV), nitrogen 1s (K-edge, 395–420 eV) and iron 2p (L₂,₃-edges, 700–730 eV). In addition, since the soft X-ray range below 500 eV is of interest for measuring radiation-sensitive materials such as polymers and biological samples, we describe the ptychography measurement parameters which affect the radiation dose delivered to the sample, and provide an approach to quantitatively estimate that dose. To the best of our knowledge, the B 1s edge results reported here are the lowest-energy spectro-ptychography measurements to date using synchrotron X-rays. These capabilities complement laser-based, higher harmonic generation ptychography at still lower energies (Zhang et al., 2015; Loetgering et al., 2022).

## 2. Samples

### 2.1. Carbon nanotubes

Ptychography was measured from two different CNT samples. CNT#1 consisted of bundles of single-walled CNTs, prepared by a two-stage laser method (Kingston et al., 2004). It was the subject of an extensive study for its chemical functionalization using STXM, Raman spectroscopy, thermal analysis and other methods (Najafi et al., 2010). Sample CNT#2 was arc discharge multi-walled CNTs, purchased from Sigma Aldrich and used without further thermal or chemical
treatments. Both samples were dispersed in ethanol (Najafi *et al.*, 2008) and sonicated for 30 s to ensure sufficient dispersity without inducing structural damage to the tubes. The nanotube diameters range from 100 to 200 nm, with lengths of the order of 5–10 µm. They were then drop cast onto a formvar-coated grid (CNT#1, measured December 2020) or a 5 nm-thick $Si_3N_x$ membrane (CNT#2, measured June 2021), and heated at 50°C under vacuum at $10^{-3}$ mbar for 8–10 h to remove residual solvent.

## 2.2. Boron nitride nanostructures

The boron nitride nanobamboo (BNB) structures were prepared by ball milling of elemental boron and $LiO_2$ in $NH_3$ gas, followed by thermal annealing on a stainless steel substrate (Li *et al.*, 2010). Their diameter was typically 100 nm (Krüger *et al.*, 2020). The resultant boron nitride nanobamboo structures were scraped from the substrate directly onto a transmission electron microscopy (TEM) grid covered with lacy carbon (Dai *et al.*, 2011).

## 2.3. Permalloy nanorods

The permalloy nanorods were prepared at room temperature by pulsed electrochemical deposition. Details of the procedure are presented elsewhere (Ruiz-Gómez *et al.*, 2018). The synthesized permalloy nanorods have diameters between 100 and 150 nm and were dispersed in ethanol (99.5% vol). Samples were prepared by drop casting on $Si_3N_x$ membranes.

## 2.4. Characterization techniques

Both STXM and ptychography were measured on the same areas in order to investigate the relative merits of these methods. For ptychography the single-channel STXM detector was replaced with a soft X-ray sensitive camera (a customized Tucsen Dhyana 95 sCMOS camera). An uncoated sensor was used for the studies below 500 eV, while a coated sensor was used for studies above 500 eV. Further details of the sensors are given elsewhere (Desjardins *et al.*, 2020). First the sample was imaged using the STXM configuration during which images and multi-energy image sequences (stacks) were recorded to identify the resonant energies and coordinates of the regions of interest. Then the phosphor/PMT detector used for STXM was replaced by the Dhyana camera and a suitable filter (Mille *et al.*, 2022). The Dhyana camera was operated with 100 ms dwell for each diffraction image to obtain a consistent signal-to-noise ratio (recently upgraded Dhyana cameras are able to operate at least two times faster). For every ptychographic image [which was derived from a set of diffraction images (DIs) measured with overlapping beam spots] the dark signal (average of 25 camera images measured without X-rays) was subtracted from each DI. The typical dark signal, averaged over the full camera image, was 2000 counts $s^{-1}$ – about 3% of the 16-bit dynamic range. More typically, lower intensities were used to limit radiation dose and exposures were 100 ms. An example of signal and background camera images from a 1.0 mm defocused measurement of BNB is presented in Section SI-1 and Fig. S1 of the

supporting information (SI). For stack measurements (multi-energy imaging) only one dark image was acquired and used for the whole stack. For STXM the fully focused beam was used (in this work the full-focus probe was a 62 nm-diameter spot generated by a zone plate with outer zone width of 50 nm). For most of the ptychography measurements, the sample or the zone plate was shifted away from the in-focus position along the X-ray propagation axis in order to measure ptychography using a defocused spot. For the 1 µm spot used in this work, the illumination was an annulus with outer diameter of 1 µm and inner diameter of 0.3 µm at the sample.

The HERMES beamline consists of two APPLE II undulators which provide linear vertical (LV) and linear horizontal (LH) polarized X-rays for X-ray linear dichroism (XLD) studies, and circular left (CL) and circular right (CR) polarized light for X-ray magnetic circular dichroism (XMCD) studies. For XLD and XMCD characterization, images with LH and LV (or CR and CL) were acquired separately. After ptychographic reconstruction, the amplitude and phase images were aligned to correct for the drift. The amplitude images were converted to optical density (OD) using the $I_o$ signal from a region of the amplitude images without the sample. The final dichroic images were calculated as the difference between OD images of (LV – LH) for XLD and (CL – CR) for XMCD. XLD provides information on the asymmetric geometry of a sample through its effect on the intensities of specific electronic transitions (Ade & Hsiao, 1993). XMCD provides information on the local magnetization of the ferromagnetic material (Stöhr, 1999). Polarization-dependent characterization of the XLD of CNT and BN can be used to identify point defects and local electronic properties of the material, which are of potential interest in electronic device applications (Felten *et al.*, 2010; Dai, 2002; Chopra *et al.*, 1995). XMCD is an important characterization technique in magnetism and magnetic storage devices as it can be used to quantify the magnitude of the local spin and orbital moment (Avula *et al.*, 2018) and measure the properties of ferromagnetic domains and domain walls (Vijayakumar *et al.*, 2019, 2020). Ptychography reconstruction was performed using *Python tools for Nano-structures Xtallography (PyNX)* (Favre-Nicolin *et al.*, 2020, 2011; Mandula *et al.*, 2016). *PyNX* offers several complementary reconstruction algorithms including alternate projection (AP) (Marchesini *et al.*, 2016), difference map (DM) (Thibault *et al.*, 2009) and maximum-likelihood (ML) methods (Odstrcil *et al.*, 2018; Thibault & Guizar-Sicairos, 2012). Table S1 summarizes the experimental acquisition and *PyNX* reconstruction parameters used to obtain the results presented in this work.

# 3. Results

## 3.1. Carbon nanotubes

Since the results for the two carbon nanotube (CNT) samples are similar to those reported earlier (Mille *et al.*, 2022), we present those results in the SI. In addition, since a detailed description of the ptychography and XLD of a single-
walled CNT has already been given by Mille *et al.* (2022), we present here the XLD data of a multiwalled CNT. Figure S2(a) shows a STXM image of the CNT#1 sample measured at 350 eV using a 25 nm outer-diameter zone plate. Figure S2(b) shows the amplitude and Fig. S2(c) shows the phase ptychography image, reconstructed from a set of DIs recorded with a 1 µm spot size at 285.2 eV using linear horizontal (LH) polarized light. The dark square in the upper right corner of the ptychography images is carbon build-up from an earlier ptychography measurement using a focused spot. The contrast in the phase image is enhanced compared with that of the amplitude image. One can distinguish overlapping CNTs due to the strong phase contrast at the edges of the CNT. Figures S2(d) and S2(e) show ptychography absorption images of CNT#2, measured at 285.2 eV with LV and LH polarization, respectively. Figure S2(f) is the XLD map, obtained as the difference of the ptychography images shown in Figs. S2(d) and S2(e). In the (LV - LH) XLD map, CNTs with horizontal orientation have white contrast while those with vertical orientation have dark contrast. The XLD contrast of a CNT is strongest at the C 1s → π* transition at 285.2 eV, which has highest intensity when the X-ray polarization is perpendicular to the long axis of the CNT, consistent with the contrast in Fig. S2(f). There is also considerable XLD contrast at the C 1s → σ* transition at 293 eV, which has highest intensity when the X-ray polarization is parallel to the long axis of the CNT (Medjo *et al.*, 2009; Schiessling *et al.*, 2003). The C 1s absorption spectra of CNT#2 measured with LH and LV polarization, and an alternate presentation of the XLD mapping of by spectro-ptychography, are presented in Section SI-3 and Fig. S3.

## 3.2. Boron nitride nanobamboo structures

The structure of BN nanobamboo (BNB) is more complex than that of CNTs. Figure 1(a) shows a bright-field TEM image of the BN nanobamboo structures. The characteristic bamboo structure is a result of the ball-milling process where the nano-sheets take a conical shape in each sub-unit/element of the bamboo structure and subsequent sections are formed on top of the conical structure, resulting in a long chain of the bamboo-like structure. Figure 1(b) shows a zoomed-in TEM image of two panes for better visualization of the sheet alignment. The sheets are aligned vertically at the edges but are bent horizontally at the interface between two bamboo elements, as highlighted by the dotted line in Fig. 1(b) (Terrones *et al.*, 2007). The thickness of the BN in the horizontal region (marked by the dotted line) in the long axis direction is 25–30 nm, while the thickness on the sides along the long axis is 16–40 nm. The orientation of these nanobamboo structures relative to the X-ray polarization direction gives rise to the XLD effect. The total thickness of the nanobamboo is 80–120 nm.

Figure 1(c) shows an STXM transmission image of BN nanobamboo measured with the 50 nm zone plate in focus at 192.0 eV with LH polarization. This STXM image was measured using the camera, with a step size of 20 nm in an

area of 2 µm × 2 µm. The camera images were later integrated to form the STXM image. This approach resulted in an image similar to that measured by STXM using a single-point detector. The STXM image shows the nanobamboo structure as a series of black dots along the length of the nanobamboo, and the edges not resolved. Figure 1(d) shows the reconstructed ptychography amplitude image while Fig. 1(e) shows the phase image of the same area, from a data set recorded at the B 1s → π* transition at 192.0 eV. It is noteworthy that BN nanobamboo sheets are better resolved in the phase images than in the amplitude image [see yellow arrows in Figs. 1(d) and 1(e)]. In particular, the central low-density region is clearly differentiated from the denser border structures in the phase image.

Figures 2(a) and 2(c) show the B 1s and N 1s absorption spectra of BN nanobamboo, measured by spectro-ptychography. The ptychography data sets were measured as a function of different photon energies, first with LH polarization, then LV polarization. The absorption spectra were extracted from the image pixels of the central regions of vertical and horizontally aligned nanobamboo structures. The spectra presented in Figs. 2(a) and 2(c) were extracted only from the stack measured with LH polarization. The green and blue spectra were taken from the pixels of the green and blue regions of the nanobamboos in Figs. 2(b) and 2(d), respec-

<figure><img src="image_7.png" /><figcaption>Figure 1</figcaption></figure>

Comparison of TEM, STXM and ptychography imaging of BN nanobamboo. (a) TEM image of the BN nanobamboo structure. (b) Zoomed-in image of the interface between two panes of the bamboo structure. The dashed line indicates the region where the sheets are aligned perpendicular to the long axis. [Panels (a) and (b) are courtesy of C. Bittencourt.] (c) STXM image of BN nanobamboo structure at 192.0 eV, LH polarization. (d) Ptychography amplitude image of the same BN nanobamboo structure as in (c) (E = 192.0 eV, LH polarization). The yellow ‘X’ marks where the DI presented in Fig. S6 was measured. (e) Phase image of the same area as in (d), derived from the same ptychography data. The yellow arrow in (d) and (e) highlights the significant differences in the details of the nanobamboo structure between the amplitude and phase image.
<figure><img src="image_8.png" /><figcaption>Figure 2 Spectroscopy and dichroic mapping of the BN nanobamboo sample from spectro-ptychography. (a) B 1s absorption spectra from amplitude ptychography reconstruction. Spectra of vertical (green), horizontal (blue) BN nanobamboo and the lacy carbon support (red) measured with LH polarized light are shown. (b) Chemical and dichroic mapping from fits of the B 1s stack (42 images from 178 to 210 eV) to the spectra in (a) (same color coding). (c) N 1s absorption spectra from amplitude ptychography reconstruction. Spectra of vertical (green), horizontal (blue) BN nanobamboo and the lacy carbon support (red) measured with LH polarized light are shown. (d) Chemical and dichroic mapping from fits of the N 1s stack (43 images from 396 to 428 eV) to the spectra in (c) (same color coding).</figcaption></figure>

tively. The red spectrum in Fig. 2(a) and the red regions in Fig. 2(b) correspond to the lacy carbon support. The B 1s → π* peak at 192 eV is strong in the spectrum recorded with the *E* vector perpendicular to the BNB axis (LV for horizontal BNB, LH for vertical BNB) but has lower intensity in the opposite polarization. The XLD intensity (i.e. the difference between the peak with LH and LV polarization) is ~50% of the peak intensity.

Figure 2(c) shows the N 1s absorption spectrum of BNB obtained from spectro-ptychography data using LH polarization. The blue and green lines shown in the spectra are obtained from the regions highlighted in the same color in Fig. 2(d). The characteristic N 1s → π* absorption peak at 401.3 eV shows an XLD signal of ~30% (Fuentes et al., 2003). Furthermore, the XLD signal in the region of the N 1s → σ* transitions (408–416 eV) is stronger than the XLD signal in the B 1s → σ* transition region (198–202 eV). The relatively weak XLD for the σ* peaks is probably due to the curvature of the bamboo which mixes the σ* and π* levels resulting in higher absorption when X-ray polarization is aligned in the perpendicular direction of the long axis of the BNB. Electronic structure calculations, such as those recently reported for closely related BN nanotube structures (Fuentes et al., 2003; Krüger et al., 2020), are required for a deeper understanding of these spectra and the associated XLD.

<figure><img src="image_9.png" /><figcaption>Figure 3 XLD mapping of BN nanobamboo. (a) XLD image (LV – LH) measured at 192.0 eV, the B 1s → π* transition. (b) B 1s XLD spectra for horizontal and vertical BN nanobamboo. (c) XLD image measured at 401.3 eV, the N 1s → π* transition. (d) N 1s XLD spectra for horizontal and vertical BN nanobamboo. The numbers at the right of each XLD map are the intensity limits (ΔOD).</figcaption></figure>

Figures 3(a)–3(d) present the XLD results for BNB derived from ptychography at the B 1s and N 1s edges, respectively. Here the XLD map (LV – LH) was obtained from the difference in ptychography absorption images measured with LH and LV polarization. One can find in both Figs. 3(a) and 3(c) alternate bright and dark contrast across the bamboo structure. The horizontal BNB has opposite contrast from that of the vertical BNB. The regular distribution of alternating contrast suggests a uniform size distribution of the nano-bamboo sections during the growth process. From the XLD image the individual panes can be identified; these are not as visible in the individual ptychography amplitude images. The XLD contrast appears to originate from the individual panes as single units, which are determined by the orientation of the whole bamboo structure. As shown in Fig. S4, there are rapid changes in contrast in the BN nanobamboo structures as the photon energy is scanned across the B 1s → π* (and N 1s → π*, not shown) peaks. In addition, there is a shoulder on the high-energy side of each π* peak, which has different XLD properties from that of the main peak. The origin of these spectral details requires additional studies using quantum mechanical calculations like those reported for BN nanotubes (Fuentes et al., 2003; Krüger et al., 2020), and will not be discussed further here.

### 3.3. Permalloy nanorods

Magnetic materials with 3D structures such as permalloy nanorods are of potential interest for their capability to
stabilize topological magnetic spin structures. Figure 4(a) shows the reconstructed ptychography amplitude image of permalloy (Ni₈₁Fe₁₉) nanorods acquired with CL polarization, at a photon energy of 706 eV (Fe 2p₃/₂ peak). Figure 4(b) is the reconstructed ptychography phase image. From the amplitude image one can observe spacings of 20–30 nm between adjacent nanorods [examples indicated by the circles in Fig. 4(a)]. In order to estimate the spatial resolution, a line profile over the edge of the nanorod in Fig. 4(a) is presented in Fig. S5. From the 20–80% jump we estimate the resolution to be 16 nm. In the phase image [Fig 4(b)], there is a dark contrast region at the sides of some of the nanorods. The origin of these additional contrast features is unclear; however, we attribute this to the carbon contamination due to overexposure or the presence of possible organic residue as a result of drop casting using ethanol. It is also possible that the edge contrast could originate from a tilt of the wavefront in the reconstruction probe, which can potentially be corrected by implementing the ‘modulus enforced probe’ method (Gardner et al., 2017). Nevertheless, in the phase image, the ends and sides of the nanorods are sharp and have a darker contrast than the central region. Enhanced contrast at the edges/sides can also be seen in the amplitude image, but less clearly than in the phase image.

<figure><img src="image_10.png" /><figcaption>Figure 4</figcaption></figure>

Spectro-ptychography and XMCD of permalloy nanorods. (a) Ptychography amplitude image of permalloy nanorods measured at 706 eV using CL polarized X-rays. The white dotted circles indicate gaps between the nanorods in the range 20–30 nm. The yellow ‘X’ marks the region where the DI presented in Fig. S6 was measured. (b) Ptychography phase image of the same area as in (a). (c) XMCD image of the nanorods with contrast in the range ±0.15. The scale bars in (a)–(c) correspond to 500 nm. (d) Magnified image of the termination of the nanorod, located in the white dotted circle in (c). (e) Surface plot of (d) with color scale indicating the local XMCD at the termination of the nanorod. The x and y axes in the grid line correspond to the length and width of the nanorod, respectively, and the z axis represents the XMCD value. The yellow double-headed arrows in (d) and (e) correspond to the width of the nanorod which is 140 nm.

Magnetic structures such as the permalloy nanorods typically have a shape anisotropy which aligns the magnetization towards the long axis of the rod, minimizing the anisotropy energy in the system. However, the ends of the nanorods are terminated by sharp edges which can result in a multi-domain state and can induce formation of topological spin structures (Fert et al., 2017; Shi et al., 2019; Ruiz-Gómez et al., 2020). Figure 4(c) shows the ptychographic amplitude XMCD image of the nanorods calculated as the difference between the OD images acquired with CR and CL polarization, and normalized to the sum of the images. The XMCD contrast is related to the magnitude and orientation of the local magnetization vector with respect to the photon spin vector, which lies along the X-ray propagation direction. XMCD intensities vary as a cosine function [≈ |**M**| |**P**| cosθ, where θ is the angle between the magnitude of the photon spin (X-ray propagation) vector (**P**) and the magnetization vector (**M**)]. Since the nanorods are orthogonal to the X-ray beam, the edges (circular termination of the nanorods) with possible topological spin structures are not visible. Nevertheless, close to the termination of the nanorod [highlighted by the white dotted circle in Fig. 4(c)], the uniform gray contrast splits into white and dark contrast, indicating a change in the magnetization orientation near the termination. Figure 4(d) is a magnified image of the region in Fig. 4(c) encircled by the white dotted line. Here the gray contrast indicates that the magnetization is in the plane of the substrate along the long axis of the rod, while the white and dark contrast indicate magnetization pointing parallel and anti-parallel to the direction of the X-ray propagating vector. The dark and light contrast corresponds to an XMCD signal of ±15%. Typically, if the magnetization of Fe aligns parallel to the X-ray propagation vector (with CR or CL polarization) one can expect an XMCD signal of ±30–35%. However, the observed XMCD intensity of the nanorods is considerably weaker. It appears that the magnetization is still in-plane with respect to the nanorod, with some tilt. The color scale image shown in Fig. 4(e) represents the XMCD signal in Fig. 4(d) as a surface plot. This representation shows that there is a smooth transition (white–gray–black) where the magnetic domain is split at the termination.

## 4. Discussion

### 4.1. Controlling the extent of radiation damage in low-energy ptychography

Carbon contamination and radiation damage are important issues in ptychography. To reduce the total exposure time on the sample and acquisition time one can use a defocused beam (Rodenburg & Maiden, 2019; Song et al., 2019). Even though defocus ptychography is well known and widely used, for low scattering samples there are a few challenges to overcome. In the next section we illustrate the effect of defocused beams on the radiation dose, describe the dose associated with beam overlap, and show the effect of using a defocused beam on the quality of the reconstructed images.
## 4.2. Beam size and overlap

Starting from focused conditions, the size of the beam was adjusted by moving the sample upstream or the Fresnel zone plate downstream along the direction of X-ray propagation. The displacements were typically less than 50 µm. Figure 5 shows how the DI changes when the same spot on the BN sample was illuminated using focused (62 nm) and defocused (1000 nm) beam. The scattering signals surrounding the annulus are higher when measured using a defocused beam [Fig. 5(b)] than a focused beam [Fig. 5(a)]. This can be attributed to the illumination of extended regions which are not illuminated by the full focus beam. Such extended signals, combined with appropriate overlap between adjacent diffraction signals, are typically considered beneficial in ptychography reconstruction as one can obtain a spatial resolution (see Fig. 6) similar to that when using a focused beam while keeping the scan time and exposure to a minimum (Bunk et al., 2008).

Figs. 6(a)–6(c) show the difference between the quality of the reconstructed images of CNT using focused and defocused beam. The sharpness of each image was measured by the Laplacian operation (Vijayakumar, 2022) which typically measures the gradient at the edges. The variance of the Laplacian is related to the sharpness of the image, with lower values indicating higher sharpness. Compared with the focused image [Fig. 6(a)] the sharpness is reduced by about 14% for both the 500 nm [Fig. 6(b)] and 1000 nm [Fig. 6(c)] defocused beam. Subtle differences can still be seen between the 500 nm and 1000 nm images with the former showing some clear features on the CNT structures. With a larger amount of sample being exposed to the defocused beam, it is possible to increase the step size to further reduce the delivered radiation dose on the sample. However, for weakly scattering samples like CNTs or BN, we observe that an overlap of at least 90% is needed to have an effective reconstruction. This is demonstrated in Figs. 6(d)–6(f) which compare reconstructed amplitude images of the same area using a 500 nm beam size and three different overlap values. The image quality (both spatial resolution and contrast) improves with increasing

<figure><img src="image_11.png" /><figcaption>Figure 6</figcaption></figure>

Effect of beam size and overlap on reconstructed images. Reconstructed CNT#2 amplitude images measured at 310 eV (LH polarization, in an area of 1.6 µm × 1.6 µm) using (a) focused beam, 62 nm (67% overlap), (b) defocused beam, 500 nm (92% overlap) and (c) defocused beam, 1000 nm (98% overlap), with the detector positioned at 56 mm. The sharpness measured from the variance of the Laplacian transform is reduced by about 14% in (b) and (c) with respect to (a). Reconstructed CNT amplitude images measured in an area of 1.6 µm × 1.6 µm at 285.2 eV (LH polarization) and a 500 nm-diameter defocused beam, recorded with (d) 10 × 10 points (68% overlap), (e) 20 × 20 points (84% overlap) and (f) 40 × 40 points (92% overlap). Details of the acquisition and reconstruction parameters are presented in Table S1.

overlap. Laplacian evaluation shows a sharpness increase of about 15% when the overlap is increased from 68% to 92%. We determined the signal-to-noise ratio (SNR) of the CNT signal from the ratio of the OD of the CNT and its standard deviation in the image. We find that the SNR increases by 21% between 68% and 84% overlap. The change in SNR between 84% and above 92% is very subtle with a maximum change of 0.1%. While we see large changes in the SNR, the contrast difference, i.e. the ratio of CNT and background, is similar for regions of thick CNTs. We conclude that, when using a defocused beam, a high degree of overlap is required for low-scattering samples. However, for permalloy nanorods a focused beam size of 62 nm and an overlap of 30% (results not shown) is already enough to obtain images with good SNR and contrast, similar to the results given by Mille *et al.* (2022) for ptychography of a Siemens star test sample measured at 280 eV. Nevertheless, we find that for low-scattering samples, when using a defocused beam, a high level of overlap (90% or more) is needed for good reconstruction quality. Since a high degree of overlap increases the radiation dose, an analysis of how the radiation dose depends on beam size and overlap is presented in the next section.

## 4.3. Radiation dose

Here we develop an analytical approach to quantify the radiation dose as a function of overlap through simple geometric considerations. We consider overlap geometries as a result of raster scanning; however, the same approach can also be applied to estimate the overlap from non-raster scans. The overlap ratio (O) is typically defined by (Bunk et al., 2008; Huang et al., 2017)

<figure><img src="image_12.png" /><figcaption>Figure 5</figcaption></figure>

Effect of spot size on diffraction images (DIs). (a) X-ray scattering signal from the BN sample using focused beam (diameter of 62 nm). (b) X-ray scattering signal from the same spot as in (a) using a defocused beam of diameter 1000 nm. Both DIs were recorded at 192 eV and LH polarization, and a sample-to-camera distance of 51.3 mm.
$$O = 1 - d/2r, \qquad (1)$$

where d is the center-to-center distance of adjacent spots and 2r is the diameter of the spot. The overlap value is crucial for ptychographic reconstruction. Typically, increasing the overlap results in faster convergence, improved contrast and higher spatial resolution in the reconstructed image (Wang et al., 2017b; Thibault et al., 2008; Weisstein, 2022). To quantitatively determine the area of overlap we consider the expression of the area associated with two overlapping circles whose schematic is shown in Fig. 7(a), where the red circles represent the X-ray beam spot on an evenly spaced region d. The area of the overlapping region (with circles of the same radius) shown in yellow can be expressed as (Weisstein, 2022)

$$A_{\text{Overlap}} = 2R^2 \cos^{-1}\left(\frac{d}{2R}\right) - \frac{d}{2}(4R^2 - d^2)^{1/2}. \quad (2)$$

<figure><img src="image_13.png" /><figcaption>Figure 7</figcaption></figure>

Estimation of the radiation dose delivered in a ptychography measurement. (a) Schematic of the overlap of the X-ray spot; yellow color represents the region of overlap, green is indicated to identify a single X-ray beam spot. (b) Plot of weight factor as a function of d/R. (c) Schematic of the overlap regions of a focused beam of 60 nm diameter with step size of 30 nm in a 2 µm × 2 µm region. The color bar represents the number of times a region is exposed. (d) Schematic of the overlap regions of a defocused beam of 500 nm diameter with step size of 50 nm in a 2 µm × 2 µm region. The color bar represents the number of times a region is exposed. The scale bars in (c) and (d) represent 500 nm. (e) Histogram of the number of overlaps of focused and defocused beam shown in (c) and (d). (f) Plot of dose change on the BN sample at 192 eV using different beam sizes.

The overlap with the neighboring circles occurs horizontally, vertically and diagonally. The number of circles ($N_{H/V}$) overlapping a single circle [e.g. green spot in Fig. 7(a)] with a given d in one direction [e.g. +x and (+x,+y) diagonal direction] is given by

$$N_{H/V} = 2R/d. \qquad (3)$$

When the number of circles overlapping a given point is known, the total overlap is given by

$$A = \sum_{i,j = -N_{H/V}}^{i,j = N_{H/V}} 2R^2 \cos^{-1}\left(\frac{d_{i,j}}{2R}\right) - \frac{d_{i,j}}{2} (4R^2 - d_{i,j}^2)^{1/2}, \quad (4)$$

where $d_{i,j}$ is the magnitude of the position vector in the x and y coordinate (i.e. $d_{i,j}^2 = x^2 + y^2$). If $d_{i,j} > 2r$ or $d_{i,j} > (2r)^{1/2}$ in the diagonal direction, then the overlap will be undefined due to the $\cos^{-1}$ term which lies between $\pm 1$. The summation is kept between $\pm N_{H/V}$ to determine the area from the four quadrants. Once the area of the overlapping region is determined, the increased dose per exposed region is related to an overlapping/weight factor (k) which can be expressed as

$$k = \frac{A}{\pi R^2}. \qquad (5)$$

Figure 7(b) shows the change in k [plotted on a log scale as a function of d/R (d = step size, R = radius of the beam)]. If $d \ll R$ (e.g. $d = 0.2R$), the weight factor can be as high as 78 when the overlap is about 90%, suggesting that the dose on a given spot can be 78 times higher than the dose delivered by a single beam without any overlap. As d increases, the weight factor decreases until $d = 2R$ where there is no overlap.

In Figs. 7(c) and 7(d) we model the exposure of the beam using a circular focused and defocused beam on a 2 µm × 2 µm area. This dimension is used during measurements for BN, for example. In Fig. 7(c) we consider a beam diameter of 60 nm with step size of 30 nm, which corresponds to a 50% overlap. Here, the regions are exposed between one and five times on average during the measurement, with an equivalent weight factor of 2.2. Similarly, Fig. 7(d) describes the case of a defocused beam with 500 nm diameter with step size of 50 nm, corresponding to 90% overlap. On average the regions are exposed as high as 81 times, and this corresponds to a k factor of 78. In Figs. 7(c) and 7(d) one can find that the
<caption>Table 1</caption>

Summary of the maximum scattering vector, expected resolution, detector distance, experimental resolution (the values inside and outside the square brackets correspond to the resolution of the amplitude and phase image, respectively), minimum overlap required, additional dose (weight factor) due to overlap, beam [focused (F) or defocused (DF)] and algorithm used for ptychography measurements of permalloy nanorods [Fig. 4(a) and 4(b)], CNT [Figs. S2(b) and 2(c)] and BN [Fig. 1(d) and 2(e) and Figs. S8(a) and 8(b)].

<table><thead><tr><th>Element-energy (eV)</th><th>q<sub>max</sub> (nm<sup>-1</sup>)</th><th>Pixels†</th><th>Expected resolution (λ / sin Θ nm)</th><th>Detector position (mm)</th><th>Experimental resolution (nm)‡</th><th>Minimum overlap (%)</th><th>Additional dosage (factor)§</th><th>Beam</th><th>Algorithm</th></tr></thead><tbody><tr><td>Fe–706</td><td>&gt;0.71</td><td>1024<sup>2</sup></td><td>17</td><td>61</td><td>18 ± 5 [17 ± 4]</td><td>30–50</td><td>0.4–2.3</td><td>F</td><td>DM, AP</td></tr><tr><td>N–401.8</td><td>0.26</td><td>570<sup>2</sup></td><td>47</td><td>51.3</td><td>32 ± 12 [38 ± 6]</td><td>90</td><td>78</td><td>DF</td><td>AP</td></tr><tr><td>C–285.2</td><td>0.33</td><td>1104<sup>2</sup></td><td>37</td><td>55</td><td>40 ± 3 [38 ± 7]</td><td>80–90</td><td>18–78</td><td>DF</td><td>AP</td></tr><tr><td>B–192</td><td>0.30</td><td>1400<sup>2</sup></td><td>40</td><td>51.3</td><td>45 ± 6 [42 ± 14]</td><td>90</td><td>78</td><td>DF</td><td>AP</td></tr></tbody></table>

number of overlaps increase from the corner to the middle of the object. Figure 7(e) shows a histogram of the number of overlaps between Figs. 7(c) and 7(d). With the full focused beam, 30–35% of the sample area is being exposed 3–5 times. However, with a defocused beam, on average 5–10% of the area is exposed between 70 and 81 times.

Figure 7(b) plots the overlap factor calculated with the dimension of the region as $dN_{H/V} \times dN_{H/V}$. To calculate the weight factor for the experimental conditions we restrict the analysis within the experimental dimensions of 2 µm × 2 µm to calculate the weight factor and the corresponding dose value. Figure 7(f) shows the calculated dose as a function of $d/R$ for the 60 nm, 500 nm and 1000 nm diameter beams used in this work. The dose is calculated based on an approach outlined in the supporting material of Mille et al. (2022) using the optical density value from the BN ptychography amplitude data measured at 192 eV in Fig. 1(b). The dose delivered by a focused beam with 30% overlap is similar to that delivered by a defocused beam with 90% overlap. From this analysis and the preceding section, it is clear that while increasing overlap improves the quality of reconstruction, it partially reduces the benefits of the defocus on reducing the radiation dose. Hence the minimum overlap required for a successful reconstruction needs to be pre-determined for radiation-sensitive samples and the acquisition strategy designed to stay within that limit. The factor (‘Additional dose’ column) by which the overlap increases the dose on the CNT, BN and nanorod samples is listed in Table 1. Despite having a high k-factor [equation (5)], when compared with that for the focused beam, the total dose is one to two orders lower with the defocused beam and the same overlap. Therefore, with highly scattering samples, using a defocused beam can significantly reduce the delivered radiation dose. However, this is not the case for low-scattering samples, because higher overlap and/or longer dwell times are needed to obtain reconstructions with adequate quality. Additionally, with focused beam, even with an overlap of only 30–40%, there is a large amount of carbon deposition, which is evident when measuring at the C 1s edge [see Figs. S2(b) and 2(c) in the SI, and Fig. S6 of Mille et al. (2022)]. However, with defocused beam there is no carbon build-up on the samples even after long exposure with 90% overlap during spectro-ptychography measurements. This clearly indicates that there is a difference in the net flux per unit area (fluence) related to

different beam size. Using a defocused beam reduces the radiation damage to the sample.

## 5. Reconstruction algorithms: optimizing image quality

Table 1 summarizes the maximum scattering vector ($q_{max}$) sampled for each measurement. The achieved experimental spatial resolution is partly determined by the scattering ability of a given sample, under specific conditions, i.e. the photon energy, polarization and the local structural properties of the sample. The relationship of the maximum scattering angle and the spatial resolution can be approximated by $λ/\sin Θ$ (Shimomura et al., 2015), where $λ$ is the wavelength used and $Θ$ is the maximum scattering angle. This approximation agrees with the experimental resolution which is determined from the knife-edge profile (see Fig. S5) and by Fourier ring correlation (FRC) analysis (see Fig. S6). For high-scattering permalloy nanorods, we find that the spatial resolution is two times higher than for the low-scattering CNTs or BN, which we attribute to the strong scattering of the nanorods at the Fe $2p_{3/2}$ absorption peak (Guizar-Sicairos et al., 2012). For permalloy nanorods, with 62 nm beam and using 50% overlap, the spatial resolution in amplitude images derived from ptychography reconstruction is ~16 nm (see Fig. S5). However, for CNTs measured using the 62 nm X-ray beam and 92% overlap, the ptychography image has a resolution of ~37 nm [Fig. 6(f)]. The main difference between the two samples is the scattering capabilities. Therefore, to enhance the resolution in ptychography one should consider acquiring additional signal by (i) increasing the exposure time, (ii) increasing the beam intensity and (iii) optimizing thresholding to isolate the true signal from the noise still remaining after background subtraction (see Fig. S1). However, factors (i) and (ii) will increase radiation damage and carbon buildup on the sample. Another interesting approach that could be explored is to use a tilting stage to increase the effective scattering angle ($λ/\sin Θ$ dependence). With a tilting stage, higher-frequency signals can be measured by tilting the sample in both axes (Shimomura et al., 2015). Alternatively, a small grazing incident angle could also be used to acquire additional scattering signals from each point. These alternatives are yet to be explored.

<footnote>† Range of camera pixels used for reconstruction (square, centered on the center of the annulus). ‡ The experimental resolution is calculated from the knife-edge profile (see Fig. S5). § See Table S1 for the estimated dose delivered for each measurement reported in this work.</footnote>
The ptychography data were reconstructed using both
difference map (DM) and alternate projection (AP) algo-
rithms in PyNX. DM and AP differ in the way the object and
probe is updated – AP is faster than DM in terms of time/cycle
– however, if it works, DM provides an earlier convergence. In
AP the update is carried out by steep-descent method. More
details about the algorithm can be found elsewhere (March-
esini et al., 2016; Thibault et al., 2009). For weakly scattering
samples such as BN or CNTs, a reasonable quality recon-
struction of the ptychography data was only possible with AP.
With DM, the reconstruction becomes unstable after a few
iterations. However, for strongly scattering samples such as
permalloy nanorods, successful and stable reconstructions
were achieved with DM. It is unclear why DM did not work
for the BN and CNT samples. The differences between the
ptychography measurements of the permalloy and BN/CNT
samples include: size of beam (focused versus defocused),
photon energy and maximum scattering angle (q<sub>max</sub>). An
example of the scattering signal from a single point on the
permalloy nanorod and BNB structure is shown in Fig. S6. For
the permalloy nanorod [Figs. S6(a) and S6(b)] the coherent
scattering signal at 706 eV extends to two-thirds of the way
to the edge of the camera image (q<sub>max</sub> ≥ 0.71 nm<sup>-1</sup>). For the
BNB structure [Fig. S8(a)] the coherent scattering signal at
192.0 eV extends to the boundary of the camera image (q<sub>max</sub> =
0.30 nm<sup>-1</sup>). In addition, the scattering signal only extends in a
particular direction, which is related to the orientation of the
BNB structure relative to the *E* vector, due to the strong linear
dichroism at this photon energy (see Fig. 2). Although the
q-range of scattering is similar in the permalloy and BNB
samples, the intensity of the diffraction signal from the
permalloy is about four times larger than that from BNB. The
lower scattering signal in the BNB (and CNT) samples may be
the reason for the early instability in the DM reconstruction.
The object/probe update in DM has a strong dependence
on the Fourier constraint imposed (i.e. compliance to the
measured diffraction data). It is possible that large differences
between the simulated projection/diffraction and the
measured data cause the instability. This issue is typically
overcome when the object/probe is updated by an error-
reduction/steepest-descent approach such as AP (Thibault *et
al.*, 2009).

6. Conclusions

Ptychographic reconstruction of sets of diffraction images
measured below 200 eV using synchrotron X-rays has been
achieved for the first time. We have studied CNTs, BN and
permalloy nanorods by soft X-ray spectro-ptychography,
reporting high-quality polarization-dependent X-ray absorp-
tion spectra, as well as XLD and XMCD spectra and maps. We
carried out ptychography in the low-energy X-ray regime and
explored how different parameters such as beam size, overlap
factor and choice of algorithm affect the outcome. These
effects are illustrated with results from weakly scattering BN
and CNT samples and compared with results from strongly
scattering permalloy nanorods. Typically, in STXM, high-

resolution images can be obtained by using smaller beam size,
small scanning steps and longer dwell time. However, for an
effective usage of ptychography it is important that one
obtains a reconstructed image with a spatial resolution higher
than that which can be achieved with STXM, without a smaller
beam size, more data points or long exposure times. Particu-
larly for samples with low scattering signals, it is challenging to
obtain high spatial resolution without compromising one or
more of these parameters. Nevertheless, the possibility to
reduce the radiation dose on the sample and obtain phase
information gives ptychography added value as compared
with conventional STXM. For example, the edges and other
fine details of the BN nanobamboo structures were better
resolved in phase than in amplitude images. For permalloy
nanorods, due to large scattering from the sample, magnetic
domain structures of 10–15 nm in size can be identified in the
XMCD images. The dose delivered by a defocused beam, and
thus the consequences of excessive dose such as carbon build-
up, is less than that delivered by a focused beam. While the
dose can be reduced using defocused beam, a high level of
overlap is required for weakly scattering samples, which can
eventually deliver a dose comparable with that delivered with
a focused beam with low overlap. For low scattering samples,
the AP reconstruction algorithm, where the object and probe
are updated by an error-reduction/steepest-descent approach,
produces a stable reconstruction as it is less dependent on the
Fourier constraint in the DM algorithm. In conclusion, while
ptychography clearly enhances spatial resolution in samples
with strong scattering, for samples with weak scattering the
improvement in spatial resolution provided by ptychography
is less dramatic. Methods to efficiently acquire a better quality
high angle scattering signal should be explored for an effective
use of soft X-ray ptychography.

7. Data availability

All processed data used to generate figures in the main paper
and the supporting information are available from the authors
on request. The as-recorded raw data set for ptychography
is very large (~3Tb for this study) and is deposited in the
Synchrotron SOLEIL data repository. Examples can be
provided if needed.

8. Code availability

The *PyNX* code (http://ftp.esrf.fr/pub/scisoft/PyNX/doc/) used for ptychographic reconstruction and the *aXis2000* program (http://unicorn.mcmaster.ca/aXis2000.html) used to generate images and spectra from the reconstruction results are available for free from the indicated websites.

Acknowledgements

Research was carried out at the HERMES beamline of
Synchrotron SOLEIL. We acknowledge SOLEIL for
providing development beam time for this research. We thank
the staff of SOLEIL for their support, in particular Arafat
Noureddine for his help with the camera control. We especially thank A. Besson and J.-B. Boy for their technical support, E. Fahri and F.-E. Picca for the computing support, and K. Medjoubi for his help with the reconstruction and fruitful discussions. The authors wish to acknowledge Laura Alvara Gomez, Lucas Perez from Department of Fisica de Materiales, Universidad Complutense de Madrid, Madrid Spain and IMDEA Nanosciencia, Madrid, Spain; Oliver Fruchart from Spintec (University Grenoble Alpes, CNRS, CEA), Grenoble, France, for providing the permalloy nanorods. The authors also acknowledge and thank the group of Simard (NRC) for providing the CNT#1 sample and Dr Carla Bittencourt for providing the BN nanobamboo sample.

## Funding information

This work was partially funded by project EU-H2020 of the Nanoscience Foundries and Fine Analysis (NFFA) program. Participation of the Canadian group was supported by the Natural Science and Engineering Research Council of Canada and funding from the Faculty of Science of McMaster University.

## References

Ade, H. & Hsiao, B. (1993). *Science*, **262**, 1427–1429.

Avula, S. R. V., Heidler, J., Dreiser, J., Vijayakumar, J., Howald, L., Nolting, F. & Piamonteze, C. (2018). *J. Appl. Phys.* **123**, 064103.

Bae, S., Taylor, R., Shapiro, D., Denes, P., Joseph, J., Celestre, R., Marchesini, S., Padmore, H., Tyliszczak, T., Warwick, T., Kilcoyne, D., Levitz, P. & Monteiro, P. J. M. (2015). *J. Am. Ceram. Soc.* **98**, 4090–4095.

Batey, D. J., Edo, T. B., Rau, C., Wagner, U., Pešić, Z. D., Waigh, T. A. & Rodenburg, J. M. (2014). *Phys. Rev. A*, **89**, 043812.

Beckers, M., Senkbeil, T., Gorniak, T., Reese, M., Giewekemeyer, K., Gleber, S.-C., Salditt, T. & Rosenhahn, A. (2011). *Phys. Rev. Lett.* **107**, 208101.

Belkhou, R., Stanescu, S., Swaraj, S., Besson, A., Ledoux, M., Hajlaoui, M. & Dalle, D. (2015). *J. Synchrotron Rad.* **22**, 968–979.

Bozzini, B., Kourousias, G., Gianoncelli, A., Jones, M. W., Riessen, G. V. & Kiskinova, M. (2017). *J. Electron Spectrosc. Relat. Phenom.* **220**, 147–155.

Bunk, O., Dierolf, M., Kynde, S., Johnson, I., Marti, O. & Pfeiffer, F. (2008). *Ultramicroscopy*, **108**, 481–487.

Chopra, N. G., Luyken, R. J., Cherrey, K., Crespi, V. H., Cohen, M. L., Louie, S. G. & Zettl, A. (1995). *Science*, **269**, 966–967.

Dai, H. (2002). *Surf. Sci.* **500**, 218–241.

Dai, X. J., Chen, Y., Chen, Z., Lamb, P. R., Li, L. H., du Plessis, J., McCulloch, D. G. & Wang, X. (2011). *Nanotechnology*, **22**, 245301.

Desjardins, K., Medjoubi, K., Sacchi, M., Popescu, H., Gaudemer, R., Belkhou, R., Stanescu, S., Swaraj, S., Besson, A., Vijayakumar, J., Pautard, S., Noureddine, A., Mercère, P., Da Silva, P., Orsini, F., Menneglier, C. & Jaouen, N. (2020). *J. Synchrotron Rad.* **27**, 1577–1589.

Dierolf, M., Menzel, A., Thibault, P., Schneider, P., Kewish, C. M., Wepf, R., Bunk, O. & Pfeiffer, F. (2010a). *Nature*, **467**, 436–439.

Dierolf, M., Thibault, P., Menzel, A., Kewish, C. M., Jefimovs, K., Schlichting, I., König, K., Bunk, O. & Pfeiffer, F. (2010b). *New J. Phys.* **12**, 035017.

Edo, T. B., Batey, D. J., Maiden, A. M., Rau, C., Wagner, U., Pešić, Z. D., Waigh, T. A. & Rodenburg, J. M. (2013). *Phys. Rev. A*, **87**, 053850.

Favre-Nicolin, V., Coraux, J., Richard, M.-I. & Renevier, H. (2011). *J. Appl. Cryst.* **44**, 635–640.

Favre-Nicolin, V., Girard, G., Leake, S., Carnis, J., Chushkin, Y., Kieffer, J., Paleo, P. & Richard, M.-I. (2020). *J. Appl. Cryst.* **53**, 1404–1413.

Felten, A., Gillon, X., Gulas, M., Pireaux, J.-J., Ke, X., Van Tendeloo, G., Bittencourt, C., Najafi, E. & Hitchcock, A. P. (2010). *ACS Nano*, **4**, 4431–4436.

Fert, A., Reyren, N. & Cros, V. (2017). *Nat. Rev. Mater.* **2**, 17031.

Fienup, J. R. (1982). *Appl. Opt.* **21**, 2758–2769.

Fuentes, G. G., Borowiak-Palen, E., Pichler, T., Liu, X., Graff, A., Behr, G., Kalenczuk, R. J., Knupfer, M. & Fink, J. (2003). *Phys. Rev. B*, **67**, 035429.

Gardner, D. F., Tanksalvala, M., Shanblatt, E. R., Zhang, X., Galloway, B. R., Porter, C. L., Karl, R. Jr, Bevis, C., Adams, D. E., Kapteyn, H. C., Murnane, M. M. & Mancini, G. F. (2017). *Nat. Photon.* **11**, 259–263.

Giewekemeyer, K., Beckers, M., Gorniak, T., Grunze, M., Salditt, T. & Rosenhahn, A. (2011). *Opt. Express*, **19**, 1037–1050.

Gräfe, J., Skripnik, M., Dieterle, G., Haering, F., Weigand, M., Bykova, I., Träger, N., Stoll, H., Tyliszczak, T., Vine, D., Ziemann, P., Wiedwald, U., Shapiro, D., Nowak, U., Schütz, G. & Goering, E. J. (2020). *AIP Adv.* **10**, 125122.

Guizar-Sicairos, M., Holler, M., Diaz, A., Vila-Comamala, J., Bunk, O. & Menzel, A. (2012). *Phys. Rev. B*, **86**, 100103.

Hitchcock, A. P. (2015). *J. Electron Spectrosc. Relat. Phenom.* **200**, 49–63.

Huang, X., Yan, H., Ge, M., Öztürk, H., Nazaretski, E., Robinson, I. K. & Chu, Y. S. (2017). *Appl. Phys. Lett.* **111**, 023103.

Jones, M. W. M., Dearnley, M. K., van Riessen, G. A., Abbey, B., Putkunz, C. T., Junker, M. D., Vine, D. J., McNulty, I., Nugent, K. A., Peele, A. G. & Tilley, L. (2014a). *Ultramicroscopy*, **143**, 88–92.

Jones, M. W. M., Elgass, K., Junker, M. D., Luu, M. B., Ryan, M. T., Peele, A. G. & van Riessen, G. A. (2014b). *Sci. Rep.* **4**, 6796.

Kingston, C. T., Jakubek, Z. J., Dénommée, S. & Simard, B. (2004). *Carbon*, **42**, 1657–1664.

Krüger, P., Maekawa, Y., Hitchcock, A. P. & Bittencourt, C. (2020). *Radiat. Phys. Chem.* **175**, 108129.

Li, L. H., Chen, Y. & Glushenkov, A. M. (2010). *Nanotechnology*, **21**, 105601.

Li, W., Bykova, I., Zhang, S., Yu, G., Tomasello, R., Carpentieri, M., Liu, Y., Guang, Y., Gräfe, J., Weigand, M., Burn, D. M., der Laan, G., Hesjedal, T., Yan, Z., Feng, J., Wan, C., Wei, J., Wang, X., Zhang, X., Xu, H., Guo, C., Wei, H., Finocchio, G., Han, X. & Schütz, G. (2019). *Adv. Mater.* **31**, 1807683.

Liu, H., Xu, Z., Zhang, X., Wu, Y., Guo, Z. & Tai, R. (2013). *Appl. Opt.* **52**, 2416–2427.

Loetgering, L., Witte, S. & Rothhardt, J. (2022). *Opt. Express*, **30**, 4133–4164.

Maiden, A. M., Morrison, G. R., Kaulich, B., Gianoncelli, A. & Rodenburg, J. M. (2013). *Nat. Commun.* **4**, 1669.

Mandula, O., Elzo Aizarna, M., Eymery, J., Burghammer, M. & Favre-Nicolin, V. (2016). *J. Appl. Cryst.* **49**, 1842–1848.

Marchesini, S., Tu, Y.-C. & Wu, H.-T. (2016). *Appl. Comput. Harmon. Anal.* **41**, 815–851.

Medjo, R. E., Sendja, B. T., Mane, J. M. & Ateba, P. O. (2009). *Phys. Scr.* **80**, 055602.

Mille, N., Yuan, H., Vijayakumar, J., Stanescu, S., Swaraj, S., Desjardins, K., Favre-Nicolin, V., Belkhou, R. & Hitchcock, A. P. (2022). *Commun. Mater.* **3**, 8.

Najafi, E., Cruz, D. H., Obst, M., Hitchcock, A. P., Douhard, B., Pireaux, J.-J. & Felten, A. (2008). *Small*, **4**, 2279–2285.

Najafi, E., Wang, J., Hitchcock, A. P., Guan, J., Dénommée, S. & Simard, B. (2010). *J. Am. Chem. Soc.* **132**, 9020–9029.

Odstrčil, M., Menzel, A. & Guizar-Sicairos, M. (2018). *Opt. Express*, **26**, 3108–3123.

Pfeiffer, F. (2018). *Nat. Photon.* **12**, 9–17.

Rodenburg, J. & Maiden, A. (2019). *Ptychography*, pp. 819–904. Cham: Springer International Publishing.
Rose, M., Senkbeil, T., von Gundlach, A. R., Stuhr, S., Rumancev, C., Dzhigaev, D., Besedin, I., Skopintsev, P., Loetgering, L., Viefhaus, J., Rosenhahn, A. & Vartanyants, I. A. (2018). *Opt. Express*, **26**, 1237–1254.

Rose, M., Skopintsev, P., Dzhigaev, D., Gorobtsov, O., Senkbeil, T., von Gundlach, A., Gorniak, T., Shabalin, A., Viefhaus, J., Rosenhahn, A. & Vartanyants, I. (2015). *J. Synchrotron Rad.* **22**, 819–827.

Ruiz-Gómez, S., Fernández-González, C., Martínez, E., Raposo, V., Sorrentino, A., Foerster, M., Aballe, L., Mascaraque, A., Ferrer, S. & Pérez, L. (2020). *Nanoscale*, **12**, 17880–17885.

Ruiz-Gómez, S., Foerster, M., Aballe, L., Proenca, M. P., Lucas, I., Prieto, J. L., Mascaraque, A., de la Figuera, J., Quesada, A. & Pérez, L. (2018). *Sci. Rep.* **8**, 16695.

Savikhin, V., Shapiro, D. A., Gu, X., Oosterhout, S. D. & Toney, M. F. (2019). *Chem. Mater.* **31**, 4913–4918.

Schiessling, J., Kjeldgaard, L., Rohmund, F., Falk, L. K. L., Campbell, E. E. B., Nordgren, J. & Brühwiler, P. A. (2003). *J. Phys. Condens. Matter*, **15**, 6563–6579.

Shapiro, D. A., Celestre, R., Denes, P., Farmand, M., Joseph, J., Kilcoyne, A. L. D., Marchesini, S., Padmore, H., Venkatakrishnan, S. V., Warwick, T. & Yu, Y. (2017). *J. Phys. Conf. Ser.* **849**, 012028.

Shapiro, D. A., Yu, Y., Tyliszczak, T., Cabana, J., Celestre, R., Chao, W., Kaznatcheev, K., Kilcoyne, A. L. D., Maia, F., Marchesini, S., Meng, Y. S., Warwick, T., Yang, L. L. & Padmore, H. A. (2014). *Nat. Photon.* **8**, 765–769.

Shi, X., Burdet, N., Chen, B., Xiong, G., Streubel, R., Harder, R. & Robinson, I. K. (2019). *Appl. Phys. Rev.* **6**, 011306.

Shi, X., Fischer, P., Neu, V., Elefant, D., Lee, J. C. T., Shapiro, D. A., Farmand, M., Tyliszczak, T., Shiu, H.-W., Marchesini, S., Roy, S. & Kevan, S. D. (2016). *Appl. Phys. Lett.* **108**, 094103.

Shimomura, K., Suzuki, A., Hirose, M. & Takahashi, Y. (2015). *Phys. Rev. B*, **91**, 214114.

Song, J., Allen, C. S., Gao, S., Huang, C., Sawada, H., Pan, X., Warner, J., Wang, P. & Kirkland, A. I. (2019). *Sci. Rep.* **9**, 3919.

Stöhr, J. (1999). *J. Magn. Magn. Mater.* **200**, 470–497.

Sun, T., Sun, G., Yu, F., Mao, Y., Tai, R., Zhang, X., Shao, G., Wang, Z., Wang, J. & Zhou, J. (2021). *ACS Nano*, **15**, 1475–1485.

Terrones, M., Romo-Herrera, J. M., Cruz-Silva, E., López-Urías, F., Muñoz-Sandoval, E., Velázquez-Salazar, J. J., Terrones, H., Bando, Y. & Golberg, D. (2007). *Mater. Today*, **10**, 30–38.

Thibault, P., Dierolf, M., Bunk, O., Menzel, A. & Pfeiffer, F. (2009). *Ultramicroscopy*, **109**, 338–343.

Thibault, P., Dierolf, M., Menzel, A., Bunk, O., David, C. & Pfeiffer, F. (2008). *Science*, **321**, 379–382.

Thibault, P. & Guizar-Sicairos, M. (2012). *New J. Phys.* **14**, 063004.

Jaianthv/Ptycho_data_analysis, https://github.com/jaianthv/Ptycho_data_analysis.

Vijayakumar, J., Bracher, D., Savchenko, T. M., Horisberger, M., Nolting, F. & Vaz, C. A. F. (2019). *J. Appl. Phys.* **125**, 114101.

Vijayakumar, J., Li, Y., Bracher, D., Barton, C. W., Horisberger, M., Thomson, T., Miles, J., Moutafis, C., Nolting, F. & Vaz, C. (2020). *Phys. Rev. Appl.* **14**, 054031.

Wang, C., Xu, Z., Liu, H., Wang, Y., Wang, J. & Tai, R. (2017b). *Appl. Opt.* **56**, 2099–2111.

Wang, C.-P., Xu, Z.-J., Liu, H.-G., Tao, X. & Tai, R.-Z. (2017a). *Nucl. Sci. Tech.* **28**, 74.

Wang, J., Morin, C., Li, L., Hitchcock, A., Scholl, A. & Doran, A. (2009). *J. Electron Spectrosc. Relat. Phenom.* **170**, 25–36.

Weisstein, E. W. (2022).). *MathWorld – Wolfram Web Resource*, https://mathworld.wolfram.com/Circle-CircleIntersection.html (last accessed 16 October 2022).

Wise, A. M., Weker, J. N., Kalirai, S., Farmand, M., Shapiro, D. A., Meirer, F. & Weckhuysen, B. M. (2016). *ACS Catal.* **6**, 2178–2181.

Wu, J., Zhu, X., West, M. M., Tyliszczak, T. H.-W., Shiu, H., Shapiro, D., Berejnov, V., Susac, D., Stumper, J. & Hitchcock, A. P. (2018). *J. Phys. Chem. C*, **122**, 11709–11719.

Yu, Y., Farmand, M., Kim, C., Liu, Y., Grey, C. P., Strobridge, F. C., Tyliszczak, T., Celestre, R., Denes, P., Joseph, J., Krishnan, H., Maia, F. R. N. C., Kilcoyne, A. L. D., Marchesini, S., Leite, T. P. C., Warwick, T., Padmore, H., Cabana, J. & Shapiro, D. A. (2018). *Nat. Commun.* **9**, 921.

Yu, Y.-S., Kim, C., Shapiro, D. A., Farmand, M., Qian, D., Tyliszczak, T., Kilcoyne, A. L. D., Celestre, R., Marchesini, S., Joseph, J., Denes, P., Warwick, T., Strobridge, F. C., Grey, C. P., Padmore, H., Meng, Y. S., Kostecki, R. & Cabana, J. (2015). *Nano Lett.* **15**, 4282–4288.

Yuan, H., Yuan, H., Casagrande, T., Shapiro, D., Yu, Y., Enders, B., Lee, J. R. I., van Buuren, A., Biener, M. M., Gammon, S. A., Baumann, T. F. & Hitchcock, A. P. (2021). *ACS Appl. Nano Mater.* **4**, 621–632.

Zhang, B., Gardner, D. F., Seaberg, M. D., Shanblatt, E. R., Kapteyn, H. C., Murnane, M. M. & Adams, D. E. (2015). *Ultramicroscopy*, **158**, 98–104.

Zhu, X., Hitchcock, A. P., Bazylinski, D. A., Denes, P., Joseph, J., Lins, U., Marchesini, S., Shiu, H.-W., Tyliszczak, T. & Shapiro, D. A. (2016). *Proc. Natl Acad. Sci.* **113**, E8219–E8227.