# Secondary Electron Count Imaging in SEM: Supplementary Information

Akshay Agarwal  John Simonaitis  Vivek K. Goyal  Karl K. Berggren  Department
of Electrical Engineering and Computer Science, Massachusetts Institute of
Technology  Department of Electrical and Computer Engineering, Boston
University

##  S1 Analysis of SEM scan waveforms

As discussed in the paper, analyzing the different regions of the SEM linescan
waveform was a crucial step in our imaging technique, since it allowed us to
properly synchronize acquisition frames, extract the resolution of the images,
and count only those SEs that were detected when the beam was scanning. In
this section, we will discuss the properties of the SEM scan waveforms in more
detail.

Figure S1 (a) is a schematic of scanning in an SEM. The rectangle represents
the area on the sample over which the SEM beam scans. An SEM image of this
sample area consists of sequentially scanned lines (demarcated by horizontal
bars in Figure S1(a)) with a certain number of image pixels on each line
(indicated by the vertical bars within the first scan line in Figure S1(a)).
There are two types of scan functions in all SEMs: the fast, horizontal scan
and the slow, vertical scan. The horizontal scan defines one line in an image
frame while the vertical scan defines one image frame. Here, an image frame
refers to one scan of the incident electron beam over every pixel on the
sample area being imaged. Therefore, within each image frame, the horizontal
scan repeats for every line, while the vertical scan occurs once per image
frame.

Figure S1: Scan waveforms on the SEM. (a) Schematic of SEM scanning, showing
the two scan directions in an image frame: the fast horizontal scan and the
slow vertical scan. (b) Horizontal (top) and vertical (bottom) scan waveforms
for a pixel dwell time of 28 $\mathrm{\SIUnitSymbolMicro s}$ and a pixel
resolution of 129 lines by 88 pixels per line. Both the horizontal and the
vertical scan waveforms are sawtooth-shaped. The total duration of the image
frame in this example was 304 $\mathrm{ms}$. (c) First few lines in the
horizontal scan. There is a 0.9 V spike at the end of each linescan, during
the period where the electron beam is retraced to its horizontal starting
position. (d) One linescan, showing the retrace spike, 70
$\mathrm{\SIUnitSymbolMicro s}$ front porch, and trace region. The trace
region has discrete steps corresponding to image pixels on the line. (e) Start
of one linescan, showing the retrace spike, front porch, and trace with
discrete steps. Before each step there is a transition region with a local
minimum. The time duration between successive minima is 26
$\mathrm{\SIUnitSymbolMicro s}$, close to the pixel dwell time. (f) Start of
one linescan for a pixel dwell time of 440 $\mathrm{ns}$. Unlike (e), there
are no discrete steps in this faster linescan.

Figure S1(b) is an example of the horizontal (top) and vertical (bottom) scan
waveforms on the SEM. We obtained these waveforms for a scan area consisting
of 129 lines by 88 pixels per line at a pixel dwell time of 28
$\mathrm{\SIUnitSymbolMicro s}$. The figure contains the last few lines of one
image frame followed by two full image frames separated by a 30 $\mathrm{ms}$
frame reset time (the flat parts in the horizontal and vertical scans) . Both
the horizontal and vertical scans consist of sawtooth waveforms. The
horizontal scan has many repeated sawtooths in every image frame with each
sawtooth waveform corresponding to one linescan. The resolution in the top
image is too low to distinguish between the linescans. The vertical scan
consists of one sawtooth waveform per image frame. The total duration of the
image frame was 304 $\mathrm{ms}$ excluding the frame reset time at the start
of every frame.

In Figures S1(c) and (d) we take a more detailed look at the horizontal
linescans of the first frame. Figure S1(c) shows the first few linescan
waveforms, and Figure S1(d) shows one linescan. The total duration of each
linescan is 2.45 $\mathrm{ms}$. In these and the following figures, we will
see that each linescan consists of three regions, which we will call the
retrace spike, front porch, and trace regions, following the terminology used
for video scan signals. At the end of each linescan there is a 0.9 V voltage
spike, lasting for 30 $\mathrm{\SIUnitSymbolMicro s}$, before the scan
waveform resets to the voltage at the start of the line. This resetting
corresponds to the electron beam retracing to its horizontal starting position
after every line. We can see these spikes at 0.1 and 2.5 $\mathrm{ms}$ in
Figure S1(d). This voltage spike occurs because of ringing in the voltage of
the scan electronics as it resets at the end of each line. Following the
voltage spike there is a 70 $\mathrm{\SIUnitSymbolMicro s}$ ‘plateau’ (which
we will call the front porch region) where the scan voltage is relatively
flat. This region allows the scan voltage to settle to its starting value
after the retrace spike and before the trace across the line on the sample
begins. The front porch is followed by the trace region where the incident
electron beam actually scans over the sample. This section of the scan
waveform consists of a series of decreasing voltage steps, with each step
corresponding to one pixel on the scan line.

