# The Scatman: an approximate method for fast wide-angle scattering
simulations

Alessandro Colombo<EMAIL_ADDRESS>Laboratory for Solid State Physics,
ETH Zürich, 8093 Zürich, Switzerland  Julian Zimmermann  Laboratory for Solid
State Physics, ETH Zürich, 8093 Zürich, Switzerland  Bruno Langbehn  Institute
for Optics and Atomic Physics, Technical University Berlin, 10623 Berlin,
Germany  Thomas Möller  Institute for Optics and Atomic Physics, Technical
University Berlin, 10623 Berlin, Germany  Christian Peltz  Department of
Physics, University of Rostock, 18051 Rostock, Germany  Katharina Sander
Department of Physics, University of Rostock, 18051 Rostock, Germany  Björn
Kruse  Department of Physics, University of Rostock, 18051 Rostock, Germany
Paul Tümmler  Department of Physics, University of Rostock, 18051 Rostock,
Germany  Ingo Barke  Department of Physics, University of Rostock, 18051
Rostock, Germany  Daniela Rupp<EMAIL_ADDRESS>Laboratory for Solid
State Physics, ETH Zürich, 8093 Zürich, Switzerland  Thomas Fennel
<EMAIL_ADDRESS>Department of Physics, University of Rostock,
18051 Rostock, Germany

###### Abstract

Single-shot Coherent Diffraction Imaging (CDI) is a powerful approach to
characterize the structure and dynamics of isolated nanoscale objects such as
single viruses, aerosols, nanocrystals or droplets. Using X-ray wavelengths,
the diffraction images in CDI experiments usually cover only small scattering
angles of few degrees. These small-angle patterns represent the magnitude of
the Fourier transform of the two-dimensional projection of the sample’s
electron density, which can be reconstructed efficiently but lacks any depth
information. In cases where the diffracted signal can be measured up to
scattering angles exceeding $\sim 10^{\circ}$, i.e. in the wide-angle regime,
three-dimensional morphological information of the target is contained in a
single-shot diffraction pattern. However, the extraction of the 3D structural
information is no longer straightforward and defines the key challenge in
wide-angle CDI. So far, the most convenient approach relies on iterative
forward fitting of the scattering pattern using scattering simulations. Here
we present the Scatman, an approximate and fast numerical tool for the
simulation and iterative fitting of wide-angle scattering images of isolated
samples. Furthermore, we publish and describe in detail our Open Source
software implementation of the Scatman algorithm, PyScatman. The Scatman
approach, which was already applied in previous works for forward-fitting-
based shape retrieval, adopts the Multi-Slice Fourier Transform method. The
effects of optical properties are partially included, yielding quantitative
results for weakly scattering samples. PyScatman is capable of computing wide-
angle scattering patterns in few milliseconds even on consumer-level computing
hardware. The high computational efficiency of PyScatman enables effective
data analysis based on model fitting, thus representing an important step
towards a systematic application of 3D Coherent Diffraction Imaging from
single wide-angle diffraction patterns in various scientific communities.

##  1 Introduction

Coherent Diffraction Imaging (CDI) aims at retrieving an isolated sample’s
spatial information from the far-field amplitude of a highly coherent and
monochromatic light beam that has scattered off the sample [1, 2, 3]. The
great advantage of CDI is its _lensless_ setup, making it suitable for those
wavelength regions where lenses are hard or even impossible to manufacture.
Thus, the spatial resolution in CDI is, in principle, only dependent on the
radiation wavelength and on the maximum scattering angle at which the
scattering signal can be recorded on a detector.

For small-angle scattering (SAS) conditions [4], and assuming first Born’s
approximation [5], the 2D scattering image can be efficiently computed by
calculating the squared absolute value of a Fourier Transform (FT) of the
imaged sample’s 2D electron density projection. This relationship between the
sample and the diffraction within the SAS regime is at the basis of the
_original_ CDI approach, experimentally demonstrated for the first time in
1999 [6], where iterative _phase retrieval_ algorithms are employed to
reconstruct the scattered field in the detector’s plane in amplitude and
phase[7, 8]. Upon successful phase recovery, the real-space 2D projection of
the sample can be directly computed[9, 3, 10].

Assuming that multiple diffraction patterns from equivalent objects are
available, the SAS scheme has been shown to enable the reconstruction of the
full 3D structure of a target. The most obvious way is based on the
_tomographic_ approach, where several diffraction patterns of the same sample
are acquired at different orientations, giving a sufficient amount of 3D
information in the reciprocal space to perform a 3D _phase retrieval_ process
via suitable algorithms[11, 12, 13, 14, 15, 16]. In this respect, the recent
advent of X-Ray Free Electron Laser (XFEL) sources [17, 18, 19, 20] has opened
new routes for characterizing so far elusive objects, thanks to their ultra-
short and ultra-high intensity pulses, enabling to record meaningful
scattering signal before the object is destroyed, a scheme that has therefore
been termed _diffraction before destruction_ [21]. As a result, however, each
sample can only provide a single diffraction pattern before being destroyed by
the laser radiation. Thus, the 3D _tomographic_ approach is viable only if
many replicas of the same sample are available [16]. Although additional shape
information or symmetry constraints on the sample can in principle allow for a
shape retrieval from a single SAS diffraction image [22], a full 3D
reconstruction of non-replicable samples with unconstrained shapes is
impossible to perform with SAS experiments. The requirement for additional
constraints for reconstructing 3D information from an SAS experiment is a
result of the fact that the magnitude of the maximum transfer momentum
$\vec{q}$ acquired by the scattering detector is much smaller than the
radiation momentum $\mathrm{k}_{0}$. Thus, as intuitively presented in [23],
the acquired transfer momenta lie essentially in the plane orthogonal to the
beam propagation direction (see also Fig. 3b in Sec. 2), and the sample’s
depth information is, in practice, completely lost.

The limitation to 2D-only information can be overcome in the so-called wide-
angle scattering regime (WAS). Most importantly, in this regime the 2D
diffraction patterns contain 3D information, because of comparable magnitudes
of the transfer momentum $\vec{q}$ and the wave vector $\mathrm{k}_{0}$ (see
Fig. 3a in Sec. 2). As shown in [23], in this scenario different parts of the
scattering pattern carry details about different 2D projections of the density
- establishing the possibility to extract tomographic information from a
single image. The primary shortcoming of experiments in the WAS regime is that
the scattering patterns cannot be converted into shape information in such a
straightforward way as in the SAS regime, where the field represents the 2D
Fourier transform of the density projection. Some attempts to numerically
invert single WAS patterns were made [24]: however, the stability and
reliability of such approaches are still debated within the community [25,
26].

Therefore, the _forward-fitting_ approach, where a measured scattering pattern
is compared to scattering simulations for appropriately parameterized sample’s
shapes, is currently the most general and practicable approach to invert CDI
data taken under WAS conditions. To perform such a _forward-fitting_ analysis,
a model that describes the sample’s morphology depending on a set of free
parameters has to be selected. Then, those parameters’ values are varied using
stochastic and/or deterministic optimization algorithms to minimize the
discrepancy between the experimental diffraction data and the scattering
simulation. In this procedure, the simulation of scattering patterns is the
most challenging and computationally expensive task, highlighting the urgent
need for fast forward-simulation approaches.

If the simulation runtime is uncritical, e.g. for benchmarking purposes, or
for cases with high symmetry, several approaches are available that enable to
compute the exact solution to the scattering problem. The first method is
based on the analytical solution for sufficiently simple geometries, such as
the Mie solution to the Maxwell equations [27], with which the scattered far-
field can be calculated as a series expansion into vector wave harmonics up to
arbitrary accuracy. However, such analytically motivated treatment is only
applicable to simple sample shapes, like a sphere [28] or a coated sphere
[29]. A second option is to compute the scattering by solving Maxwell’s
equations numerically, e.g. via the Finite-Difference Time-Domain (FDTD)
method [30, 31] or using Green’s function based approaches such as the
Discrete Dipole Approximation (DDA) [32, 33]. These numerical methods allow
simulations of light-matter interaction with no restrictions on the sample’s
shape. However, FDTD or DDA calculations are computationally cost-intensive,
as the whole computational domain has to be represented on a grid at a
sufficiently fine scale, for which the temporal evolution (FDTD case) or the
iterative solution for the fields evolution (DDA case) have to be calculated.
The demanding computational conditions render the methods aiming at the
unrestricted full solution of Maxwell’s equations impractical for the use-case
of simulating more than a few diffraction images. Therefore, suitable
approximate methods are highly attractive for data analysis of wide-angle CDI.
In this paper we present a fast, flexible, and intuitive approximate
simulation suite: The Scatman.

Figure 1: Examples extracted from previous works that made use of the Scatman
approach for wide-angle scattering data analysis. In a), adapted from [23],
soft X-Rays are used to study the 3D structure of silver nano-particles, by
comparing the experimental data with the simulation. In b), adapted from [34],
comparisons between experimental data and simulations demonstrated the
feasibility of Coherent Diffraction Imaging with High Harmonic Generation
sources. In c), adapted from [35], a fitting between the Scatman result and
experimental diffraction patterns revealed the 3D shapes of superfluid helium
nanodroplets.

The Scatman’s core was originally conceived by the authors of Barke et al.
[23], and computes wide-angle coherent scattering images of isolated samples.
It has already proven successful for data analysis of WAS experiments [23, 34,
35, 36]: examples ranging from silver nanocrystals to spinning superfluid
helium droplets are depicted in Fig. 1. A continued development led to the
refined, generalized, and concise form of the Scatman presented here.

