# SEM and EDS: Morphology, electrons and elements

Source: https://ml-biomat.com/tutorials/experimental-methods/i03/en/
Language: en

Follow the signals generated by an electron beam to interpret surface images, elemental spectra and their spatial relationship.

## How can surface texture, particles and elements be examined?

An electrospun membrane may resemble a thin sheet of white paper to the eye. A scanning electron microscope can reveal interwoven fibers, bead-like defects and connected pores. After a bone-repair material develops a surface deposit, an electron image can show its shape, while energy-dispersive X-ray spectroscopy can examine whether calcium, phosphorus or other elemental signals occur in that region. These measurements are often made on the same instrument but answer different questions. Scanning electron microscopy, or SEM, pairs a scanned electron-beam position with a detected signal. EDS sorts detected X-rays by energy. Together they connect morphology with composition at selected locations.

SEM images can resemble landscapes because edges, orientation and detector position produce strong light–dark contrast. Brightness is not a direct height coordinate, and a dark region is not automatically a pore. Composition, charging, tilt and local geometry all influence the signal. Begin by describing visible structure, such as fiber width, particle aggregation or the path of a crack, then interpret contrast using the detector and preparation method. EDS adds elemental evidence that also needs to be read through the spectrum, background and acquisition conditions. A software-generated element label is a proposed identification to examine against the measured signal.

This chapter separates the interactions of an electron beam with matter, explains why biological and polymer specimens need particular preparation, and connects image calibration with electron dose and spectral counting. A real pollen SEM image illustrates surface structure. A separate spectrum, explicitly constructed for teaching, demonstrates overlapping peaks under known conditions. The spectrum is not a measurement of that pollen image. Keeping these examples distinct combines an encounter with real specimen detail and a calculation in which the underlying answer is known, making it easier to understand the purpose and behavior of each analytical step.

## How does a scanned electron beam form an image?

An SEM produces an electron beam and uses electric and magnetic fields to control energy, focusing and scanning. Imagine a very fine pen visiting positions along successive rows. Instead of depositing ink, it prompts the specimen to produce signals. The signal collected while the beam visits a position sets the brightness of the corresponding image pixel. Synchronizing scan coordinates with detection produces the complete picture. Vacuum supports stable electron propagation within the instrument and helps determine which specimens can be introduced directly into a conventional chamber. Electron optics, specimen behavior and detection therefore work together to create the image.

During the mid-twentieth century, Oatley and researchers at Cambridge developed the combination of scanning, detection and display that helped lead to series production of the Stereoscan in 1965. This history illustrates why a useful microscope requires more than a small beam spot. Efficient signal collection, stable scanning and faithful display are also necessary. The same relationships still guide acquisition: a very small probe carrying few electrons may yield a noisy image, while increasing current can alter probe size and deliver a larger dose to the specimen. The original diagram connects the scanning arrangement with the physical origins of its signals.