We can see these steps, along with the retrace spike and front porch regions
of the linescan, in greater detail in Figure S1(e). Each step had a size of 4
mV and a time duration of 26 $\mathrm{\SIUnitSymbolMicro s}$, measured at the
valleys between each step. Since the number of pixels in each line was 88, we
would expect the total voltage swing for one linescan to be 352 mV. This value
is close to the observed swing of 380 mV in one linescan. Further, the time
duration of each step was close to the pixel dwell time of 28
$\mathrm{\SIUnitSymbolMicro s}$ calculated from the frame time specified for
the scan speed chosen in the SEM software. Both these observations provide
evidence for our assertion that these voltage steps corresponded to the
individual pixels on each line of the image. We can also see that the steps
are not completely flat; at the end of each pixel step there was a transition
period before the scan waveform voltage level reached the value corresponding
to the next pixel. This transition period was approximately 10
$\mathrm{\SIUnitSymbolMicro s}$ long for the settings used in Figure S1(e) and
was probably caused by the inherent speed of the scan coil electronics. Due to
the presence of this transition period, we observed the discrete pixel steps
for linescan waveforms corresponding to relatively long pixel dwell times
only. For pixel dwell times below $\sim 7.5$ $\mathrm{\SIUnitSymbolMicro s}$,
we did not observe this discretization and the trace decreased continuously.
Figure S1(f) is an example of such a scan waveform at pixel dwell time of 440
$\mathrm{ns}$. This difference between slow and fast scans was important in
the code we used to implement SE count imaging, as we discuss more extensively
in Section S3.

##  S2 Extracting mean SE count rate from image histograms

Figure S2: Image pixel brightness histogram for the same uniform aluminum
sample used to characterize SE pulses in the paper. This histogram was
acquired at a beam current of 2.3 $\mathrm{pA}$ and a pixel dwell time of 3.6
$\mathrm{\SIUnitSymbolMicro s}$. The meant SE count extracted from this
histogram is 1.45.

Figure S2 is an image pixel brightness histogram from the same aluminum sample
scan region used to analyze SE detector pulses in Figure 2 in the paper, at a
pixel dwell time of 3.6 $\mathrm{\SIUnitSymbolMicro s}$ and a beam current of
2.3 pA. We have described such histograms in previous work. Each of the peaks
in the histogram corresponds to pixels for which 0, 1, 2, and 3 SEs are
detected. From this histogram, we found that the 1.45 SEs were detected from
the sample on average. This average number of SEs corresponds to a mean SE
detection rate of 0.41/$\mathrm{\SIUnitSymbolMicro s}$, which is close to the
theoretically expected value of 0.45/$\mathrm{\SIUnitSymbolMicro s}$
calculated in the paper.

##  S3 Calculating image resolution from linescan waveforms

In our SE imaging code we used the linescan waveform to calculate the number
of lines and the number of pixel per line in the image. Figure 3(a) in the
paper shows two examples of the horizontal linescan voltage waveform. As can
be seen in this figure, each line in the horizontal scan (the ramp portion of
the waveform) was preceded by a retrace spike associated with the resetting of
the scan voltage. Since one spike was associated with the end of one line, a
count of the number of spikes was also a count of the number of lines in the
image. Therefore, in the SE count imaging code, we used threshold
discrimination to determine the number of spikes and hence the number of scan
lines in the scanned sample area.