The two following sections of this paper are dedicated to the analytical
framework and motivation of the approach, based on the Multi-Slice Fourier
Transform (MSFT) technique [37, 38, 39, 40, 23], and its translation into a
numerical form. Section 4 focuses on the comparison between the simulation
results of the Scatman and exact, analytical calculations based on Mie theory
for a spherical sample. It provides intuition about the region of
applicability of the Scatman, whose results can be quantitatively close or
just qualitatively usable, depending on the sample’s properties. The final
sections, 5 and 6, present our Scatman reference implementation, called
PyScatman, published along with this paper as Open Source software. PyScatman
is released as a Python module that provides an easy interface to the user,
and incorporates _state of the art_ programming techniques to yield a high
computational efficiency.

##  2 The Scatman routine

Figure 2: Schematic representation of the Scatman’s MSFT approach. In a), the
sample as a whole is defined by its _scattering strength_ $\rho$, which
depends on the spatial distribution of the complex refractive index $n$. In
b), the sample is split into $S$ slices, where, for each slice $s$, the
scattering density $\tilde{\rho}_{s}$ is determined by the slice’s optical
properties. In c), the scattered far field is computed for each slice $s$. In
the last step d), the scattering of the slices is summed up with a proper
phase correction and subsequently squared to simulate the recorded diffraction
pattern on the detector. Please note that, for presentation purposes, c) only
shows the scattering signal’s squared amplitude for every slice, while the
actual scattered wavefield is still a complex function at this point.

The Scatman is based on the MSFT approach, originally developed for electron
scattering [37, 38, 39]. The MSFT routine was already applied in X-ray
diffraction experiments for fixed targets [40], as well as for recovering the
topology of individual silver and helium nanoparticles in free flight [23, 35]
. A schematic overview on the MSFT method is shown in Fig. 2. Roughly
speaking, the simulation is based on the partitioning of the spatial domain
into slices (Fig. 2a and 2b). The scattering contribution from each slice is
computed independently via a Fourier Transform operation (Fig. 2c) and then
summed up with a proper phase correction to compose the final scattering
pattern (Fig. 2d). This section briefly revisits the mathematical derivation
of the approach, particularly focusing on how the effects of the sample’s
refractive index are effectively incorporated into the Scatman’s simulation.

Figure 3: Schematic view on wide-angle and small-angle regimes and on the
notation used in this paper for the momentum vectors. The transfer momentum
$\vec{q}$ is defined as the difference between the incoming wave-vector
$\vec{\mathrm{k}_{0}}$ and the scattering vector $\vec{k}$. The transfer
momentum $\vec{q}$ can be decomposed into its axial component $\vec{q_{z}}$,
i.e. the component parallel to the incoming radiation assumed to travel along
the $z$ axis, and $\vec{q}_{xy}$. The _wide-angle_ regime is depicted in a),
where the axial component of the transfer momentum $\vec{q_{z}}$ is non-
negligible thanks to the large scattering angle $\theta$. For comparison, b)
shows the same scheme in the _small-angle_ regime, where the scattering angle
$\theta$ is sufficiently small to neglect the axial component of $\vec{q}$. In
both a) and b) the _Ewald sphere_ is shown in gray.

For deriving the method, we start from the well-known Born’s approximation
[5], which defines the scattered field $\Psi(\vec{q})$ in the far-field
condition as:

$\Psi(\vec{q})\propto\int\\!\mathrm{d}\vec{r}\,\rho(\vec{r})\,e^{\mathrm{\mathbf{i}}\vec{q}\cdot\vec{r}}$
(1)

where $\rho(\vec{r})$ defines the scattering _strength_ in space and $\vec{q}$
is the transfer momentum, schematically shown in Fig. 3. The integral in Eq.
(1), which is in practice a 3D Fourier Transform of the scattering strength
$\rho(\vec{r})$, can be re-written in the following form:

$\begin{split}\Psi(\vec{q})&\propto\iiint\\!\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z\,\rho(x,y,z)\,\,e^{\mathrm{\mathbf{i}}[xq_{x}+yq_{y}+zq_{z}]}\\\
&\sim\sum_{s}e^{\mathrm{\mathbf{i}}q_{z}s\Delta
z}\iint\\!\mathrm{d}x\,\mathrm{d}y\,\left[\int_{s\Delta z}^{s\Delta z+\Delta
z}\mathrm{d}z\,\rho(x,y,z)\right]\,\,e^{\mathrm{\mathbf{i}}[xq_{x}+yq_{y}]}\\\
&=\sum_{s}e^{\mathrm{\mathbf{i}}q_{z}s\Delta
z}\mathcal{F}\left[\tilde{\rho}_{s}(x,y)\right](q_{x},q_{y})\end{split}.$ (2)

The first step in Eq. (2) is the explicit formulation of Eq. (1) in cartesian
coordinates, where the coordinate system is chosen such that the $z$ axis is
parallel to the beam propagation direction: from now on, this axis will also
be addressed as the _axial_ direction. The second step of the equation is the
approximation of the integral along $z$ with a discrete summation over the
slices with integer index $s$: such approximation holds given the condition
that $\Delta z\ll\frac{\pi}{q_{z}}$. As depicted in Fig. 2b, this operation
represents a partitioning of the spatial domain into slices of size $\Delta z$
along the axial direction, being the core of the MSFT approach. In the last
step, the integral over the $x$ and $y$ direction is rewritten as a two-
dimensional Fourier Transform. Moreover, the integral of the scattering
strength $\rho$ over the slice $s$ in the axial direction is defined as
$\tilde{\rho}_{s}$.

As long as only monochromatic radiation with momentum $\mathrm{k}_{0}$ is
considered and the scattering event is assumed to be completely _elastic_ , it
is convenient to re-write the axial component of the transfer momentum $q_{z}$
as function of $q_{x}$ and $q_{y}$:

$\begin{split}q_{z}(q_{x},q_{y})&=\mathrm{k}_{0}\left[1-\cos(\theta(q_{x},q_{y}))\right]\\\
\text{with}\,\,\,\,\theta(q_{x},q_{y})&=\arccos(\sqrt{1-\frac{q_{x}^{2}+q_{y}^{2}}{\mathrm{k}_{0}^{2}}})\end{split}$
(3)

where $\theta$ is the scattering angle. Eq. (3), which can be intuitively
derived from Fig. 3a through geometrical considerations, enables to rewrite
Eq. (2) as:

$\Psi(q_{x},q_{y})=\sum_{s}e^{\mathrm{\mathbf{i}}\mathrm{k}_{0}\left[1-\cos(\theta(q_{x},q_{y}))\right]s\Delta
z}\mathcal{F}\left[\tilde{\rho}_{s}(x,y)\right](q_{x},q_{y})\,.$ (4)

The scattered field $\Psi(q_{x},q_{y})$ in Eq. (4) is the sum of the
scattering contributions from all $s$ slices, with a proper phase factor that
depends on the scattering angle and on the slice’s position on the $z$ axis.

We continue the derivation of the method by defining the scattering strength
$\rho(\vec{r})$. In particular, at high photon energies, the strength of the
scattering is related to the amount of electronic charges that contribute to
the scattering. These are described by the dielectric polarization density
$P(\vec{r})$, defined as:

$P(\vec{r})=\varepsilon_{0}\chi_{e}(\vec{r})E(\vec{r})\approx\varepsilon_{0}\left[n^{2}(\vec{r})-1\right]E(\vec{r})$
(5)

where $E(\vec{r})$ is the electric field and $\chi_{e}(\vec{r})$ is the
electric susceptibility. The latter has been then rewritten as function of the
complex refractive index $n$, exploiting its relationship with the relative
permittivity $\varepsilon_{r}=\chi_{e}+1$ , which is equivalent to the squared
refractive index for non-magnetic materials, i.e.
$n^{2}=\varepsilon_{r}\mu_{r}\approx\varepsilon_{r}$.

The Born’s approximation in Eq. (1) assumes that the incoming electric field
is not affected by the presence of the sample, and considers a planar wave
with constant amplitude, momentum and phase along the full path. In this view,
the scattering strength defined in Eq. (1) is proportional to the electric
susceptibility, i.e. $\rho(\vec{r})\propto\left[n^{2}(\vec{r})-1\right]$,
allowing the definition of the scattering strength for a slice in Eq. (4) as
$\tilde{\rho}_{s}(x,y)\propto\left[\tilde{n}_{s}^{2}(x,y)-1\right]$, where
$\tilde{n}_{s}$ are the optical properties averaged over the slice thickness.
However, especially when considering wide-angle scattering, the refractive
index of the sample will modify the field. It is possible to partially take
this effect into account by defining the scattering strength for a given slice
$s$ in the following form:

$\tilde{\rho}_{s}(x,y)\propto\left[\tilde{n}_{s}^{2}(x,y)-1\right]\frac{E_{s}(x,y)}{E_{0}\,e^{\mathrm{\mathbf{i}}\mathrm{k}_{0}s\Delta
z}}$ (6)

where $E_{s}(x,y)$ is the field actually impinging on slice $s$ of the sample,
while $E_{0}\,e^{\mathrm{\mathbf{i}}\mathrm{k}_{0}s\Delta z}$ is the field as
it would travel unaffected by the presence of the sample (the field taken into
account by the Born’s approximation in Eq. (1)). The ratio between the two
fields can be interpreted as a _correction_ applied to the unmodified field
assumed in the first Born’s approximation, making $\tilde{\rho}_{s}(x,y)$ in
Eq. (6) an _effective_ scattering strength. This correction factor allows to
approximately include the effects of the sample’s optical properties on the
electric field incoming to the slice, while the scattered field is still the
unaffected one considered in the Born’s approximation.

For a more intuitive presentation of how the incoming field $E_{s}(x,y)$
impinging on the slice $s$ is treated in the Scatman approach, it is now
convenient to rewrite the sample’s refractive index $n$ in the following form:

$n(\vec{r})=1-\delta(\vec{r})+\mathrm{\mathbf{i}}\beta(\vec{r}).$ (7)

Here, $\delta$ defines the deviation of the real part of $n$ from unity, and
is responsible for the change of the light’s phase velocity in the sample,
causing also the phenomena of _refraction_ and _reflection_. On the other
side, $\beta$, often called _extinction_ or _absorption_ coefficient, defines
how much the radiation is damped when traveling in the sample [41, 42]. This
notation for the refractive index is convenient in the X-Ray regime, where
$|n|$ is very close to unity, and will be extensively used in this manuscript.

An exact description of how the field distribution in the sample is affected
by $\delta$ and $\beta$, regarding the field’s amplitude, phase, and
propagation direction, is highly demanding and essentially requires again the
full solution of the scattering problem. However, in the limit of sufficiently
small $\delta$ and $\beta$, it is possible to assume the so-called _projection
approximation_ [43], reducing the expression for the propagation of the
electric field $E_{s}$ at slice $s$ to the following form:

$\begin{split}E_{s}(x,y)\approx&\,E_{s-1}(x,y)\,e^{\mathrm{\mathbf{i}}\,\mathrm{\mathrm{k}_{0}}\,\Delta
z\,\tilde{n}_{s-1}(x,y)}\\\
=&\,E_{s-1}(x,y)\,e^{\mathrm{\mathbf{i}}\,\mathrm{\mathrm{k}_{0}}\,\Delta
z}\,e^{-\mathrm{\mathbf{i}}\,\mathrm{\mathrm{k}_{0}}\,\Delta
z\,\tilde{\delta}_{s-1}(x,y)}\,e^{-\mathrm{\mathrm{k}_{0}}\,\Delta
z\,\tilde{\beta}_{s-1}(x,y)}\end{split}$ (8)

where $\tilde{\delta}$ and $\tilde{\beta}$ are the values of $\delta$ and
$\beta$ averaged over the slice thickness $\Delta z$, and
$\mathrm{\mathrm{k}_{0}}$ is the radiation wavenumber. This approximation
locally assumes an axial propagation through a homogenous medium. Eq. (8)
recursively describes how the field impinging on slice $s$ is modified by
taking into account the effects of all the preceding slices. A first strong
assumption made by Eq. (8) is that $\delta$ is sufficiently small to neglect
changes in the field propagation direction due to _refractions_ and
_reflections_ , i.e. the electric field always propagates in the axial
direction, even within the sample. Moreover, $\delta$ and $\beta$ are assumed
to be sufficiently small to neglect their influence on the radiation scattered
by the preceding slices, i.e. _secondary_ scattering is completely neglected
(for the discussion of the resulting limitations, see Section 4). In practice,
at a given slice $s$, $\tilde{\delta}_{s}$ introduces a _phase shift_ in the
field, while $\tilde{\beta}_{s}$ exponentially dampens the field magnitude.

Finally, the scattering strength (Eq. (6)) has to be inserted into Eq. (4).
The electric field in the denominator of Eq. (6), which is independent on
$q_{x}$ and $q_{y}$, can be pulled out of the Fourier Transform and simplifies
the global phase pre-factor of the slice. This operation, combined with the
formula for the approximated field propagation in Eq. (8), yields the _main
equation_ of the Scatman approach:

$\begin{split}\Psi&(q_{x},q_{y})\\!\propto\\!\sum_{s}e^{-\mathrm{\mathbf{i}}\,\sqrt{\mathrm{k}_{0}^{2}-q_{x}^{2}-q_{y}^{2}}\,s\,\Delta
z}\,\mathcal{F}\left[\left(\tilde{n}_{s}^{2}-1\right)E_{s}\right](q_{x},q_{y})\\\
&\text{with
}\,\,\,\,\,\,\begin{split}&E_{s}(x,y)=E_{s-1}(x,y)\,e^{\mathrm{\mathbf{i}}\,\mathrm{\mathrm{k}_{0}}\,\Delta
z\,\tilde{n}_{s-1}(x,y)}\\\ &E_{s=0}(x,y)=E_{0}\,\,\,.\\\
\end{split}\end{split}$ (9)

Here the scattered field is defined based on the spatial distribution of the
sample’s optical properties. Although Eq. (9) predicts the scattered electric
field, only its squared amplitude
$I(q_{x},q_{y})=\left|\Psi(q_{x},q_{y})\right|^{2}$ is physically measured in
CDI experiments [44, 1, 3, 16] and should be taken into account for actual
simulations.

##  3 Numerical implementation

Figure 4: A flowchart of the conceptual core of the Scatman in numerical form
is shown. Yellow blocks indicate I/O operations. Green blocks contain data
preparation. The main loop of the program, which carries out the majority of
all calculations, is highlighted in blue. Each block contains a pseudo-code
schematically showing the numerical calculation. The abbreviation DFT stands
for Discrete Fourier Transform, practically computed through the Fast Fourier
Transform algorithm [45].

In this section the concrete numerical implementation of the Scatman is
provided. A flowchart of the program is shown in Fig. 4, and its blocks are
described in the following paragraphs.

###  3.1 Setting up the _virtual_ experiment

#### Read-in the user-defined parameters (Block 1 + 2)

At the beginning of the program, the user-defined input parameters are read-
in. These include experimental details (Block 1) like the irradiation
wavelength $\lambda$, the maximal scattering angle $\theta_{max}$, and the
detector resolution $N$ in pixels. $N=1000$ will result in a virtual detector
of size $1000\times 1000$ pixel. The virtual detector is centered on-axis in
the z-direction, and every _virtual_ pixel has the same angular cross section.
Furthermore, the target is defined via a spatially dependent refractive index
($\delta$ and $\beta$) and the concrete dimensions of the target
($x_{\text{ext}}$, $y_{\text{ext}}$, $z_{\text{ext}}$), as listed in Block 2.
With this set of parameters the experimental setup is uniquely defined.

#### Initialization (Block 3 + 4)

Before entering the program’s main loop, additional parameters are derived
from the user-defined parameters, and the relevant arrays are initialized.

Here, the maximal components of the scattering vector on the $xy$ plane (also
called _detector_ plane) and in the axial direction, $q_{xy}^{\text{max}}$ and
$q_{z}^{\text{max}}$, are calculated. As the Fourier transform in Eq. (9) is
numerically computed in the discrete form, $q_{xy}^{\text{max}}$ is necessary
to assign a corresponding size $dx$ and $dy$ to the slices’ pixels in real
space, and consequently its spatial extension in pixels, $M_{x}$ and $M_{y}$.
The same applies to the axial direction, where $q_{z}$ defines the slice
thickness $\Delta z$, and thus the total amount of slices $S$.

Two complex numerical arrays are then initialized to hold the 2D wavefronts of
the outgoing and the incoming wavefield (Block 4). While the outgoing
wavefield is initialized to zero, the incoming field is initialized to 1,
which is equivalent to a spatially coherent and plane wavefront. The desired
diffraction image can now be iteratively computed within the program’s main
loop.

###  3.2 The main loop

The main loop is the core of the program. Every iteration within it calculates
the scattering contribution of one slice of the sample. Each slice’s input
field is the original plane wave shaped by the optical properties of the
sample up to the slice of interest. The scattered radiation is then corrected
with a proper phase factor.

#### Calculating the local scattered field (Block 5 + 6 + 7)

The first step required to compute the slice’s scattered field is to render
the slice’s scattering potential (Block 5) through the computation of the
sample’s optical properties at the proper spatial coordinates. Calculating the
slice’s scattering contribution is, then, the subject of Blocks 6 and 7,
where, for building intuition, both multiplicative terms are treated in their
own blocks. First, the Fourier transform of the product between the incoming
field and the slice yields the far-field scattering contribution of the latter
(Block 6). Then, the proper phase correction is applied (Block 7). It should
be noted that the scattering vector’s components are derived in pixel units
from their off-axis distance relative to the z-axis. The final wavefield is
then stored in the complex array $\mathtt{SLICE}_{\text{field}}$.

#### Updating the total scattered field and computing the incident field for
the next slice (Block 8 + 9)

The total scattered field is updated in block 8 by adding the scattering
contribution of slice $s$ to the ones of all the previous slices.

Then, in block 9, the incoming field for the next slice is prepared by
propagating the field through slice $s$ along the z-axis, following the
definition in Eq. (8). The decoupling of the total scattered field (Block 8)
and the incoming field for any subsequent slice (Block 9) is enforcing a
central assumption within the Scatman: multiple sequential scattering events
are not allowed to occur. Every slice is, thereby, irradiated by a plane wave,
which traveled through the medium without scattering up to the point where it
encounters the slice.

###  3.3 Preparing the output of the Scatman

After the main loop iterates over all slices in the virtual medium, i.e. when
block 10 reaches the loop break condition, the Scatman’s final piece of code
prepares the output to match the experimental conditions. In the simplest
case, this is just computing the absolute squared value of all slices’ total
scattered field (Block 11). However, it can include the modeling of detector
artifacts, straylight during the experiment, or any other experimental effect
desired to model onto the simulated scattering images.

##  4 Evaluation of the Scatman using exact simulations

As highlighted in the introduction, the Scatman program is an alternative to
the computationally intensive, but versatile, numerical simulations such as
FDTD or DDA methods, and to the fast, but topologically restrictive, Mie’s
analytical solutions to Maxwell equations. However, as underlined in Section
2, the Scatman’s capability of being both fast and versatile is traded off
against the accuracy of the simulation results, which heavily depend on the
choice of the simulation parameters.