![Original SEM and signal-origin diagram. The left links scan position to detector signal and the 1965 Stereoscan production milestone; the right distinguishes SE, BSE and X-ray origins. Interaction ranges depend on material and beam energy; not to scale.](https://ml-biomat.com/static/tutorials/experimental-methods/figures/0b1055a7e2254ac87a6eb3e5.svg?v=0b1055a7e225)

Figure 1Original SEM and signal-origin diagram. The left links scan position to detector signal and the 1965 Stereoscan production milestone; the right distinguishes SE, BSE and X-ray origins. Interaction ranges depend on material and beam energy; not to scale.

Incident electrons undergo multiple interactions inside matter. Secondary electrons conventionally refer to excited electrons with energies below 50 eV. Their low energy means that electrons escaping into vacuum mainly originate near the surface. Edges and inclined surfaces can make escape more likely, producing the pronounced texture familiar in many SEM images. Backscattered electrons are incident electrons that return out of the specimen after scattering, with a broad energy distribution. Their signal is often more sensitive to average atomic number. Under comparable geometry and detection conditions, regions containing higher-atomic-number constituents tend to appear brighter, while surface inclination, crystal orientation and detector geometry also affect contrast.

Characteristic X-rays arise by another route. If an incident electron creates an inner-shell vacancy in an atom, an electron from a higher shell may fill it and release an X-ray with a characteristic energy. Different elements have different energy levels, so these energies provide identification clues. Deceleration of electrons also produces a continuous X-ray background. An EDS detector therefore does not encounter particles carrying written element names. It measures the energies of many X-ray events, accumulates them into energy channels and uses the positions and shapes of peaks to support candidate assignments. The continuous background must be considered alongside the characteristic peaks.

These signals sample different spatial regions. A fine incident beam spreads within the material, and the X-ray generation and escape region can be substantially larger than the effective region contributing to a surface image. A sharply outlined nanoparticle in an SEM image therefore need not supply all the EDS signal recorded at its projected location. Substrate, nearby phases and conductive coating may contribute. Higher accelerating voltage generally allows deeper penetration and excitation of some higher-energy lines. Lower voltage can emphasize near-surface information while reducing excitation of other lines. Choose conditions jointly from the target elements, specimen dimensions and depth of interest.

## Preparation defines the material state that the image represents

A metal block, a dry polymer fiber and a hydrated cell do not follow the same preparation route. Liquid water creates stability and vacuum problems in a conventional high-vacuum instrument, while soft hydrated structures can shrink or collapse during dehydration. Biological specimens are often fixed to preserve selected structures and then dehydrated and dried appropriately. Critical-point drying aims to reduce the capillary effects associated with a moving liquid–gas interface. Cryogenic routes retain a low-temperature state and require suitable transfer and observation arrangements. The relevant route depends on whether the question concerns a dry surface, a hydrated structure or morphology after a particular processing step.

For example, pores in a freeze-dried hydrogel can be influenced by ice-crystal growth and sublimation. They describe that freeze-dried specimen, while the original network mesh in water calls for a method matched to the hydrated state. Drying a fiber mat may be more straightforward, yet breaking, compressing or attaching fibers to a stub can still change local morphology. Names such as “freeze-dried cross section” and “dry fiber surface” communicate the observed state directly. Linking that state to the research question is more informative than treating preparation as an invisible preliminary operation that has no relationship to the resulting structure.

Many polymers and biological specimens conduct poorly. If incident and departing electron currents do not balance, local charge accumulates. Charging can produce bright or dark bands, flashes, image shifts or distortions. A conductive path to the stub, an appropriate thin conductive coating, adjusted current and landing energy, or a suitable low-vacuum mode can address different parts of this balance. Loose particles without good electrical contact can charge more strongly than particles attached securely to the substrate. Checking whether the apparent morphology remains stable after a controlled change in acquisition conditions helps distinguish specimen structure from an imaging artifact.

A coating becomes part of the observed specimen. A thin metal film can improve conductivity and signal while covering fine texture, increasing apparent dimensions and adding its own EDS lines. Coating, tape and substrate selection are particularly important when the element of interest is itself gold, platinum or carbon. A coating a few nanometers thick can matter for a fiber only tens of nanometers wide, whereas its dimensional effect on a pore tens of micrometers across is on a very different relative scale. Preparation records should therefore be connected to anticipated feature size rather than stopping at a short statement that the sample was coated.

Cross-section preparation introduces another geometric choice. Breaking a brittle specimen can expose a fracture path selected by its microstructure, while polishing can smear a soft phase or pull particles out. A cut or fractured surface is informative when its formation is part of the question, but it should not be treated as an arbitrary slice through an unchanged volume. For a layered material, identify the surface, section direction and substrate before comparing regions. Pairing a section with an overview of the intact specimen helps locate the measured features and makes changes caused by preparation easier to recognize.

## Read a real pollen image, then convert pixels to length

The SEM image below is CDC Public Health Image Library item 5609, credited to Janice Carr and available as a public-domain image. Protrusions, grooves and openings on pollen surfaces illustrate the instrument's ability to reveal complex topography. The original 10 μm scale bar is retained; local texture has not been filled or reconstructed. Follow the edge of one grain and inspect how brightness changes with orientation, then compare a recessed region with its surroundings. Multiple visual cues support a shape interpretation, while direct conversion of grayscale into height would ignore the detection geometry and other sources of contrast.

![Real pollen SEM image retaining its original 10 μm scale bar. Image: CDC / Janice Carr, PHIL 5609, public domain. Texture and shading are electron-image signals; this image is unrelated to the teaching EDS spectrum.](https://ml-biomat.com/static/tutorials/experimental-methods/figures/5eca27b889cbc7fafdcaa0fd.svg?v=5eca27b889cb)

Figure 2Real pollen SEM image retaining its original 10 μm scale bar. Image: CDC / Janice Carr, PHIL 5609, public domain. Texture and shading are electron-image signals; this image is unrelated to the teaching EDS spectrum.

A scale bar is generally more useful for digital length measurements than a printed magnification number. Resizing an image on a web page changes its displayed dimensions, so a magnification defined for an earlier screen or print arrangement no longer directly converts screen length to specimen length. A scale bar that is resized with the image retains its relationship to the structure. If a 10 μm bar spans 180 pixels in a particular digital image, one pixel corresponds to about 0.0556 μm. A feature spanning 36 pixels then has an apparent width of 2.0 μm. The 180-pixel value is a worked example; formal analysis should determine endpoints in the actual original file or use calibration metadata.

$$
p=\frac{L_b}{N_b},\qquad d=N_o p
$$

| Symbol | Meaning and units |
| --- | --- |
| ![Formula](https://ml-biomat.com/static/agent-math/48c7b594e8628a17b991d4e6.svg) | Pixel size in the current image, μm/pixel. |
| ![Formula](https://ml-biomat.com/static/agent-math/8508650ef567c89cbba636de.svg) | Physical length represented by the scale bar, μm. |
| ![Formula](https://ml-biomat.com/static/agent-math/c0a95fa5ddcb2300bb4c3a4e.svg) | Number of pixels spanned by the scale bar, pixels. |
| ![Formula](https://ml-biomat.com/static/agent-math/d47d91d61053a3c786f20a4b.svg) | Object length along the measurement line, μm. |
| ![Formula](https://ml-biomat.com/static/agent-math/94c0a2364daa8ec33aea23bd.svg) | Pixel count spanned by the object along the measurement line. |

A 10 μm bar spanning 180 pixels gives p=0.05556 μm/pixel; an object spanning 36 pixels measures 2 μm. The image and bar must share the same resizing. A tilted surface adds projection geometry.

Fiber width should be measured across a profile perpendicular to the local fiber direction. An oblique line crossing the fiber is longer than the perpendicular projected width. Overlapping particles similarly complicate assigning a projected area to a complete individual particle. Establish a selection rule before measuring, sample several fields and independent specimens, and retain an annotated image locating each measurement. Then examine the distribution rather than only its mean. A small population of thick fibers, bead defects or two distinct diameter populations may be scientifically useful even when it is inconspicuous in a single representative micrograph.

Quantitative morphology also depends on image transformations. Tilting the specimen changes projected lengths along some directions. Drift correction, stitching and resampling alter coordinate relationships. Retain the original scale and transformation record, and check that calibration remains appropriate to the acquisition conditions. An edge-enhancing filter can make a contour easier to see while shifting a threshold-defined boundary. A display-enhanced image may assist inspection, while the measurement should follow a defined and checked processing route. The meaningful criterion is whether the measured outline corresponds to the intended structure, not whether a final histogram happens to look smooth.

## The beam also treats the specimen: dose and repeated scans

An electron beam delivers charge and energy, so imaging can itself modify the specimen. Sensitive polymers, proteins and related materials may shrink, develop melt-like changes, break or accumulate beam-induced contamination. A region that becomes darker, brighter or marked by a rectangular scanned patch should be examined in relation to its exposure history. Current, dwell time and the number of repeated scans all matter. Locating a region at low magnification before acquiring the needed detailed image can help control unnecessary exposure. Suitable conditions follow specimen stability and the desired signal, rather than being transferred unchanged from another material.

$$
N_e=\frac{It}{e},\qquad D=\frac{N_e}{A}
$$

| Symbol | Meaning and units |
| --- | --- |
| ![Formula](https://ml-biomat.com/static/agent-math/2244f89c20614334f7d67053.svg) | Number of incident electrons; dimensionless count. |
| ![Formula](https://ml-biomat.com/static/agent-math/112feff6b4d0334226e24d5c.svg) | Beam current, A; 100 pA=10⁻¹⁰ A. |
| ![Formula](https://ml-biomat.com/static/agent-math/707bb132def3690d81bf1f0c.svg) | Total exposure time within the stated area, s. |
| ![Formula](https://ml-biomat.com/static/agent-math/0be950b3e59846bc80f7e4ca.svg) | Elementary charge, 1.602176634×10⁻¹⁹ C. |
| ![Formula](https://ml-biomat.com/static/agent-math/5914524b1d3db63c66998b75.svg) | Mean incident electron dose, electrons/μm² here. |
| ![Formula](https://ml-biomat.com/static/agent-math/3207697e43e4f88223ad85c1.svg) | Area actually irradiated by the scan, μm². |

Current multiplied by time gives charge; dividing by charge per electron gives the count. At 100 pA for 1 s, approximately 6.2415×10⁸ electrons arrive. Uniformly distributed over 100 μm², the mean dose is 6.2415×10⁶ electrons/μm². Dwell and repeated scans change local exposure.

A current of 100 pA maintained for one second corresponds to approximately 624 million incident electrons. The number seems large, but its meaning depends on the scanned area. Spread over 100 μm², it gives an average areal dose of about 6.24 million electrons per square micrometer. Reducing the area to 1 μm² while keeping current and total time constant raises the average dose per area by a factor of 100. Increasing image magnification commonly reduces the scanned region, so local exposure may rise even when the displayed current is unchanged. Beam settings and scan area describe exposure more usefully than simply counting saved images.

Additional counts can improve random precision but require time or dose. With little background and independent counting, relative standard deviation decreases approximately as the inverse square root of count: around 10% at 100 counts and 1% at 10,000. Halving the random relative noise requires about four times as many counts. Spectral peaks sit on continuous background, so uncertainty after subtraction also includes background estimation. Instrument live time differs from elapsed clock time because event processing creates dead time. Meaningful intensity comparisons should use suitable live-time and current normalization and check that the count rate remains within the characterized response of the detection system.

## Peak position, area and background each contribute different information

An EDS spectrum plots X-ray energy horizontally and accumulated events per energy channel vertically. Peak position supports possible transition assignments; peak area relates to the number of associated X-rays produced and detected. An element can have several line families, so related peaks should be examined together rather than assigning an element from a single small bump. Incident energy must be sufficient to create the relevant inner-shell vacancy. A present element may therefore produce a weak line under the selected conditions. Overlapping transitions, detector escape features and pulse pileup should be considered when checking candidate identifications.

Quantification involves more than equating peak height with concentration. Elements differ in characteristic X-ray generation probabilities; the specimen absorbs X-rays by energy-dependent amounts and can produce secondary fluorescence; detector efficiency also varies with energy. Surface roughness changes escape paths. Standards and appropriate matrix corrections connect these factors to composition. NIST work on quantitative SEM/EDS shows how accurate measurements can be achieved with controlled preparation, standards and spectral processing. A reported mass fraction should be read together with the selected element set, normalization and specimen geometry. A software table that sums to 100% has satisfied its normalization rule, not an independent test of analytical accuracy.

$$
k_i=\frac{N_i/(t_iI_i)}{N_{i,s}/(t_{i,s}I_{i,s})}
$$

| Symbol | Meaning and units |
| --- | --- |
| ![Formula](https://ml-biomat.com/static/agent-math/e8755a0f9e8b8e36aada3a9f.svg) | Normalized intensity ratio for element i between unknown and standard; dimensionless. |
| ![Formula](https://ml-biomat.com/static/agent-math/33f73a318016d781b6ae1aa9.svg) | Index identifying the analyzed element. |
| ![Formula](https://ml-biomat.com/static/agent-math/bf916434bdeeb6654028e556.svg) | Net counts of the same characteristic line in unknown and standard, after background subtraction. |
| ![Formula](https://ml-biomat.com/static/agent-math/55fa88cba25de0f80f2ea93c.svg) | Corresponding live acquisition times, s. |
| ![Formula](https://ml-biomat.com/static/agent-math/70fd09737bb43bbcddb8e886.svg) | Corresponding beam currents, expressed in the same unit. |
| ![Formula](https://ml-biomat.com/static/agent-math/b8208c8407bd0942fcaa88f9.svg) | Subscript s denotes the standard. |

With equal live time and current, 6,000 counts from the unknown and 12,000 from the standard give k=0.5. Normalization removes exposure differences. Composition additionally requires matrix corrections for absorption, atomic-number effects and fluorescence; 0.5 is not directly a 50% mass fraction.

The constructed example uses peaks centered at 2.00 and 2.14 keV, called peak 1 and peak 2 rather than assigned to real elements. Their net areas are set to 6,000 and 3,000 counts. Increasing detector peak width from 80 eV to 160 eV and 240 eV makes them increasingly difficult to distinguish visually, even when total peak counts remain unchanged. The program combines known peak shapes with a background and estimates both areas and the background using nonnegative least squares. Specifying centers and widths makes this a controlled exercise. Experimental analysis must establish these quantities through calibration, line families and an appropriate physical model.

![Independently constructed teaching spectrum; two arbitrary peak positions illustrate overlap without assigning elements. A varies energy resolution; B jointly fits two peaks and background; C checks count-scaled residuals; D shows precision for background-free Poisson counts. Complete code generates the values.](https://ml-biomat.com/static/tutorials/experimental-methods/figures/3f80a1f63b5d2d308173b05d.svg?v=3f80a1f63b5d)

Figure 3Independently constructed teaching spectrum; two arbitrary peak positions illustrate overlap without assigning elements. A varies energy resolution; B jointly fits two peaks and background; C checks count-scaled residuals; D shows precision for background-free Poisson counts. Complete code generates the values.

The residual plot subtracts fitted counts from observed counts and divides by an approximate counting standard deviation. Fluctuations around zero indicate that the chosen model explains the main spectral shape. A sustained positive or negative feature can suggest a missing peak, an unsuitable background or an incorrect width. A close fit does not automatically establish a unique elemental combination, particularly when heavily overlapping candidates can exchange fitted area. Additional counts improve random precision. Better spectral resolution or information from other lines helps distinguish competing components. These improvements target different causes and are easier to understand when viewed together in the diagnostic panels.

$$
N_{\mathrm{net}}=N_g-\alpha N_b,\qquad \sigma_{\mathrm{net}}=\sqrt{N_g+\alpha^2N_b}
$$

| Symbol | Meaning and units |
| --- | --- |
| ![Formula](https://ml-biomat.com/static/agent-math/6468fae1cbb437ecfc0c3d51.svg) | Net counts after background subtraction. |
| ![Formula](https://ml-biomat.com/static/agent-math/20f373067c0c290e52601d71.svg) | Gross counts in the peak window. |
| ![Formula](https://ml-biomat.com/static/agent-math/c0a95fa5ddcb2300bb4c3a4e.svg) | Counts in an independent background window. |
| ![Formula](https://ml-biomat.com/static/agent-math/7995b2daef1650484d2fa651.svg) | Dimensionless factor scaling background-window counts to the peak window by width or exposure. |
| ![Formula](https://ml-biomat.com/static/agent-math/d4d550c712b8e8f75ec7484b.svg) | Standard deviation of net counts, in count units. |

For independent Poisson counts, variances add even when the count values are subtracted. A gross count of 1,200 minus 200 equivalent background counts gives 1,000 net counts, SD √1400≈37.4 and relative SD 3.74%. If background parameters come from a joint fit, use fit covariance to describe correlations.

For elemental maps, the same spectral questions recur at every scanned position. A colored map can be produced by integrating a narrow energy window, subtracting background or fitting overlapping components, and these procedures do not necessarily give identical results. A bright pixel in a simple window map may contain a neighboring line or background contribution. Retaining a spectrum summed over the region of interest helps check the assignment with more counts. Map resolution should also be related to the X-ray interaction volume rather than assumed equal to the fine pixel grid of the accompanying electron image.

## Which problems improve when the counting time increases?

The interactive experiment fixes the two teaching peak positions while allowing changes in detector width, the relative area of the second peak and counting time. It displays expected counts without random fluctuations so that the underlying overlap remains easy to inspect. Longer counting raises the signal and improves expected counting precision, but it does not narrow the detector's peak response. As the second component becomes smaller, it may appear only as a shoulder on the larger peak. This illustrates why a small component may require the full spectral shape and corroborating information rather than a visually isolated sharp maximum.

## Change resolution: what happens to two peaks?

This constructed teaching spectrum does not describe pollen composition. Peaks remain at 2.00 and 2.14 keV; change detector width, the second-to-first area ratio and acquisition time. Curves show expected counts; compare peak heights with total areas.

[Figure: Expected two-peak spectrum](https://ml-biomat.com/tutorials/experimental-methods/i03/en/#I03-plot)

The relative counting SD for peak one is the ideal background-free value. Background and overlap make actual area estimation harder. Better resolution and longer counting time address different problems.

The complete program creates the original SEM signal schematic, displays the bundled CDC pollen image and independently constructs a teaching EDS spectrum with Poisson counting noise. It saves expected counts, simulated observations, fitted values and standardized residuals for each energy channel. It also checks recovery of the known noiseless model, making it possible to verify the 6,000 and 3,000 peak areas under ideal conditions. Real image and constructed spectrum remain explicitly distinguished in files and captions. Change width first, then count scale, and compare which alteration improves component separation and which chiefly improves random stability of area estimates.

### Complete Python: a real SEM image and an EDS overlap experiment

Includes the public image; the teaching spectrum uses a fixed random seed. Exports CSV, fitted parameters, residuals and three bilingual figures.

```
"""SEM/EDS: signal origins, a public-domain SEM image, and peak overlap.

Image: CDC/Janice Carr, PHIL 5609, public domain.
Spectra are constructed teaching data, not an analysis of the pollen image.
"""
from pathlib import Path
import argparse,csv,json
import numpy as np
from PIL import Image
from scipy.optimize import nnls
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.patches import Rectangle,Ellipse

def main(output,language):
    output.mkdir(parents=True,exist_ok=True)
    plt.rcParams.update({'font.family':'sans-serif','font.sans-serif':['Microsoft YaHei','Noto Sans CJK SC','DejaVu Sans'],'svg.fonttype':'none','font.size':11,'axes.titleweight':'bold','axes.spines.top':False,'axes.spines.right':False,'figure.facecolor':'#faf9f5','savefig.facecolor':'#faf9f5','text.color':'#243b45','axes.labelcolor':'#243b45'})
    tr=lambda a,b:a if language=='zh' else b
    green,blue,red,gray='#168477','#3474a8','#bd624b','#788b90'
    def save(fig,name):
        fig.savefig(output/f'{name}-{language}.svg',bbox_inches='tight');fig.savefig(output/f'{name}-{language}.png',dpi=140,bbox_inches='tight');plt.close(fig)
    fig,axes=plt.subplots(1,2,figsize=(12,6),layout='constrained')
    ax=axes[0];ax.set(xlim=(0,10),ylim=(0,10));ax.axis('off');ax.set_title(tr('A  扫描位置与探测器信号配对','A  Pair scanning position with detector signal'))
    ax.add_patch(Rectangle((3.8,3.5),2.4,5.5,fc='#e2e8e5',ec=gray));ax.text(5,8.5,tr('电子源','Electron source'),ha='center')
    for y in [6.8,5,3.8]:ax.add_patch(Ellipse((5,y),2,.45,fc='#bfd4dc',ec=blue))
    ax.plot([5,5],[8,2.5],color=blue,lw=2);ax.text(6.7,6.6,tr('透镜与光阑','Lenses and apertures'));ax.text(6.7,4.7,tr('扫描线圈','Scan coils'))
    ax.add_patch(Rectangle((2,1.5),6,.8,fc='#c7b5a1'));ax.text(5,1.8,tr('样品台','Specimen stage'),ha='center')
    ax.add_patch(Rectangle((.5,3),1.6,1,fc='#c8e1d8',ec=green));ax.text(.3,4.3,tr('SE探测器','SE detector'))
    ax.annotate('',(1.4,3.4),(5,2.5),arrowprops={'arrowstyle':'->','lw':2,'color':green})
    ax.text(.3,.3,tr('1965：Stereoscan走向系列化生产\n扫描坐标决定像素位置，信号决定亮度','1965: Stereoscan enters series production\nScan coordinates locate pixels; signals set brightness'),fontsize=10)
    ax=axes[1];ax.set(xlim=(-4,4),ylim=(-4,4));ax.axis('off');ax.set_title(tr('B  同一束电子产生不同信号','B  One incident beam, several signals'))
    ax.add_patch(Rectangle((-4,-4),8,4,fc='#e6dfd1'));ax.plot([-4,4],[0,0],color=gray,lw=2)
    ax.add_patch(Ellipse((0,-1.6),3.5,3.1,fc='#abc6d0',alpha=.55));ax.add_patch(Ellipse((0,-.15),1.1,.3,fc=green,alpha=.6))
    ax.annotate('',(0,0),(0,3.6),arrowprops={'arrowstyle':'->','color':blue,'lw':3});ax.text(.2,2.8,tr('入射电子','Incident electrons'))
    ax.annotate('',(-2.8,1.6),(-.2,-.1),arrowprops={'arrowstyle':'->','color':green,'lw':2});ax.text(-3.9,2,tr('SE：近表面','SE: near surface'))
    ax.annotate('',(2.8,1.4),(.1,-1),arrowprops={'arrowstyle':'->','color':blue,'lw':2});ax.text(1.7,1.9,tr('BSE：散射返回','BSE: returning electrons'))
    ax.plot([.2,.6,1,1.4,1.8,2.2,2.6],[ -2,-1.9,-1.5,-1.6,-1.2,-1.3,-.9],color=red,lw=2);ax.text(1.4,-2.5,tr('X射线：元素信息','X-rays: elemental information'))
    ax.text(-3.8,-3.7,tr('范围取决于能量与材料；示意不按比例','Ranges depend on energy and material; not to scale'),fontsize=10)
    save(fig,'signals')
    photo=np.asarray(Image.open(Path(__file__).parent/'data/pollen-cdc5609.jpg'))
    fig,ax=plt.subplots(figsize=(10,7.5),layout='constrained');ax.imshow(photo,cmap='gray');ax.axis('off');ax.set_title(tr('真实SEM：花粉表面的纹理与几何','Real SEM: texture and geometry of pollen surfaces'))
    fig.text(.5,.01,'CDC / Janice Carr · PHIL 5609 · Public domain · wwwn.cdc.gov/phil',ha='center',fontsize=10)
    save(fig,'pollen')
    energy=np.arange(1.6,2.5001,.005);centers=np.array([2.00,2.14]);areas=np.array([6000.,3000.])
    def basis(fwhm):
        sigma=fwhm/np.sqrt(8*np.log(2))
        g=np.exp(-.5*((energy[:,None]-centers)/sigma)**2)
        return g/g.sum(axis=0)
    fwhm=.16;G=basis(fwhm);background=8.;expectation=G@areas+background
    rng=np.random.default_rng(1703);counts=rng.poisson(expectation)
    design=np.column_stack([G,np.ones(len(energy))]);coef,_=nnls(design,counts);fit=design@coef
    exact,_=nnls(design,expectation)
    fig,axes=plt.subplots(2,2,figsize=(11,8),layout='constrained')
    for width,color in [(.08,green),(.16,red),(.24,blue)]:axes[0,0].plot(energy,basis(width)@areas+background,color=color,label=f'FWHM {width*1000:.0f} eV',lw=2)
    axes[0,0].set(xlabel=tr('能量 / keV','Energy / keV'),ylabel=tr('期望计数 / 能道','Expected counts / channel'),title=tr('A  分辨率改变峰的重叠','A  Resolution changes peak overlap'));axes[0,0].legend(frameon=False)
    axes[0,1].step(energy,counts,where='mid',color=gray,lw=1,label=tr('教学计数','Teaching counts'));axes[0,1].plot(energy,fit,color=red,lw=2,label=tr('固定峰位联合拟合','Joint fit with fixed centers'))
    for i,color in enumerate([green,blue]):axes[0,1].plot(energy,G[:,i]*coef[i],ls='--',color=color,label=f'Peak {i+1}')
    axes[0,1].set(xlabel=tr('能量 / keV','Energy / keV'),ylabel=tr('计数 / 能道','Counts / channel'),title=tr('B  同时处理峰与背景','B  Fit peaks and background together'));axes[0,1].legend(frameon=False,fontsize=9)
    residual=(counts-fit)/np.sqrt(np.maximum(fit,1));axes[1,0].plot(energy,residual,color=green,lw=1);axes[1,0].axhline(0,color=gray);axes[1,0].axhspan(-2,2,color=gray,alpha=.12)
    axes[1,0].set(xlabel=tr('能量 / keV','Energy / keV'),ylabel=tr('计数残差 / √拟合计数','Count residual / √fitted count'),title=tr('C  残差检验模型遗漏','C  Residuals reveal model mismatch'))
    n=np.logspace(1,5,100);axes[1,1].loglog(n,100/np.sqrt(n),color=blue,lw=2)
    axes[1,1].set(xlabel=tr('无背景的净计数','Net counts without background'),ylabel=tr('泊松相对标准差 / %','Poisson relative SD / %'),title=tr('D  计数增加四倍，相对噪声减半','D  Four times the counts halves relative noise'))
    save(fig,'eds')
    with (output/'data.csv').open('w',newline='',encoding='utf8') as f:
        w=csv.writer(f);w.writerow(['energy_keV','expected_counts','observed_teaching_counts','fitted_counts','standardized_residual']);w.writerows(zip(energy,expectation,counts,fit,residual))
    summary={'energy_channels':len(energy),'peak_separation_keV':.14,'noiseless_area1':float(exact[0]),'noiseless_area2':float(exact[1]),'noiseless_background':float(exact[2]),'fitted_area1':float(coef[0]),'fitted_area2':float(coef[1]),'fitted_background':float(coef[2]),'electron_count_100pA_1s':100e-12/1.602176634e-19,'scale_um_per_px_10um_180px':10/180,'poisson_relative_sd_10000':.01,'image_shape':list(photo.shape),'data_origin':'Real public-domain CDC SEM image; EDS spectrum independently constructed, not measured from that image.'}
    (output/'summary.json').write_text(json.dumps(summary,ensure_ascii=False,indent=2),encoding='utf8');print(json.dumps(summary,ensure_ascii=False))

if __name__=='__main__':
    p=argparse.ArgumentParser(description=__doc__);p.add_argument('--output',type=Path,required=True);p.add_argument('--language',choices=['zh','en'],default='zh');a=p.parse_args();main(a.output,a.language)
```

With the fixed random seed, the fitted peak areas are approximately 6,257.8 and 3,076.7 counts, with 7.16 background counts per channel. Differences from the specified values arise from this Poisson realization. Replacing the observations with noiseless expectations lets the same algorithm recover 6,000, 3,000 and 8. This comparison separates numerical recovery from random measurement variation and explains why an experimental estimate needs an uncertainty description.

## Connect morphology and composition to one materials question

A concrete fiber-diameter experiment shows why image selection matters as much as drawing measurement lines. Start from a low-magnification overview, divide the area into a grid and select fields according to a predefined spacing. Within each field, measure perpendicular to the fiber axis. Crossings, broken ends and visibly flattened regions need a consistent inclusion rule because widths at those locations do not have the same meaning as the diameter of an intact cylindrical fiber. Selecting only the thinnest or sharpest fibers can bias a large collection of measurements. Saving measurement lines on image copies lets another reader understand exactly how each number was obtained.

Suppose three independently prepared mats each contribute five fields, with twenty fibers measured per field. The result contains three hundred diameter values, but it does not contain three hundred independent preparations. Fibers within a field share local processing conditions, and fields within one mat may also be correlated. Plot each mat's distribution before comparing the independent specimens. For a skewed diameter distribution, the median, interquartile range and full distribution provide complementary information; one mean can hide a small population of unusually thick fibers. This sampling design connects the statement that fibers became thinner to defined locations, measured objects and independently prepared batches.

The same hierarchy applies to elemental maps. Repeated pixels in one selected deposit describe its internal spatial variation, whereas deposits from separate specimens test whether the treatment reproducibly produces that composition. Choose the comparison level that matches the question and retain enough overview images to show where each map came from. A useful final panel might combine a low-magnification location map, a detailed morphology image, spectra from deposit and substrate, and a specimen-level summary. Each component then answers a different part of the same investigation, while the reader can trace the route from the material to the reported quantity.

For a surface deposit, begin with a lower-magnification overview, examine representative detailed regions and acquire spectra from deposit, exposed substrate and an appropriate blank. This helps separate pre-existing substrate elements, treatment-related changes and preparation contributions. Element maps should be accompanied by spectral and counting information. When each pixel has few counts, automatic color stretching can turn weak fluctuations into vivid patches. Independently normalizing each element map to its own maximum can also make different elements look equally prominent without implying comparable abundance. Shared acquisition and clearly stated mapping operations make spatial comparisons easier to interpret.

For calcium–phosphate deposition, EDS can support the presence and spatial distribution of the relevant elemental signals. Crystal phase, bonding and organic components can be examined with XRD, infrared spectroscopy or other matched methods. For a fiber mat, SEM diameter and pore morphology can be connected with mechanical response, wetting and cell behavior through measurements on appropriately related samples. Linking each image, spectrum and numerical table to a specific specimen and treatment places the microscopic observation within the research argument. The resulting evidence then answers a materials question instead of remaining a separate collection of attractive micrographs.

Consider a region that is bright in a backscattered-electron image and produces a gold peak after the specimen has been gold-coated. Geometry, coating and specimen composition may all contribute. Preparation records, comparison regions and suitable analysis conditions help separate those contributions. Now consider a weak spectral feature whose fluctuations decrease with longer acquisition but which remains joined to a neighboring peak. That behavior reflects the difference between counting precision and energy resolution. Connecting signal origin, specimen state and calculation definitions gives SEM and EDS clear and complementary roles in an investigation.

[Download complete code and data](https://ml-biomat.com/static/tutorials/experimental-methods/downloads/I03.zip)

Extract and follow the README; the code matches this chapter.

## References and further reading

1. [CDC PHIL 5609 — pollen SEM](https://wwwn.cdc.gov/phil/Details.aspx?pid=5609)

   Real image identity, scale and public-domain status.

   Public domain; CDC / Janice Carr.
2. [JEOL — secondary electron](https://www.jeol.com/words/semterms/20121024.070758.php)

   Secondary-electron energy and near-surface signal.
3. [JEOL — backscattered electron](https://www.jeol.com/words/semterms/20121024.072858.php)

   Backscattering, atomic number and topographic contrast.
4. [University of Cambridge — Stereoscan](https://www-g.eng.cam.ac.uk/125/1950-1975/sem2.html)

   Engineering history and Stereoscan series production in 1965.

   Historical institutional reference; diagram original.
5. [MyScope — SEM image artefacts](https://myscope.training/SEM_Image_artefacts_and_trouble_shooting)

   Charging, drift, contamination and beam damage.

   Site educational text CC BY-SA 4.0 unless otherwise stated; linked reading.
6. [Newbury & Ritchie — quantitative SEM/SDD-EDS](https://link.springer.com/article/10.1007/s10853-014-8685-2)

   Standards-based elemental analysis, peak interference, counts and matrix corrections.

   Open-access article CC BY 4.0; linked reading.