We used a similar technique to calculate the number of pixels in every line.
As discussed in Section S1 of the Supplementary Information, each pixel step
in the trace section of a slow linescan was followed by a transition period
during which the scan voltage transitioned to the next pixel. In Figure S1(e)
we can see the scan voltage during this transition period had a minimum from
which the voltage reached the next pixel voltage value in 10
$\mathrm{\SIUnitSymbolMicro s}$. We used a count of these minima to count the
number of pixels for each linescan. Discrete steps in the linescan
corresponding to pixels were only present for slow linescans, and we did not
observe them for linescans that corresponded to a pixel dwell time faster than
7.5 $\mathrm{\SIUnitSymbolMicro s}$. This pixel dwell time was an order of
magnitude larger than the pixel dwell time of 440 $\mathrm{ns}$ we used to
generate the SE count images. Figure S1(f) shows the trace portion of the
linescan sawtooth waveform for a pixel dwell time of 440 $\mathrm{ns}$, and we
can see that it does not show discrete steps corresponding to each pixel in
the linescan. Therefore, to count the number of pixels in the linescan, we
acquired a slow linescan waveform (at pixel dwell time 28
$\mathrm{\SIUnitSymbolMicro s}$) at the same image pixel resolution. Since we
were only interested in collecting the scan waveform and not the SE signal
from the object, we collected this slow linescan with the incident electron
beam turned off to prevent unnecessary incident electron dose on the sample.

##  S4 Thong’s method for finding signal-to-noise ratio (SNR) for an SEM image

The SNR is a standard measure used in many fields of signal processing and
imaging to characterize the quality of a signal. However, defining SNR for a
single SEM image is challenging, because of the difficulty in differentiating
signal from noise in an image of an unknown sample. A method for solving this
problem was proposed by Thong et al. as referenced in the paper. They
developed an SNR measure for a single SEM image by looking at the
autocorrelation of the image. The autocorrelation function can be thought of
as a measure of how similar an image is to an offset copy of itself. Here, we
note that the autocorrelation is defined for a probabilistic model of a random
process. From a single realization of a random process, we cannot compute the
autocorrelation, but we can compute an estimate of the autocorrelation of the
underlying random process. Here, we will model a noise-free image as a
realization of a two-dimensional wide-sense stationary random process, and an
observed signal is another two-dimensional wide-sense stationary random
process with statistical dependence on the noise-free image.

The autocorrelation $r_{a}(m)$ of a one-dimensional wide-sense stationary
random signal $a(n)$ is defined as:

$r_{a}(m)=\textbf{{E}}\left[a(n)a(n-m)\right]$ (1)

Here $m$ is called the offset or lag, and $n$ and $n-m$ are two points along
the signal. E denotes expectation value. Note that the lack of dependence of
the expectation on $n$ is a requirement of wide-sense stationarity. We would
find the autocorrelation function of a physical image for a given pixel offset
by multiplying it by a duplicate of itself offset by the required number of
pixels. If the image has features that extend over a many pixels, a displaced
copy of the image will have similar intensities in the same pixels as the
original image. Therefore, the autocorrelation of such an image would be high.
Conversely, if the pixel values in the image vary rapidly over a few pixels,
the autocorrelation will be small.

Here, we will describe Thong et al.’s SNR measure and present a new, rigorous
justification behind the measure. This SNR measure is based on the assumption
that the contribution to the image autocorrelation from the ‘signal’ component
of the image varies slowly (i.e., over several pixels), whereas the ‘noise’
component of the autocorrelation varies rapidly and is zero for $m\neq 0$ in
the definition of autocorrelation in Equation 1. This difference in the nature
of signal and noise allows the extraction of their relative contributions to
the autocorrelation, and the ratio of these contributions is a measure of the
image SNR.

We will first consider an ideal Poisson signal derived from an underlying
ground truth image and analyze its autocorrelation. Then, we will introduce
some of the non-idealities present in an SEM and derive Thong et al.’s
expression for the SNR measure. Finally, we will demonstrate the effectiveness
of the SNR measure by calculating it for SEM images taken at different pixel
dwell times.

Let $f(n)\sim\textrm{Poisson}(s(n))$ be a Poisson process derived from $s(n)$.
We assume that if $s(n)$ is known, the values of $f(n)$ at two points $n_{1}$
and $n_{2},n_{1}\neq n_{2},$ would be independent of each other. This
assumption is equivalent to assuming that the noise for any pair of pixels is
uncorrelated (and hence has an expected value of zero). We want to find the
autocorrelation of $f(n)$, i.e., we want to find
$r_{f}(m)=\textbf{{E}}\left[f(n)f(n-m)\right]$. We consider two cases: $m\neq
0$ and $m=0$.