During the mathematical formulation of the approach in Section 2, some
approximations were involved. Most of them imply the assumption that the
optical properties of the sample of interest only slightly differ from the
ones of the surrounding medium (assumed here to be vacuum). Therefore, the
Scatman approach is unable to quantitatively reproduce features of the
scattering images when relatively large variations of the refractive index are
present, e.g. close to electronic resonances. Still, probing how _small_ the
variation of the refractive index has to be is of great interest to the user,
to decide whether it is preferable to rely on alternative and more accurate
methods for data analysis. This section provides an overview of the
capabilities and limitations of the Scatman program, where we compare the
simulation results with analytical diffraction patterns obtained via Mie
theory.

Figure 5: Comparison of radial profiles between the Scatman and Mie
calculations. The figure is split into two rows that share a common legend,
which is placed in between both rows. In the upper part, from a) to g), 28
radial profiles are shown that correspond to 28 combinations of $\delta$ and
$\beta$ for a fixed spherical target of radius 7$\lambda$. For each
combination of $\delta$ and $\beta$ the Scatman approximation along the exact
Mie results are plotted in solid and dashed lines, respectively. In the lower
part, the seven subplots from the top part are translated into seven
diffraction images in h) to n), where the intensity of the scattering signal
is encoded in logarithmic color scale. Every diffraction image is partitioned
into eight segments. These eight segments correspond to the eight line-plots
shown in the associated plot from the top row. Every $\delta$ / $\beta$ pair
combination takes up a quarter of every diffraction image, where the solid and
dashed lines surrounding the diffraction image indicate that the quarter is
showing either the approximation of the Scatman program (solid line) or the
exact Mie solution (dashed line).

Fig. 5 shows the results for 28 scattering simulations for a spherical target,
with a different pair of $\delta$ and $\beta$ values each. The figure is split
into two rows that show the radial profiles and the diffraction patterns,
respectively. Both rows share a common legend, which is placed in between:
solid lines represent the Scatman result, dashed lines the Mie solution, and
the colors indicate different $\beta$ values. The top row shows seven subplots
a) to g), where each subplot shows the scattering angle dependence of the
scattered light from a spherical particle for a fixed value for $\delta$ and
four values for $\beta$. The choice to limit the scattering angle to a range
between
$10\text{\,}\mathrm{\SIUnitSymbolDegree}30\text{\,}\mathrm{\SIUnitSymbolDegree}$
corresponds to typical experimental scenarios for CDI experiments within the
WAS regime [34, 35, 23]. In every subplot and for every $\delta$ and $\beta$
pair, two calculations are shown, the solid line is the approximation of the
Scatman program, and the dashed line is the exact Mie solution. The radius of
the spherical target used for the simulations is fixed at 7$\lambda$, which
enables to see the signature of different optical properties, and to
distinguish the maxima and minima of the interference as well. For a fair
comparison between the two simulation methods, a normalization factor has to
be defined: in this case, both Mie and Scatman profiles were normalized on
their integral value computed between
$10\text{\,}\mathrm{\SIUnitSymbolDegree}30\text{\,}\mathrm{\SIUnitSymbolDegree}$.

In the particular case of a spherical target, and assuming non-polarized
light, the simulated diffraction image is identical in all scattering
directions. This symmetry property is exploited in the bottom row of Fig. 5.
The seven subplots from the top row are translated into seven diffraction
images h) to n), where every diffraction image is partitioned into eight
segments. These eight segments correspond to the eight line-plots provided in
the associated subplot from the top row. Every $\delta$ / $\beta$ pair
combination takes up a quarter of every diffraction image, where the solid and
dashed lines surrounding the diffraction image correspond to the approximation
of the Scatman program (solid line) and the exact Mie solution (dashed line).

Therefore, the bottom row is not adding new data to the figure but is
providing a strong proxy for building intuition on how the scattering image
looks like. Furthermore, it enables a qualitative assertion on the diffraction
images, which is often sufficient to deduce the sample’s underlying
topological properties. [34, 35, 23].

The simplest case during this evaluation is for $\delta=0$ in combination with
the smallest $\beta$ value ($0.001$). There, the wavefield that propagates
throughout the medium is identical in phase with a reference field propagating
through the surrounding vacuum and only very weakly absorbed. The
corresponding Scatman and Mie calculations are shown in blue in Fig. 5 d) and
k). The solid and dashed blue-indicated slices in the diffraction image in k)
are indistinguishable by eye, just as the radial profiles in d). However, when
increasing the absorption from $0.0010.01$, slight deviations become visible
at high scattering angles, where the Scatman program produces a radial profile
in which the maxima are shifted towards higher scattering angles, and the
amplitude is slightly too high compared to the analytical results.

This behavior is core to all Scatman approximations where the absolute value
of $\delta$ is comparably small ($|\delta|\lessapprox 0.1$). With increasing
absorption, the Scatman overestimates the signal’s total amplitude and shifts
the extrema at larger scattering angles towards even larger scattering angles.
Therefore, when $\delta$ is comparatively small, the quality of the Scatman’s
simulation is anticorrelated with the absorption in the medium.

The scenario strongly varies when larger values for $\delta$ are considered.
There, the Scatman’s behavior is more complicated, mostly due to the
appearance of intricate resonance effects that arise from the interplay
between the target’s geometry and the wavefield. Such resonance effects are
more pronounced for positive values for $\delta$ (refractive index smaller
than unity), for example, observed in the atomic near-resonance regime, where
the photon energy dependence of $\delta$ resembles a Fano profile. Thus, the
assertion concerning the $\delta$-dependence must be split for positive and
negative values. At negative values, broadly speaking in the off-resonance
case, the deviations between the Scatman and the Mie simulation are mainly due
to an overestimation of the amplitude with a relatively tiny shift of the
extrema’s positions in the radial profiles. However, at positive values for
$\delta$, the deviations between both simulations are significant. With
$\delta$ values above $0.1$, not shown here, the resulting radial profiles
wildly differ from another.

Therefore, besides the anticorrelation with $\beta$ for small $\delta$, the
second deduction that can be made here is that the Scatman produces worsening
diffraction images with a more positive $\delta$ (refractive index smaller
than unity). The pivotal point for this to happen is for $\delta\gtrapprox
0.1$.

So far, the comparison between the Scatman’s results and Mie theory was
restricted to a fixed target size. However, the features of scattering images
of isolated nanoparticles vary significantly, also depending on the targets’
size [46, 47, 48]. Thus, a more exhaustive comparison, which includes also
size effects, is presented in the Supplemental Material.

Concluding, the approximation employed by the Scatman program produces in most
cases diffraction patterns of very high quality compared to the analytical Mie
solution for spherical particles. In general, the quality of the routine is
best when the phase term in the refractive index is small
($|\delta|\lessapprox 0.02$). Then, only minor deviations are observed and the
Scatman’s approximation could even be used as a replacement for the Mie theory
based solution. With increasing absolute values for $\delta$, the quality
deteriorates as well, where larger positive values for $\delta$ are yielding
worse results than larger negative values.

At low $\delta$ values, the absorption ($\beta$) is anti-correlated with the
quality of the approximation, yielding high quality diffraction images when
absorption is low. This relationship, however, is reversed for larger absolute
values of $\delta$, where a larger amount of absorption yields a better
comparison to the Mie theory calculations.

The next section now introduces PyScatman, a high-level Python front-end for
the Scatman method.

##  5 PyScatman: a high-level Python front-end

In this section we present and explain the reference implementation of the
Scatman in the form of a Python module, called PyScatman. The source code is
available under the MIT license111https://spdx.org/licenses/MIT.html at
https://gitlab.ethz.ch/nux/numerical-physics/pyscatman, while the
documentation can be found at https://nux-group.gitlab.io/pyscatman/.

The module is written in C++ [49] with bindings in Python using the PyBind11
C++ library [50]. This hybrid approach enables us to maintain the highest
possible simulation speed via compiled C++ code while keeping a Python-only
user-friendly interface. The implementation is highly parallelized for multi-
core CPUs, and takes advantage of Nvidia GPU accelerators via the CUDA library
[51]. At the current stage, PyScatman performs all the computations in _single
floating point precision_ (32 bit).

In Section 5.1 a fundamental example is provided and explained. There, an
experiment is set up, an ideal detector is defined, and a simple shape is
generated.

Building on this, Section 5.2 provides a more advanced example, where three
shapes are generated using three different methods, and where a detector that
simulates photon statistics is used. This second example is meant to highlight
the great flexibility the PyScatman module offers in terms of defining a
target’s shape.

Finally, in Section 6, the implementation is extensively benchmarked with
respect to its execution time on either the CPU or the GPU using various
shapes.

###  5.1 A fundamental example

In this section, a fundamental example is provided and explained. We
demonstrate the basic functionality and show the easiest way for how to define
the target’s shape.

For discussing the elements in the script we will refer to the line numbers.

⬇

1import scatman

2

3"""

41) Set up the experiment.

5"""

6scatman.set_experiment(

7 wavelength=40, # in nm

8 angle=30, # in degree

9 resolution=1024 # in pixels

10)

11

12"""

132) Define the detector type.

14

15MSFT is a virtual detector, returning the plain MSFT result

16"""

17detector = scatman.Detectors.MSFT()

18

19"""

203) Define a shape.

21

22Here, an ellipsoid model is used.

23"""

24shape_el = scatman.Shapes.Ellipsoid(

25 a=100, # the semi-axes in nm

26 b=60,

27 c=60,

28 delta=0.001, # refractive index

29 beta=0.01,

30 latitude=40, # the orientation in space

31 longitude=30, # see Fig. 6

32 rotation=0

33)

34

35"""

364) Perform the MSFT calculation.

37

38The detector class provides the simulation

39result via its ’acquire’ method.

40"""

