---
title: "Electron Ptychography: Recover Phase from Overlap Interactive Lab | Sandbox Physics"
description: "What do overlapping probe positions add to a set of diffraction patterns? Redundancy. A diffraction pattern records intensity and loses the phase."
canonical_url: "https://sandboxphysics.com/labs/electron-ptychography/"
language: "en"
page_type: "lab"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/labs/electron-ptychography/"
last_modified: "2026-10-27"
---

E39 · Electron wavefront

# Electron Ptychography: Recover Phase from Overlap

**What do overlapping probe positions add to a set of diffraction patterns?** Redundancy. A diffraction pattern records intensity and loses the phase. When neighboring probe positions overlap, each part of the object shows up in several patterns. An iterative algorithm adjusts a phase guess until it agrees with all of them, which can recover the lost phase, though not always uniquely.

Record a diffraction pattern at every position of an overlapping scan, then refine a phase estimate over repeated iterations against the stored counts.

> Interactive simulation: open this page in a web browser to change the parameters and run the model.

Model assumptions

The model uses a coherent 200 kV beam and a single-slice teaching object that changes only the phase. ePIE jointly updates a finite probe and the unit-modulus object from stored counts and known integer positions. Independent width and defocus calibration initialize the probe; a frozen-probe option supplies a mismatch comparison. Unit incident norm and unit object modulus fix the amplitude scale. Constant phase and opposite affine phase ramps in object and probe remain ambiguous; regular scans can have further ambiguities. The displayed object phase is relative to its illuminated circular mean. ADF and integrated CoM use these same electrons. The latter is a weak-phase, finite-detector comparison with a free integration constant, not a general quantitative phase inversion. Multislice scattering, position refinement, partial coherence, damage, background and real-material resolution are omitted. A small residual alone does not prove that the object is unique or correct. Angles and specimen size are enlarged schematically.

Physics tutorial

## Electron Ptychography: Recover Phase from Overlap

**Background** A detector records only the intensity of each diffraction pattern, so the phase is lost. Ptychography scans the probe in overlapping steps; here you record such a dataset and refine a phase estimate against the stored counts.

**Why it matters** When neighbouring probe positions overlap, each part of the object appears in several diffraction patterns, and that redundancy helps constrain the phase.

Start with the essentials

- **Focus question**: What do overlapping probe positions add to a set of diffraction patterns?
- **One-sentence intuition**: Compare the measured diffraction plane with the reconstructed object plane, and do not confuse what was computed with what was measured.

### Core mathematical model

#### How the stored diffraction counts arise

$$
\begin{aligned}\Psi_j&=\mathcal F\!\left[P\,O_j\right]\\C_j&\sim\operatorname{Poisson}\!\left(N|\Psi_j|^2\right)\end{aligned}
$$

The known probe and positions define each patch of the exit wave. Because the detector samples the complete discrete pattern, a unit-modulus object conserves the expected number of electrons.

#### Joint object and probe updates

$$
\begin{aligned}\Psi_j^c&=\sqrt{C_j/N}\,e^{i\arg\Psi_j}\\O_j&\leftarrow O_j+\beta\frac{P^*}{\max|P|^2}(\psi_j^c-\psi_j)\end{aligned}
$$

The object step is 0.7 with a unit-modulus constraint. Joint mode adds a probe step of 0.15 after two initialization passes, using the previous object value. Each pass normalizes the probe to the independently known incident intensity.

#### Residual against the measured amplitudes

$$
R=\sqrt{\frac{\sum_{j,k}(|\Psi_{j,k}|-\sqrt{C_{j,k}/N})^2}{\sum_{j,k}C_{j,k}/N}}
$$

The residual measures how well the estimate matches the recorded amplitudes. A sparse scan can fit well and still leave the phase unconstrained.

### Common difficulties

#### What a low residual does not prove

**Typical misconception** A low residual or sharp calculated probe certifies an experimental image.

**Better mental model** The residual describes only this model. The model uses a coherent 200 kV beam and a single-slice teaching object that changes only the phase. ePIE jointly updates a finite probe and the unit-modulus object from stored counts and known integer positions. Independent width and defocus calibration initialize the probe; a frozen-probe option supplies a mismatch comparison. Unit incident norm and unit object modulus fix the amplitude scale. Constant phase and opposite affine phase ramps in object and probe remain ambiguous; regular scans can have further ambiguities. The displayed object phase is relative to its illuminated circular mean. ADF and integrated CoM use these same electrons. The latter is a weak-phase, finite-detector comparison with a free integration constant, not a general quantitative phase inversion. Multislice scattering, position refinement, partial coherence, damage, background and real-material resolution are omitted. A small residual alone does not prove that the object is unique or correct. Angles and specimen size are enlarged schematically.

### Run the experiment

1. 01

   #### Predict the overlap

   Choose the scan step, the probe width and the number of electrons per frame.

   **What to observe:** With the counts per frame fixed, a smaller step gives more overlap and also more total dose.

2. 02

   #### Record the scan

   Acquire the dataset and browse the stored diffraction frames.

   **What to observe:** Moving the acquisition sliders afterwards does not rewrite the stored frames.

3. 03

   #### Refine the phase estimate

   Choose the number of iterations and the assumed probe calibration, then reconstruct.

   **What to observe:** Only the recorded counts, the positions and the calibration constrain the object update.

4. 04

   #### Make it fail

   Compare the sparse, low-count and incorrect-probe examples before you check the target.

   **What to observe:** A small residual can come with a phase that is wrong or only weakly constrained.

Physical conclusion

Finishing the teaching task does not establish an experimental resolution or a unique phase recovery.

Fields & matter · Starter path

## From a field to an electron microscope

Map an electric field and steer a charged particle. Then find the electron's wavelength and use electron beams to see a crystal and a surface.

[Start here → **Make an Electric Field Visible** Move the probe around a dipole and check that the field always points downhill on the potential landscape. Observe · 8 min](https://sandboxphysics.com/labs/electric-field/)

1. [1 Make an Electric Field Visible](https://sandboxphysics.com/labs/electric-field/)
2. [2 A Charge Bending through Fields](https://sandboxphysics.com/labs/charged-particle/)
3. [3 Electron Wavelength & Voltage](https://sandboxphysics.com/labs/electron-wavelength/)
4. [4 Electron Diffraction & Reciprocal Space](https://sandboxphysics.com/labs/electron-diffraction/)
5. [5 TEM Bright Field, Dark Field & SAED](https://sandboxphysics.com/labs/tem-mode-selector/)
6. [6 SEM Secondary-Electron Topography](https://sandboxphysics.com/labs/sem-topography/)

[View the full path →](https://sandboxphysics.com/topics/fields-and-matter/#starter-path)