Case 1: $m\neq 0$

$\displaystyle\textbf{{E}}\left[f(n)f(n-m)\right]$ $\displaystyle\ =\
\textbf{{E}}\left[\textbf{{E}}\left[f(n)f(n-m)|\\{s(n)\\}\right]\right]$
$\displaystyle\ =\
\textbf{{E}}\left[\textbf{{E}}\left[f(n)|{s(n)}\right]\textbf{{E}}\left[f(n-m)|\\{s(n)\\}\right]\right]$
$\displaystyle\ =\ \textbf{{E}}\left[s(n)s(n-m)\right]$ $\displaystyle\ =\
r_{s}(m)$

Here, the second equality results from our assumption about the independence
of $f(n_{1})$ and $f(n_{2})$, and the third equality results from the
definition of $f(n)$. Therefore, we conclude that $r_{f}(m)=r_{s}(m)$ for
$m\neq 0$.

Case 2: $m=0$

$\displaystyle\textbf{{E}}\left[f(n)f(n-m)\right]$ $\displaystyle\ =\
\textbf{{E}}\left[f(n)^{2}\right]$ $\displaystyle\ =\
\textbf{{E}}\left[\textbf{{E}}\left[f(n)^{2}|\\{s(n)\\}\right]\right]$
$\displaystyle\ =\ \textbf{{E}}\left[s(n)^{2}+s(n)\right]$ $\displaystyle\ =\
r_{s}(0)+\textbf{{E}}\left[s(n)\right]$

Here, the third equality again results from the definition of $f(n)$.
Therefore, we finally get:

$r_{f}(m)\ =\ \left\\{\begin{array}[]{@{\ }ll}r_{s}(m),&m\neq 0;\\\
r_{s}(0)+\textbf{{E}}\left[s(n)\right],&m=0.\end{array}\right.$

Hence, the autocorrelation $r_{f}(m)$ of the noisy image $f(n)$ derived from
the ground truth $s(n)$ will be the same as the autocorrelation of $s(n)$
everywhere except at $m=0$, where there is an additional term due to the fact
that $f(n)$ is derived from a random process $s(n)$ and is therefore noisy. As
we had stated earlier, the assumption we made about the independence of values
of $f(n)$ at different pixels is equivalent to assuming that the noise is
uncorrelated between neighbouring pixels, which is why the contribution due to
noise only affects the autocorrelation at zero offset. At zero offset, we
expect the autocorrelation to have a sharp peak due to the additional noise
contribution. At non-zero offsets, this noise contribution is zero because the
noise in neighbouring pixels is uncorrelated.

Our assumption that $f(n)\sim\textrm{Poisson}(s(n))$ is not justified for
conventional SEM imaging, since a conventional SEM image is not a count of SEs
per pixel. Further, in addition to noise due to the randomness inherent in the
generation of SEs, the SE image can also have noise due to imperfect detection
of SEs, background counts in the detector, variation in the signal waveform
from the detector, and quantization of the SE signal. We can model the scaling
to 8-bit and noise addition in an SEM as a linear scaling of the number of SEs
observed for that pixel, along with zero mean Gaussian noise, as follows:

$f(n)\sim\textrm{A}\cdot\textrm{Poisson}(s(n))+N(0,\sigma^{2})$

Here, the factor A accounts for scaling to 8 bits, and $N(0,\sigma^{2})$
accounts for the additional sources of noise discussed above. Using the same
process to find the autocorrelation $r_{f}(m)$, we get:

$\displaystyle r_{f}(m)$ (2) $\displaystyle\ =\ \left\\{\begin{array}[]{@{\
}ll}\textrm{A}^{2}r_{s}(m),&m\neq 0;\\\
\textrm{A}^{2}r_{s}(0)+\textrm{A}\textbf{{E}}\left[s(n)\right]+\sigma^{2},&m=0.\end{array}\right.$
(5)

Hence, for a real image, we would still expect the autocorrelation to show a
sharp peak at zero offset. Now, the peak at zero offset has contributions from
both noise due to the Poisson process and the variance of the additional
Gaussian noise. Thong’s method provides a way to estimate the “noise-free”
component of the autocorrelation, at zero offset ($\hat{\phi}_{NF}(0,0)$, an
estimator for the true noise-free autocorrelation
$\phi_{NF}(0,0)=\textrm{A}^{2}r_{s}(0)$) from the observed autocorrelation at
zero offset $\phi(0,0)$) and estimate both the signal and noise contributions
in the image to derive SNR for a single SEM image. Note that our SEM images
are two-dimensional and hence we specify the offset along both dimensions in
our notation. We will demonstrate this method through an example.

Figure S3: SNR for SEM images. (a) SEM image of bulk copper, taken at a pixel
dwell time of 3.6 $\mathrm{\SIUnitSymbolMicro s}$. (b) SEM image of the same
sample as (a), taken at a pixel dwell time of 28 $\mathrm{\SIUnitSymbolMicro
s}$. (c) Autocorrelation of the 3.6 $\mathrm{\SIUnitSymbolMicro s}$ dwell time
image (solid blue curve) and the 28 $\mathrm{\SIUnitSymbolMicro s}$dwell time
image (dash-dotted orange curve). The autocorrelation is almost identical
except at zero pixel offset. (d) Autocorrelation of the two images around zero
pixel offset. The sharp peak at zero offset is because of image noise. The
peak is lower for the 28 $\mathrm{\SIUnitSymbolMicro s}$ pixel dwell time
image because it is less noisy. (d) SNR extracted from the autocorrelation of
SEM images acquired with pixel dwell times between 0.44
$\mathrm{\SIUnitSymbolMicro s}$ and 28 $\mathrm{\SIUnitSymbolMicro s}$. The
SNR scales linearly with pixel dwell time.

Figures S3(a) and (b) are two SEM images of the same region of a bulk copper
sample, taken at the same incident beam current. We acquired Figure S3(a) at a
pixel dwell time of $3.6$ $\mathrm{\SIUnitSymbolMicro s}$ and Figure S3(b) at
a pixel dwell time of $28$ $\mathrm{\SIUnitSymbolMicro s}$. The longer dwell
time we used to acquire Figure S3(b) resulted in a less noisy image.

In Figure S3(c), we plot the autocorrelations of these two images. The full
autocorrelation is a three-dimensional function since the images can be offset
in two dimensions. In Figure S3(c) we have plotted the autocorrelation for
offsets in the horizontal direction; the offset in the vertical direction is
zero. The solid blue curve is the autocorrelation of the image in Figure
S3(a), and the dash-dotted orange curve is the autocorrelation of the image in
Figure S3(b). We can see that the autocorrelation values for the two images
are almost identical at all offsets except 0. Figure S3(d) is a magnified view
of the autocorrelations around zero offset. We can see that the less noisy,
longer pixel dwell time image has a smaller autocorrelation peak at zero
offset compared to the higher noise, shorter pixel dwell time image.

From Figure S3(d) we can also see that the autocorrelation curves for small,
non-zero offsets are pretty flat, especially when compared to the sharp peaks
at zero offset. For example, between pixel offset values of 1 and 10, the
autocorrelation of the $\tau=3.6$ $\mathrm{\SIUnitSymbolMicro s}$ image
reduces from 75 to 46.8 (an average reduction of 3.1 per additional pixel
offset), whereas it jumps to 483.4 at zero offset (an increase of 408.4 from
the value at pixel offset of 1). We can use this observation to estimate the
noise-free autocorrelation at zero offset, $\hat{\phi}_{NF}(0,0)$. Thong
discusses two methods of finding $\hat{\phi}_{NF}(0,0)$. The first method is
to simply set it to be equal to the value of the autocorrelation at an offset
of 1 pixel, i.e., $\hat{\phi}_{NF}(0,0)=\phi(1,0)$. The second method of
estimating $\hat{\phi}_{NF}(0,0)$ is to use linear extrapolation of the values
of the autocorrelation for small pixel offsets. Both these methods are
justified because, as we had discussed, the autocorrelation value does not
change significantly between consecutive pixels. We decided to use the second
method to extract $\hat{\phi}_{NF}(0,0)$ because, as we can see in Figure
S3(d), the autocorrelation is close to linear at small pixel offsets.

Once we have extracted $\hat{\phi}_{NF}(0,0)$, we can obtain an estimate of
the noise contribution $\hat{\phi}_{N}(0,0)$ to $\phi(0,0)$:
$\hat{\phi}_{N}(0,0)=\phi(0,0)-\hat{\phi}_{NF}(0,0)$. The ratio of these two
quantities gives us a measure of the image SNR:

$\textrm{SNR}=\frac{\hat{\phi}_{NF}(0,0)}{\hat{\phi}_{N}(0,0)}$

We used this method to find the SNR for images of the same sample of bulk
copper as in Figure S3 for pixel dwell time between 0.44
$\mathrm{\SIUnitSymbolMicro s}$ and 28 $\mathrm{\SIUnitSymbolMicro s}$.

Figure S3(e) is a plot of the extracted SNR values, indicated by unfilled
black circles. The solid black line is a least-squares linear fit to the
extracted values. We can see that the extracted SNR values scale almost
linearly (correlation coefficient $r^{2}>0.99$) with the pixel dwell time. We
can derive this linear scaling from our expression for $r_{f}(m)$. Due to the
fact that the conventional SEM image pixel intensity is the average value of
the detector signal observed for that pixel, increasing the pixel dwell time
does not change the mean value of the pixel intensities: although the total
signal observed for each pixel increases, the pixel dwell time increases by
the same factor. Therefore, the mean pixel value remains the same. We can
include this effect in our model of a real SEM image as follows: let the two
pixel times $t_{1}$ and $t_{2}$ correspond to two images $f_{1}$ and $f_{2}$.
Let $t_{2}/t_{1}=\alpha$. On changing the dwell time from $t_{1}$ to $t_{2}$,
the raw signal from the SE detector will scale by $\alpha$. Therefore, we
have:

$\displaystyle
f_{1}(n)\sim\textrm{A}_{1}\cdot\textrm{Poisson}(s(n))+N(0,\sigma)$
$\displaystyle f_{2}(n)\sim\textrm{A}_{2}\cdot\textrm{Poisson}(\alpha
s(n))+\alpha N(0,\sigma)$

Due to signal averaging,
$\textbf{{E}}\left[f_{1}(n)\right]=\textbf{{E}}\left[f_{2}(n)\right]$. Hence,
$\textrm{A}_{1}/\textrm{A}_{2}=\alpha$. Using Equation (5) to find the
autocorrelation $r_{f}(0)$, we get:

$\displaystyle
r_{f_{1}}(0)=\textrm{A}_{1}^{2}r_{s}(0)+\textrm{A}_{1}^{2}\textbf{{E}}\left[s(n)\right]+\sigma$
$\displaystyle
r_{f_{2}}(0)=\alpha^{2}\textrm{A}_{2}^{2}r_{s}(0)+\alpha\textrm{A}_{2}^{2}\textbf{{E}}\left[s(n)\right]+\alpha^{2}\sigma$

Here, the expression for $r_{f_{2}}(0)$ results from the fact that scaling a
random variable by $k$ scales its variance by $k^{2}$. Simplifying this
expression for $r_{f_{2}}(0)$, we get:

$r_{f_{2}}(0)=\textrm{A}_{1}^{2}r_{s}(0)+\textrm{A}_{1}^{2}\textbf{{E}}\left[s(n)\right]/\alpha+\alpha^{2}\sigma$

Comparing this expression to the expression for $r_{f_{2}}(0)$, we can see
that the noise-free component of the autocorrelation is the same for both but
the contribution due to noise due to the Poisson nature of the signal has
scaled down by $\alpha$. The noise from other sources in the SEM scales by
$\alpha^{2}$. For the imaging conditions normally used in an SEM, the
contribution of noise from other sources on the SEM is small and the
$\sigma^{2}$ term can be ignored. Consequently, the SNR scales linearly with
the pixel dwell time, just as we had observed in Figure S3(e).

In summary, this SNR measure provides another way to characterize image
quality and scales linearly with the incident electron dose. We require two
conditions to be fulfilled for this method to work: the noise autocorrelation
must be non-zero only at a pixel offset of 0, and the autocorrelation of the
ground truth image must vary much more slowly than the noise autocorrelation.
From the autocorrelation curves in Figure S3(c) and (d) we can see that noise
in the SEM images does not show correlation for any non-zero pixel offsets. We
also confirmed that this was the case by scanning the beam over a region of
vacuum and checking the autocorrelation of such images. Further, we ensured
that all samples we scanned had features that extended over many pixels so
that the image autocorrelation varied slowly at non-zero pixel offsets. We
note that the absolute value of this SNR measure for a particular SEM image is
not very informative. For example, the SNR value for the long-dwell time image
in Figure S3(b) is about 1.5, which would be considered low in other
scenarios. It is the change in the value of this SNR metric upon varying the
imaging conditions which provides useful information about changes in the
image quality.

##  S5 Probability distribution of SEs

Figure S4: Probability distribution of SE emission. (a) Distribution of the
number of SEs extracted from the background (vacuum) pixels (unfilled blue
circles). The mean SE count for this distribution is 0.52 and the variance was
0.74. The orange crosses indicate the probabilities of a Poisson process with
the same mean SE count. (b) Same as (a) with the y-axis on a log scale. The
extracted SE distribution deviates significantly from an ideal Poisson
distribution beyond 3 SEs, reflecting its larger variance. (c) Distribution of
the number of SEs extracted from the sample (copper mesh) pixels (unfilled
blue circles). The mean SE count for this distribution is 21.29 and the
variance was 29.8. The orange crosses indicate the probabilities of a Poisson
process with the same mean SE count. The Poisson distribution has a higher and
narrower peak than the extracted SE distribution. (d) Same as (c) with the
y-axis on a log scale. The extracted SE distribution deviates significantly
from the ideal Poisson distribution above 30 SEs and below 14 SEs, reflecting
its larger variance.

In this section, we will show a preliminary analysis of the probability
distribution of the number of SEs in our experiments. The sample we imaged
contained two types of pixels - bright ‘sample’ pixels that represent the
copper mesh, and dark ‘background’ pixels that represent the background
vacuum. Therefore, we found the statistics of these two types of pixels
separately.

Figure S4(a) is a plot of the relative count of pixels that represent the
background vacuum (unfilled blue circles) as a function of the number of SEs
in those pixels. In this plot, we have normalized the counts so that they sum
to 1 over the different numbers of SEs. Therefore, this plot can be thought of
as a probability distribution of the number of SEs. The mean SE counts for
these background pixels was 0.52. To visualize the deviation from an ideal
Poisson process, we have also plotted the probabilities for a Poisson process
with the same mean (orange crosses). We can see that the probability of 0 SEs
is higher and that of 1 SE is lower for the distribution we extracted from our
data than for the ideal distribution. Figure S4(b), which is the same as S4(a)
but with the y-axis on a log scale, shows that at higher SE numbers the
extracted probabilities are much higher than the probabilities from the
Poisson distribution. From these plots, we would expect the variance of the
extracted probabilities to be higher than the variance for an ideal Poisson
process, which should be equal to 0.52. The variance of the extracted
distribution is 0.74, confirming this intuition. From these numbers, the
Frank’s B-factor of this process is 0.42.

We performed a similar calculation for the pixels representing the copper
mesh. Figure S4(c) is a plot of the relative number of copper mesh pixels
(unfilled blue circles) as a function of the number of SEs in those pixels.
Figure S4(d) is the same plot with the y-axis on a log scale. Just as in
Figure S4(a) and (b), we scaled the pixel numbers so that they summed to 1. we
have also plotted the probabilities of an ideal Poisson process with the same
mean as the extracted distribution (21.29) using orange crosses. From these
plots we can see that the extracted distribution was wider than an ideal
Poisson distribution. The variance of the extracted distribution was 29.8.
This variance value gave us a B-factor of 0.4, which is very close to the
B-factor we had extracted from the vacuum pixel distribution. We note that
this B-factor is about 2 times larger than that reported by Frank for copper
at 10 keV. We expect this deviation to be caused by small non-uniformities in
the sample, as well as the enhancement of SE yield at the edges of the copper
grid. Mitigation of these effects by imaging a uniform sample without edges
would provide more accurate SE probability distributions using our technique.

##  S6 Schemes for online electron counting and conditional re-illumination

As discussed in the paper, we cannot use the SE count imaging scheme discussed
here to realize the potential dose reduction due to counting because the
scanning of the beam over the sample was not turned off automatically between
acquisition frames. Saving each acquisition frame on the oscilloscope took a
few seconds, and the beam was scanning over the sample for some part of this
time before we turned it off manually. Therefore, the sample was exposed to
the electron beam between acquisition frame collections on the oscilloscope.
This additional electron dose offset any reduction in dose we might have
obtained with SE count imaging.

In a live implementation of SE count imaging, we would want each imaging frame
(corresponding to the beam scanning over the sample) on the SEM to correspond
to an acquisition frame in the dataset. Therefore, the ideal workflow would be
to blank the beam while an acquisition frame is being recorded by the
oscilloscope, and unblank the beam when the oscilloscope is ready to receive
the next frame. This blanking would need to be synchronized with the SEM scan
waveforms so that each of the acquisition frames begins with the first line of
the scanned area. In this section, we will discuss such a scheme to implement
live, online SE counting.

Figure S5: Scheme for live SE count imaging. Solid black arrows indicate
online steps, and dashed black arrows indicate offline steps. The scan start
signal from the SEM computer, with a delay equal to the acquisition frame
time, activates the beam blanker (green arrow). After the frame is acquired on
the oscilloscope, the SEM computer sends an unblanking signal (red arrow) to
the beam blanker before the start of the next frame. After all frames have
been acquired, the SE count image can be generated on the SEM computer
offline.

Our scheme for live SE count imaging is shown in Figure S5. At the start of
the imaging process, the SEM computer sends a signal to the SEM scan coils to
start the first frame. The oscilloscope captures the scan waveform and the
synchronized SE detector signal pulses. The only addition in this scheme
compared to the one we have implemented in the paper would be a beam blanking
signal sent from the SEM scan computer to the SEM beam blanker after every
acquisition frame. From our study of the scan waveform as discussed in Section
S1, we know the total acquisition frame time and the frame reset time for a
given image resolution. Therefore, the initial signal from the SEM computer,
with an added delay equal to the acquisition frame time, can serve as the
blanking signal the beam blanker. This signal is shown by the green arrow in
Figure S5. This delay could be introduced using a simple delay line generator
or a comparator circuit. On receiving this signal, the beam blanker blanks the
SEM before the linescans for the next frame can begin, thereby protecting the
sample from additional electron dose while the previous acquisition frame is
being saved. As we had described in the paper, noise in the scan signal can
lead to variation in which voltage spike triggers data collection on the
oscilloscope. With the trigger voltage set precisely, we observed that this
uncertainty was usually between 1-3 lines, and at most 10 lines, which
corresponds to a time delay of $\sim 1$ $\mathrm{ms}$. Since the frame reset
time is around 30 $\mathrm{ms}$ depending on the pixel dwell time and scan
area size, we have sufficient time to send the blanking signal even with
possible delays due to noise. The time taken to save an acquisition frame on
our oscilloscope was constant for a fixed sampling time and frame size. For
example, for the frame parameters in the paper, the time to save was around 5
s. Since we know when scanning began and the frame times, the SEM computer
already has an internal clock synchronized with the scanning frames.
Therefore, after the time to save the previous frame has elapsed, the SEM
computer sends an unblanking ‘frame saved’ signal (shown by the red arrow in
Figure S5) to the beam blanker before the start of the next scan frame. The
process repeats for capturing the desired number of acquisition frames. After
all the acquisition frames have been collected, the frames are transferred to
the SEM computer and the computer processes the frames to generate the final
SE count image. These offline processes are indicated with dashed arrows in
Figure S5. Alternatively, they can be brought online and the signal to unblank
the beam (indicated in red in Figure S5) can be sent after the acquisition
frames are transferred to the computer and the count image is generated.

The major advantage of this scheme over Yamada’s live SE counting scheme is
that we have captured all the fast timing and processing complexity in the SE
count imaging code instead of needing to implement it in hardware circuits as
in Yamada’s work. The only hardware timing signal is the one sent to the beam
blanker after every acquisition frame. Since each frame typically lasts
several tens to hundreds of $\mathrm{ms}$ depending on the image size, we do
not need any high-speed electronics to implement this signal. As we discussed
in the previous paragraph, we need to blank the beam during the frame reset
time of 30 $\mathrm{ms}$ after the completion of one imaging frame before the
next one can begin. The electrostatic beam blanker already built-in the SEM
and used for freezing the SEM scan is sufficiently fast to blank the beam
during this time. The resonant frequency of the build-in blanker on our SEM
was around 10 $\mathrm{kHz}$, and the blanker did not blank the beam
effectively above 20 $\mathrm{kHz}$. This speed corresponds to a blanking time
of about 50 $\mathrm{\SIUnitSymbolMicro s}$, which is much lesser than the
frame reset time. Therefore, such a blanker would be good enough for this
implementation of live SE count imaging.