41pattern_el = detector.acquire(

42 shape=shape_el)

Listing 1: A fundamental PyScatman example. Here, we set up the experiment,
define a detector function and calculate the MSFT simulation for an
ellipsoidal sample.

#### Define an experiment (line $110$):

After the `scatman` module is imported, the experimental conditions are set
up, by defining the irradiation wavelength in $\mathrm{nm}$, the maximal
scattering angle in degrees, and the desired detector resolution in
$\mathrm{px}$. Within PyScatman, there is no preferred length unit: the only
requirement is to keep the same unit ($\mathrm{nm}$ in this example) along the
whole script. An additional optional parameter that defines the radiation
intensity is described later in the advanced example in subsection 5.2.

#### Define a detector (line $17$):

The scatman module provides three detector types: `MSFT`, `Ideal` and `MCP`.
`MSFT` is a _virtual_ detector, which directly yields the plain MSFT
calculation, while the `Ideal` one attempts to model realistic photon
statistics and noise augmentation. The `Ideal` detector is described as part
of the advanced example in subsection 5.2. Finally, the PyScatman provides the
`MCP` class, which aims at simulating a scattering detector based on a
microchannel plate (MCP) [52], often used in CDI experiments [53, 34, 35, 54].
The `MCP` class is not described here as it is beyond the scope of this
manuscript. However, a full description can be found in the _Detectors_
section in the official PyScatman documentation222https://nux-
group.gitlab.io/pyscatman/detectors.html.

In this fundamental example, the `MSFT` detector is used, which returns the
exact MSFT calculation.

#### Define a shape (line $2433$):

PyScatman comes with several pre-defined sample shape models, each with
specific parameters that define their appearance333Please find a detailed
explanation of every shape, along with images showing each axes, in the
official documentation under _The Shapes_ at: https://nux-
group.gitlab.io/pyscatman/shapes.html.. The sample described in listing 1 is
of `Ellipsoid` shape and is shown in Fig. 7 a). Note that the three axes of
the ellipsoid are given in $\mathrm{nm}$ unit, as they must be consistent with
the definition of the radiation wavelength set at line $7$.

All shapes have a `delta`, `beta`, `latitude`, `longitude`, and `rotation`
preference, which define their refractive index inside the sample and their
orientation in space (see Fig. 6 for a schematic on how the coordinates are
defined). There, the `latitude` and `longitude` properties follow the standard
convention used also for defining the coordinates on Earth, where the North-
South axis is along the $z$ direction (solid gray line).

Figure 6: Schematic of the orientation in space for the _latitude_ ,
_longitude_ , and _rotation_ properties for the shapes in the PyScatman
module. A shape model is oriented by setting the direction in space of its
main axis. This direction is defined through _latitude_ and _longitude_
parameters, expressed on a reference system where $90^{\circ}$ latitude
indicates a direction towards the incoming beam and, thus, $-90^{\circ}$
latitude towards the detector. The _equator_ of the reference system, at
$0^{\circ}$ latitude, lies on the plane orthogonal to the beam. Once that the
shape’s main axis is oriented, a _rotation_ is applied to the sample along
this axis. Here, the simulated sample reflects Earth’s _elevation_ , to
highlight the large flexibility that the PyScatman module offers in terms of
how to define the target shape. The sample was modeled though an adaptation of
_ETOPO1_ data [55], here in an exaggerated scale, which provides Earth’s
elevation as function of the Earth’s coordinates, and simulated by the use of
the _RadialMap_ shape model. Please see listing 2 for further details on how
to define such a shape.

#### Calculate the MSFT (line $4142$):

After having defined a shape and a detector for an experiment, we can use the
`acquire` method of the _detector_ class to calculate the MSFT-based
diffraction image. In this example, the variable `pattern_el` is a Numpy array
with dimensions $1024\text{\times}1024$, as this was the resolution set at
line $9$. The final calculation of the diffraction image is shown in Fig. 7
e).

Figure 7: Rendering of the shapes and their respective simulated diffraction
patterns using two different detectors. From a) to d), the 3D rendering of the
shape objects, defined using the _Ellipsoid_ (a), _SphericalHarmonics_ (b),
_RadialMap_ (c) and _VolumeMap_ (d) models, respectively. The _RadialMap_
example in c) has an inset showing the array that was used for creating the
shape, where the radius information is color coded. The corresponding
diffraction patterns of samples a) to d), computed by PyScatman via the _MSFT_
detector, are shown in e) to h). The third row, from i) to l), shows instead
the equivalent simulations’ results provided by the _Ideal_ detector. Here,
the effects of photon statistics is clearly visible, along with the dependence
on the value of the absorption coefficient. For example, the samples in b) and
c) have an absorption coefficient $\beta=0.01$ and $\beta=0.05$ respectively,
which reflect into a signal to noise ratio higher in k) than in j). Refer to
the examples in the main text for further details.

###  5.2 A more advanced example

One of the main advantages of the PyScatman module is the flexibility with
which any arbitrary shape can be defined. In addition to the pre-defined
shapes introduced in section 5.1, here we present three additional methods
that PyScatman provides for defining an arbitrary shape: (i)
_SphericalHarmonics_ , (ii) a _RadialMap_ and (iii) _VolumeMap_. All three
methods are described in listing 2.

⬇

1import scatman

2

3"""

4We re-use the experiment from listing 1. An optional parameter to define the
photon density is added.

5"""

6scatman.set_experiment(

7 wavelength=40, # in nm

8 angle=30, # in degree

9 resolution=512 # in pixels

10 photon_density=1.e2 # in counts per squared nm

11)

12

13"""

14We define an ’Ideal’ detector.

15See text in Section 5.2 for a full explanation.

16"""

17detector = scatman.Detectors.Ideal()

18

19"""

20Here, we define three additional shapes, using three

21different methods.

22

23Shape (1/3): Define an arbitrary shape using spherical

24 harmonics coefficients. See Fig. 7b)

25"""

26shape_sh = scatman.Shapes.SphericalHarmonics(

27 coefficients=[[0, 0, 200.0],

28 [3, 2, 20.0],

29 [6, 4, 4.0],

30 [9, 6, 2.0]],

31 delta=0.01, # refractive index

32 beta=0.001,

33 latitude=30, # the orientation in space

34 longitude=-40, # see Fig. 6

35 rotation=0

36)

37

38"""

39Shape (2/3): Define an arbitrary shape using a radial map.

40 See Fig. 7c)

41"""

42shape_rm = scatman.Shapes.RadialMap(

43 radii=radial_map_data,

44 delta=-0.01, # refractive index

45 beta=0.01,

46 latitude=0, # the orientation in space

47 longitude=180, # see Fig. 6

48 rotation=30

49)

50

51"""

52Shape (3/3): Define an arbitrary shape using a volume map.

53 See Fig. 7 d)

54"""

55shape_vm = scatman.Shapes.VolumeMap(

56 dx=6.5,

57 data=volume_data,

58 delta=-0.001, # refractive index

59 beta=0.001,

60 latitude=60, # the orientation in space

61 longitude=-70, # see Fig. 6

62 rotation=30

63)

64

65"""

66Perform the MSFT calculation in parallel for all three shapes.

67"""

68patterns = detector.acquire(

69 shape=[shape_sh, shape_rm, shape_vm]

70)

Listing 2: A more advanced PyScatman example. Here, we calculate the MSFT
diffraction images for various samples whose shapes are defined each in a
different way.

#### Defining an _Ideal_ detector (line $117$):

We import the PyScatman module and set up the same experiment as in listing 1,
with the addition of the optional parameter `photon_density` that plays a role
in the later-defined `Ideal` detector. The idea behind the implementation of
the `Ideal` detector is that even a perfect real-life detector is subjected to
Poisson statistics of photons, which augments the recorded diffraction images.
In order to model this effect, an estimate on the amount of scattered photons
has to be calculated, and then used to add the proper Poisson noise to the
simulated diffraction pattern. A description of how this data augmentation is
implemented in PyScatman is given in the Supplemental Material.

#### Shape (1/3) via spherical harmonic coefficients (line $2636$):

Any shape that is described by a radius as function of the azimuthal and polar
angles, can be also defined using spherical harmonic coefficients. A notable
example is the equipotential surface of the gravity potential of the Earth,
which is termed the _Geoid_ and is defined using spherical harmonics [56].

In general, the convention we use for the Laplace spherical harmonics
($Y_{\ell}^{m}$) are defined as:

$Y_{\ell}^{m}(\vartheta,\varphi)=\sqrt{{\frac{(2\ell+1)}{4\pi}}{\frac{(\ell-m)!}{(\ell+m)!}}}\,P_{\ell}^{m}(\cos{\vartheta})\,e^{im\varphi},$
(10)

where $m$ and $l$ are the order and degree of the harmonics, $\vartheta$ and
$\varphi$ are the azimuthal and polar angles within the spherical coordinate
system, and $P_{\ell}^{m}$ are the associated Legendre polynomials defined as:

$P_{\ell}^{-m}=(-1)^{m}\frac{(\ell-m)!}{(\ell+m)!}P_{\ell}^{m}\,.$ (11)

The PyScatman’s `SphericalHarmonics` class expects a list of triplets, where
the first value corresponds to degree $l$, the second value to the order $m$,
and the third value to a scaling parameter with which
$Y_{\ell}^{m}(\theta,\varphi)$ is multiplied. The final shape is then the sum
of all triplets within the passed list.

The shape defined at line $2636$ in listing 2 can be seen in Fig. 7 b), along
the calculated MSFT diffraction image for this shape in Fig. 7 f).

#### Shape (2/3) via a radii map (line $4249$):

A second method for defining an arbitrary shape within the PyScatman is to
provide a two-dimensional array of any size that holds the length of the radii
for all values of both angles $\theta$ and $\varphi$, which can be interpreted
as the _latitude_ and _longitude_ coordinates. For example, when an array with
size $4\text{\times}4\text{\,}\mathrm{px}$ is passed, then these values define
the radii of the shape at the $\theta$ values $\nicefrac{{-\pi}}{{2}}$,
$\nicefrac{{-\pi}}{{4}}$, $0$, and $\nicefrac{{\pi}}{{4}}$, and for $\varphi$
at the values $0$, $\nicefrac{{\pi}}{{2}}$, $\pi$, and
$\nicefrac{{3\pi}}{{2}}$. These values are then linearly interpolated when the
sample shape is rendered at the proper resolution, depending on the sample
size and the _experimental_ conditions defined at line $611$.

The shape of type `RadialMap` presented in the example, named `shape_rm`, is
produced by the 2D radii map `radial_map_data` (of size
$1920\text{\times}960$) given as argument in line $43$. The rendered shape can
be found in Fig. 7 c), where an inset shows the used radii map. The MSFT
calculation for this shape is shown in Fig. 7 g).

#### Shape (3/3) via a 3D volume map (line $5563$):

The third method for defining an arbitrary shape is via a so-called volume
map. The `VolumeMap` class of PyScatman requires a three-dimensional array of
boolean type (`volume_data` at line 59, here of size
$200\text{\times}100\text{\times}50$), which can have any size. The `dx`
parameter, then, defines the linear size of a single volume unit of the 3D
array `volume_data`, and, as usual, must be expressed in the same length unit
of the wavelength. For example, if a
$10\text{\times}10\text{\times}10\text{\,}\mathrm{px}$ array with every value
set as boolean _True_ is passed as `data` argument, and the `dx` argument is
set to $2$, we end up with a cubic shape of size
$20\text{\times}20\text{\times}20\text{\,}\mathrm{nm}$. If we want to scale up
that cube by a factor of $2$, we can set the `dx` property to $4$, which
results in a cube with doubled dimensions. The 3D rendering of the shape
defined in this example is presented in Fig. 7 d), along with its MSFT
simulation in Fig. 7 h). PyScatman also provides the possibility to perform
simulations of non-uniform samples via a completely arbitrary voxel
representation of the refractive index . This feature is not presented here
for sake of simplicity: for more information please visit the software
documentation.

#### Obtaining the results (line $7072$):

Finally, the simulation is performed for all three shapes. All shapes can be
simulated through a single call to the `Ideal` detector’s `acquire` method,
passing them as a list. This possibility is implemented for allowing the
PyScatman module to better exploit parallel computing hardware (and especially
multiple GPUs) when large datasets have to be simulated (see Section 6 for
further details). The `patterns` array yields the simulations, formatted as a
list of 2D arrays that contain the simulation result for the shapes
`shape_sh`, `shape_rm` and `shape_vm`. These patterns are depicted in Fig. 7
j), 7 k) and 7 l) respectively, where the effects of photon statistics
simulated by the `Ideal` detector are clearly visible.

##  6 Performance considerations

Our primary intention for the PyScatman module is to enable data analysis on
diffraction patterns by forward-fitting the MSFT simulation with the
experimental results, since _classical_ Fourier reconstruction via _phase
retrieval_ methods is not possible for wide-angle scattering. The model
fitting approach consists in _guessing_ a target’s shape, simulating its
diffraction pattern, comparing it with the desired experimental data, and then
iteratively improving the guess until the MSFT simulation is sufficiently
close to the experimental image. Such an optimization scheme is
computationally expensive in its own right. Therefore, it is of utmost
importance to speed up the MSFT simulation as much as possible.

To this end, we provide in this section an overview on some benchmark results
on CPU and GPU, based on the examples shown in listings 1 and 2.

A dissection of the total computational cost of the MSFT routine reveals that
time consumption of the simulation is mostly determined by the amount of
Discrete Fourier Transforms (DFTs) (one for each slice), and the target’s
rendering process. Time complexity of a single DFT is given by
$C_{\text{DFT}}\sim O[N_{p}^{2}\,\log(N_{p}^{2})]$ [45], where $N_{p}$ is the
resolution of the output image along a single axis. The complexity for MSFT
algorithm scales linearly with the number of slices ($N_{s}$), so that the
total time complexity of the MSFT’s DFT part scales with $C_{\text{MSFT,
DFT}}\sim O[N_{s}\,N_{p}^{2}\,\log(N_{p}^{2})]$. Moreover, the time complexity
of the rendering process ($C_{\text{MSFT, Render}}$) can be roughly estimated
as $C_{\text{MSFT, Render}}\sim O[N_{s}^{3}]$.

These considerations show that the resolution of the output image and the
spatial extension of the sample, on which $N_{p}$ and $N_{s}$ respectively
depend, are the determining factors for the running time of a PyScatman
simulation.

When a single shape object is given to the detector’s _acquire_ method, the
PyScatman module carries out the MSFT simulation differently depending on the
available hardware:

  * •

CPU-only systems: Slice rendering is sequential, where each slice is rendered
using all CPU cores in parallel. After all $N_{s}$ slices are rendered, all
CPUs perform the DFT calculations using the _embarrassingly parallel_ scheme.

  * •

Single NVIDIA® GPU: Each slice rendering and its respective DFT calculation
are performed in parallel by the CUDA cores. Only one CPU is used for taking
care of data preparation, inter-process communication and merging.

Therefore, if only a single shape is passed to the detector’s `acquire`
method, as it happens in Listing 1, then, even in the case of a multi-GPU
system, only one GPU is used, as the overhead caused by data transfers between
the different GPUs’ memory would prevent a performance scaling.

However, when multiple shapes are to be simulated, as the example presented in
Listing 2, multiple GPUs can speed up computation:

  * •

CPU-only systems: The multiple shapes are split evenly between all available
CPU cores, where, subsequently, each core takes care of performing the shape
rendering and the DFT calculations.

  * •

Single NVIDIA® GPU: Similarly to the CPU-only case, the multiple shapes are
split evenly between all available CPU cores. Each CPU, then, properly set up
the shape’s data and submits the work to the GPU, where the CUDA cores
calculate the rendering and the DFTs for all slices.

  * •

Multiple NVIDIA® GPUs: Similar to the Single GPU case with the exception that
the available CPUs are placed in groups where each group has an assigned GPU.
For example, in an eight CPU cores / four GPUs system, two CPUs would share a
single GPU and coordinate as in the Single GPU case.

Here, we present some benchmark results that we consider representative of
_real-life_ situations. First, it is worth noting that the amount of
computation, and thus the time to solution, depends on some factors (with most
of them that can be deduced from Fig. 4):

  * •

Simulation resolution: the greater the number of pixels in the output image,
the greater the computational cost.

  * •

Shape extension: The greater the ratio between the sample size and the
wavelength $\lambda$, the higher the amount of shape voxels to be rendered.
Moreover, a greater scattering angle corresponds to a greater spatial
resolution, such that the amount of pixels to be rendered increases
accordingly to the maximum scattering angle $\theta_{\text{max}}$.

  * •

Shape complexity: the function that defines the shape optical properties,
$\delta(x,y,z)$ and $\beta(x,y,z)$ have a non-negligible computational cost,
depending both on the shape type and the input data.

Among these three aspects, the contribution of the shape complexity to the
total computing time is the less straightforward to evaluate in a systematic
and quantitative manner, as it highly depends on the shape type and the values
of its parameters. For example, the `SphericalHarmonics` complexity is
particularly low when only few harmonics coefficients are provided as input:
as the amount of harmonics coefficients increases, the data preparation step,
which consists in the computation of the Spherical Harmonics transform, starts
to take a relevant part in the computation time. The same happens, for
example, for the `VolumeMap` object, for which the time dedicated to data
transfer has an effect on the time to solution, depending on the size of the
3D array given as input. The authors are convinced that such a _case-by-case_
study goes beyond the scope of this manuscript, and encourage the reader to
install the PyScatman module and test it for the cases of interest.

However, to give a rough idea about performance for different sample shapes, a
first test is performed on the same four shape objects defined in the examples
of the previous section, that are `shape_el` (`Ellipsoid`), `shape_sh`
(`SphericalHarmonics`), `shape_rm` (`RadialMap`) and `shape_vm` (`VolumeMap`),
keeping the same experimental conditions and detector resolution. Here, the
detector used is the `MSFT` one, yielding the diffraction patterns shown in
Fig. 7 e) to 7 h). The performance evaluation was accomplished on a
workstation, equipped with an Intel® CoreTM i9-9900K CPU accelerated by a GPU
NVIDIA® GeForce® RTX 2080 Ti.

Figure 8: In a), timing results for the shapes presented as examples in
Listing 1 and Listing 2. The time to solution is shown in logarithmic scale
versus the different shape types. In b), timing results for a shape defined
through the _SperhicalHarmonics_ model are given. The harmonics coefficients
are the same of the example presented in the main text, but the shape is
scaled to get different average radii, indicated on the lower $x$ axis in
units of the wavelength $\lambda$. Results are presented for four different
simulation resolutions, from $256\times 256$ up to $2048\times 2048$ pixel,
labeled on the upper $x$ axis.

The simulation time is shown in Fig. 8 a). On the $x$ axis the four different
shape models are labeled. The time to solution is on the $y$ axis, expressed
in milliseconds on a logarithmic scale. The time shown is the execution time
of a single call to the detector’s `acquire` method, with a single shape
object given as argument and averaged over 100 repetitions to rule out
statistical fluctuations. Two features are evident in the figure: first, the
performance difference between the CPU time and the respective GPU one is
around two orders of magnitude. Second, the time to solution depends on the
shape. The first observation well underlines why the PyScatman implementation,
when executed on a GPU, really enables a new kind of data analysis with the
Scatman approach. The second feature, instead, is due to different shape sizes
and complexities.

To quantitatively investigate the dependence of simulation time on the
detector resolution and the sample’s spatial extension, a second test is
presented in Fig. 8 b) . All the timing values in this test are based upon the
same sample shape rendered in Fig. 7 b), defined through the
`SphericalHarmonics` model. Here, that shape is _scaled_ to match different
average radii, that are $3\lambda$, $5\lambda$, $10\lambda$ and $20\lambda$,
in order to get different sample spatial extensions without varying their
_complexity_. For each of them, two evaluations of the time to solution are
performed, one running on the CPU and the other on the GPU. The whole
operation is repeated for four different detector’s resolutions, that are
$256\times 256$, $512\times 512$, $1024\times 1024$ and $2048\times 2048$
pixel. Here, again, the great advantage gained through the GPU computing
arises. In particular, it is worth noting that the difference of around two
orders of magnitude in the simulation time between GPU and CPU is consistently
present for all the different sample’s sizes and the resolutions of the
diffraction patterns, with the GPU that is still capable of performing more
than ten simulations per second even in the worst, most complex case.

The presented timing results show the performance of the PyScatman module at
the current stage. The software is, however, still under development, and
better timing performances are expected in future software releases thanks to
a better optimization of the GPU management.

##  7 Summary

In this paper we introduced the Scatman, an approximate method to simulate
wide-angle diffraction patterns from coherent and monochromatic light based on
the Multi-Slice Fourier Transform. The scientific impact of the method is
already demonstrated by previous publications that made use of the Scatman,
while it was under development, to retrieve three dimensional morphological
information on silver nanocrystals [23] and helium nanodroplets [35] from
single wide-angle diffraction images.

The need for an approximate simulation tool arises from the severe limitations
of the available exact methods: Mie calculations, which are fast but can be
used only for highly symmetrical samples, and Finite Difference Time Domain or
Discrete Dipole Approximation simulations, which are computationally heavy.
The Scatman was conceived to be both generic, i.e. capable of simulating the
scattering from any kind of sample, and sufficiently fast, enabling the
retrieval of the sample morphology by fitting the experimental diffraction
patterns via a _model fitting_ approach.

The mathematical foundations of the method were presented, highlighting the
main approximations that make the Scatman results deviate from the exact ones.
The effects of these approximations as function of the input parameters were
investigated, by comparing the Scatman simulations and the exact Mie
calculations for a spherical sample. Within given bounds on the optical
properties of the sample and its spatial extension, the Scatman results proved
to be in quantitative agreement with exact calculations.

We presented our reference implementation of the Scatman, called PyScatman,
that is released as Open Source software with this manuscript and is freely
available online. PyScatman, implemented as a Python module, provides an easy
interface to the user and a set of additional functionalities useful for data
analysis. PyScatman is entirely written in C++ and makes use of state of the
art programming techniques to take full advantage from the most recent
computing hardware, including GPU accelerators. The computational performance
of PyScatman was briefly presented, demonstrating the possibility to perform
wide-angle scattering simulations in few to few tens of milliseconds on
consumer-level computing hardware. These computing times well suit the
extensive use of PyScatman in the analysis of experimental data via forward-
fitting procedures, thus opening new perspectives for Coherent Diffraction
Imaging in wide-angle scattering conditions.

The Scatman method described here is a stable and tested snapshot of its
current development. Further enhancements are under study, focusing on both
the physics aspect and the software implementation. In terms of software, the
inclusion of additional, more sophisticated and ductile shape models is
planned, along with a more efficient management of computing resources. On the
physics side, the partial inclusion of secondary effects like multiple
scattering, refraction and reflection is under study, extending the range of
applicability of the approach to samples whose refractive index varies more
strongly from unity.

The Scatman method and its software implementation aims at being a reference
tool for the Coherent Diffraction Imaging community, and can be of great
interest for other scientific fields where elastic scattering of coherent
radiation plays a role, like the recently growing Electron Diffraction Imaging
techniques. Moreover, the high-performance software implementation, PyScatman,
well suits the increasing interest in big-data analysis and Artificial
Intelligence, and its combination with AI techniques is already in a
prototyping phase.

#### Acknowledgments

This project was funded by the Swiss National Science Foundation via the NCCR
MUST. Further funding is acknowledged from: DFG grants MO 719/13-1 and MO
719/14-2; the SNF grant No. 200021E_193642 ; the Deutsche
Forschungsgemeinschaft via SFB 652 and SFB 1477; Heisenberg-Grant (ID:
436382461) via SPP1840 (ID: 281272685); the Bundesministerium für Bildung und
Forschung (BMBF, ID: 05K16HRB); the European Social Fund and the Ministry of
Education, Science and Culture of Mecklenburg-Vorpommern, Germany, via project
NEISS (ID: ESF/14-BM-A55-0007/19).

## References

  * [1] Henry N Chapman and Keith A Nugent.  Coherent lensless x-ray imaging.  Nature photonics, 4(12):833–839, 2010.
  * [2] Jianwei Miao, Richard L Sandberg, and Changyong Song.  Coherent x-ray diffraction imaging.  IEEE Journal of selected topics in quantum electronics, 18(1):399–410, 2011.
  * [3] M Marvin Seibert, Tomas Ekeberg, Filipe RNC Maia, Martin Svenda, Jakob Andreasson, Olof Jönsson, Duško Odić, Bianca Iwan, Andrea Rocker, Daniel Westphal, et al.  Single mimivirus particles intercepted and imaged with an x-ray laser.  Nature, 470(7332):78–81, 2011.
  * [4] André Guinier, Gérard Fournet, and Kenneth L Yudowitch.  Small-angle scattering of x-rays.  1955\.
  * [5] Max Born.  Quantenmechanik der stoßvorgänge.  Zeitschrift für Physik, 38(11-12):803–827, 1926.
  * [6] Jianwei Miao, Pambos Charalambous, Janos Kirz, and David Sayre.  Extending the methodology of x-ray crystallography to allow imaging of micrometre-sized non-crystalline specimens.  Nature, 400(6742):342–344, 1999.
  * [7] James R Fienup.  Phase retrieval algorithms: a comparison.  Applied optics, 21(15):2758–2769, 1982.
  * [8] Stefano Marchesini.  Invited article: A unified evaluation of iterative projection algorithms for phase retrieval.  Review of scientific instruments, 78(1):011301, 2007.
  * [9] ND Loh, Christina Y Hampton, Andrew V Martin, Dmitri Starodub, Raymond G Sierra, Anton Barty, Andrew Aquila, Joachim Schulz, Lukas Lomb, Jan Steinbrener, et al.  Fractal morphology, imaging and mass spectrometry of single aerosol particles in flight.  Nature, 486(7404):513–517, 2012.
  * [10] E Pedersoli, ND Loh, F Capotondi, CY Hampton, RG Sierra, D Starodub, C Bostedt, J Bozek, AJ Nelson, M Aslam, et al.  Mesoscale morphology of airborne core–shell nanoparticle clusters: X-ray laser coherent diffraction imaging.  Journal of Physics B: Atomic, Molecular and Optical Physics, 46(16):164033, 2013.
  * [11] Jianwei Miao, Chien-Chun Chen, Changyong Song, Yoshinori Nishino, Yoshiki Kohmura, Tetsuya Ishikawa, Damien Ramunno-Johnson, Ting-Kuo Lee, and Subhash H Risbud.  Three-dimensional gan- ga 2 o 3 core shell structure revealed by x-ray diffraction microscopy.  Physical review letters, 97(21):215503, 2006.
  * [12] Huaidong Jiang, Changyong Song, Chien-Chun Chen, Rui Xu, Kevin S Raines, Benjamin P Fahimian, Chien-Hung Lu, Ting-Kuo Lee, Akio Nakashima, Jun Urano, et al.  Quantitative 3d imaging of whole, unstained cells by using x-ray diffraction microscopy.  Proceedings of the National Academy of Sciences, 107(25):11234–11239, 2010.
  * [13] Ida V Lundholm, Jonas A Sellberg, Tomas Ekeberg, Max F Hantke, Kenta Okamoto, Gijs van der Schot, Jakob Andreasson, Anton Barty, Johan Bielecki, Petr Bruza, et al.  Considerations for three-dimensional image reconstruction from experimental data in coherent diffractive imaging.  IUCrJ, 5(5):531–541, 2018.
  * [14] ND Loh, Michael J Bogan, Veit Elser, Anton Barty, Sébastien Boutet, Saša Bajt, Janos Hajdu, Tomas Ekeberg, Filipe RNC Maia, Joachim Schulz, et al.  Cryptotomography: reconstructing 3d fourier intensities from randomly oriented single-shot diffraction patterns.  Physical review letters, 104(22):225501, 2010.
  * [15] Ne-Te Duane Loh and Veit Elser.  Reconstruction algorithm for single-particle diffraction imaging experiments.  Physical Review E, 80(2):026705, 2009.
  * [16] Tomas Ekeberg, Martin Svenda, Chantal Abergel, Filipe RNC Maia, Virginie Seltzer, Jean-Michel Claverie, Max Hantke, Olof Jönsson, Carl Nettelblad, Gijs Van Der Schot, et al.  Three-dimensional reconstruction of the giant mimivirus particle with an x-ray free-electron laser.  Physical review letters, 114(9):098102, 2015.
  * [17] Josef Feldhaus, John Arthur, and JB Hastings.  X-ray free-electron lasers.  Journal of Physics B: Atomic, molecular and optical physics, 38(9):S799, 2005.
  * [18] M Harmand, R Coffee, Mina R Bionta, Matthieu Chollet, D French, D Zhu, DM Fritz, HT Lemke, N Medvedev, B Ziaja, et al.  Achieving few-femtosecond time-sorting at hard x-ray free-electron lasers.  Nature Photonics, 7(3):215–218, 2013.
  * [19] Anton Barty, Jochen Küpper, and Henry N Chapman.  Molecular imaging using x-ray free-electron lasers.  Annual review of physical chemistry, 64, 2013.
  * [20] Henry N Chapman, Anton Barty, Michael J Bogan, Sébastien Boutet, Matthias Frank, Stefan P Hau-Riege, Stefano Marchesini, Bruce W Woods, Saša Bajt, W Henry Benner, et al.  Femtosecond diffractive imaging with a soft-x-ray free-electron laser.  Nature Physics, 2(12):839–843, 2006.
  * [21] Henry N Chapman, Carl Caleman, and Nicusor Timneanu.  Diffraction before destruction.  Philosophical Transactions of the Royal Society B: Biological Sciences, 369(1647):20130313, 2014.
  * [22] Rui Xu, Huaidong Jiang, Changyong Song, Jose A Rodriguez, Zhifeng Huang, Chien-Chun Chen, Daewoong Nam, Jaehyun Park, Marcus Gallagher-Jones, Sangsoo Kim, et al.  Single-shot three-dimensional structure determination of nanocrystals with femtosecond x-ray free-electron laser pulses.  Nature communications, 5(1):1–9, 2014.
  * [23] Ingo Barke, Hannes Hartmann, Daniela Rupp, Leonie Flückiger, Mario Sauppe, Marcus Adolph, Sebastian Schorb, Christoph Bostedt, Rolf Treusch, Christian Peltz, et al.  The 3d-architecture of individual free silver nanoparticles captured by x-ray scattering.  Nature communications, 6(1):1–7, 2015.
  * [24] Kevin S Raines, Sara Salha, Richard L Sandberg, Huaidong Jiang, Jose A Rodríguez, Benjamin P Fahimian, Henry C Kapteyn, Jincheng Du, and Jianwei Miao.  Three-dimensional structure determination from a single view.  Nature, 463(7278):214–217, 2010.
  * [25] Ge Wang, Hengyong Yu, Wenxiang Cong, and Alexander Katsevich.  Non-uniqueness and instability of ‘ankylography’.  Nature, 480(7375):E2–E3, 2011.
  * [26] Jianwei Miao, Chien-Chun Chen, Yu Mao, Leigh S Martin, and Henry C Kapteyn.  Potential and challenge of ankylography.  arXiv preprint arXiv:1112.4459, 2011.
  * [27] David W Hahn.  Light scattering theory.  Department of Mechanical and Aerospace Engineering, University of Florida, 2009.
  * [28] Craig F Bohren and Donald R Huffman.  Absorption and scattering of light by small particles.  John Wiley & Sons, 2008.
  * [29] Arthur L Aden and Milton Kerker.  Scattering of electromagnetic waves from two concentric spheres.  Journal of Applied Physics, 22(10):1242–1246, 1951.
  * [30] Allen Taflove.  Application of the finite-difference time-domain method to sinusoidal steady-state electromagnetic-penetration problems.  IEEE Transactions on electromagnetic compatibility, (3):191–202, 1980.
  * [31] Charles Varin, Christian Peltz, Thomas Brabec, and Thomas Fennel.  Attosecond plasma wave dynamics in laser-driven cluster nanoplasmas.  Physical review letters, 108(17):175007, 2012.
  * [32] Edward M Purcell and Carlton R Pennypacker.  Scattering and absorption of light by nonspherical dielectric grains.  The Astrophysical Journal, 186:705–714, 1973.
  * [33] Katharina Sander, Christian Peltz, Charles Varin, Stefan Scheel, Thomas Brabec, and Thomas Fennel.  Influence of wavelength and pulse duration on single-shot x-ray diffraction patterns from nonspherical nanoparticles.  Journal of Physics B: Atomic, Molecular and Optical Physics, 48(20):204004, 2015.
  * [34] Daniela Rupp, Nils Monserud, Bruno Langbehn, Mario Sauppe, Julian Zimmermann, Yevheniy Ovcharenko, Thomas Möller, Fabio Frassetto, Luca Poletto, Andrea Trabattoni, et al.  Coherent diffractive imaging of single helium nanodroplets with a high harmonic generation source.  Nature communications, 8(1):1–7, 2017.
  * [35] Bruno Langbehn, Katharina Sander, Yevheniy Ovcharenko, Christian Peltz, Andrew Clark, Marcello Coreno, Riccardo Cucini, Marcel Drabbels, Paola Finetti, Michele Di Fraia, et al.  Three-dimensional shapes of spinning helium nanodroplets.  Physical review letters, 121(25):255301, 2018.
  * [36] Julian Zimmermann, Bruno Langbehn, Riccardo Cucini, Michele Di Fraia, Paola Finetti, Aaron C LaForge, Toshiyuki Nishiyama, Yevheniy Ovcharenko, Paolo Piseri, Oksana Plekan, et al.  Deep neural networks for classifying complex features in diffraction images.  Physical Review E, 99(6):063309, 2019.
  * [37] John M Cowley and A F_ Moodie.  The scattering of electrons by atoms and crystals. i. a new theoretical approach.  Acta Crystallographica, 10(10):609–619, 1957.
  * [38] P G_ Self, MA O’keefe, P_R Buseck, and AEC Spargo.  Practical computation of amplitudes and phases in electron diffraction.  Ultramicroscopy, 11(1):35–52, 1983.
  * [39] D Reinhard, BD Hall, D Ugarte, and R Monot.  Size-independent fcc-to-icosahedral structural transition in unsupported silver clusters: An electron diffraction study of clusters produced by inert-gas aggregation.  Physical Review B, 55(12):7868, 1997.
  * [40] AR Hare and GR Morrison.  Near-field soft x-ray diffraction modelled by the multislice method.  Journal of Modern Optics, 41(1):31–48, 1994.
  * [41] Johann Heinrich Lambert.  Photometria sive de mensura et gradibus luminis, colorum et umbrae.  Klett, 1760.
  * [42] August Beer.  Bestimmung der absorption des rothen lichts in farbigen flüssigkeiten.  Ann. Physik, 162:78–88, 1852.
  * [43] David Paganin et al.  Coherent X-ray optics.  Number 6. Oxford University Press on Demand, 2006.
  * [44] KJ Gaffney and Henry N Chapman.  Imaging atomic structure and dynamics with ultrafast x-ray scattering.  Science, 316(5830):1444–1448, 2007.
  * [45] James W Cooley and John W Tukey.  An algorithm for the machine calculation of complex fourier series.  Mathematics of computation, 19(90):297–301, 1965.
  * [46] Gustav Mie.  Beiträge zur Optik trüber Medien, speziell kolloidaler Metallösungen.  Ann. Phys., 330(3):377–445, jan 1908.
  * [47] Craig F. Bohren and Donald R. Huffman.  Absorption and Scattering of Light by Small Particles.  Wiley, apr 1998.
  * [48] Daniela Rupp, Marcus Adolph, Leonie Flückiger, Tais Gorkhover, Jan Philippe Müller, Maria Müller, Mario Sauppe, David Wolter, Sebastian Schorb, Rolf Treusch, Christoph Bostedt, and Thomas Möller.  Generation and structure of extremely large clusters in pulsed jets.  J. Chem. Phys., 141(4):044306, jul 2014.
  * [49] C++ Standards Committee et al.  Iso international standard iso/iec 14882: 2017, programming language c++.  Technical report, Tech. rep. http://www. open-std. org/jtc1/sc22/wg21. Geneva, Switzerland …, 2017.
  * [50] Wenzel Jakob, Jason Rhinelander, and Dean Moldovan.  pybind11–seamless operability between c++ 11 and python, 2017.  URL https://github. com/pybind/pybind11, 2019.
  * [51] John Nickolls, Ian Buck, Michael Garland, and Kevin Skadron.  Scalable parallel programming with CUDA.  Queue, 6(2):40–53, mar 2008.
  * [52] Hamamatsu Photonics K.K.  MCP (Microchannel plate) and MCP assembly.  Technical report, 2019.
  * [53] C. Bostedt, M. Adolph, E. Eremina, M. Hoener, D. Rupp, S. Schorb, H. Thomas, A. R. B. De Castro, and T. Möller.  Clusters in intense FLASH pulses: Ultrafast ionization dynamics and electron emission studied with spectroscopic and scattering techniques.  Journal of Physics B: Atomic, Molecular and Optical Physics, 43(19):194011, oct 2010.
  * [54] Daniela Rupp, Leonie Flückiger, Marcus Adolph, Alessandro Colombo, Tais Gorkhover, Marion Harmand, Maria Krikunova, Jan Philippe Müller, Tim Oelze, Yevheniy Ovcharenko, Maria Richter, Mario Sauppe, Sebastian Schorb, Rolf Treusch, David Wolter, Christoph Bostedt, and Thomas Möller.  Imaging plasma formation in isolated nanoparticles with ultrafast resonant scattering.  Structural Dynamics, 7(3):34303, may 2020.
  * [55] Christopher Amante and Barry W Eakins.  Etopo1 arc-minute global relief model: procedures, data sources and analysis.  2009\.
  * [56] Franz Barthelmes.  Definition of functionals of the geopotential and their calculation from spherical harmonic models : theory and formulas used by the calculation service of the International Centre for Global Earth Models (ICGEM).  Technical report, Deutsches GeoForschungsZentrum, Potsdam, sep 2009.