Coherent diffractive imaging · sampling geometry

Oversampling,
drawn out.

A sample plane, a detector plane, and one Fourier transform between them. Scroll to build the picture one layer at a time — pixels, reciprocal lengths, diffraction fringes, and the moment everything aliases — then take the controls with real BCDI numbers.

scroll to begin

Layer 01 · the stage

Two planes, one transform

A coherent plane wave ψ(r) = A·eikr of wavelength λ illuminates an object of size a. The wave that leaves the object — the exit wave — carries the object's absorption in its amplitude and its refractive delay in its phase. For a crystalline object that absorption profile is not featureless: it carries information about the object's lattice spacing along the illuminated dimension.

ψESW(r) = A(r)·eiφ₀(r)

After travelling a distance z, the far-field pattern landing on the detector is the Fourier transform of that exit wave. Everything on this page follows from that single fact. In the simplest terms, BCDI runs the trip in reverse: measure the far-field exit wave and apply the inverse Fourier transform to reconstruct the original object.

Layer 02 · real space

Pixelate the sample plane

The reconstruction lives on a grid: a computational window of total width Ls, divided into N pixels of size ps. The object only spans m of those pixels.

Ls = N·ps     m = a / ps

The empty pixels around the object are the no-density region (padding). They aren't wasted space — they're known zeros, the extra equations phase retrieval needs to pin down the unknown phases.

Layer 03 · detector space

Pixelate the detector

The detector has its own grid: N pixels of pitch PD, for a total width LD.

LD = N·PD

N is the same number on both planes — a discrete Fourier transform takes N samples in and gives N samples out. The two grids are locked together.

Layer 04 · reciprocity

The crossing rays

This is the heart of the whole geometry. The Fourier transform pairs lengths inversely: the smallest feature on one plane sets the largest extent on the other, and vice versa.

ps = zλ / LD     PD = zλ / Ls

Green: one real-space pixel ↔ the whole detector. Collect wider angles, resolve finer detail.
Red: the whole real-space window ↔ one detector pixel. A bigger window demands finer detector sampling.

Layer 05 · the signal

An object of size a makes fringes

A new panel has appeared below the planes: a horizontal slice through the intensity landing on the detector. It isn't smooth — it oscillates. These oscillations are speckle fringes, and their characteristic spacing is set by the object size:

fringe spacing = zλ / a   ⇒   f₀ = a / zλ

Bigger object → finer fringes. The object size a is the highest spatial frequency the intensity pattern contains. That frequency, f₀, is what the detector has to keep up with.

Note: the side fringes are artificially boosted for visibility.

Layer 06 · the samples

The detector samples those fringes

The red curve is the continuous pattern physics delivers — but the detector never sees it continuously. Each pixel integrates the light falling on it and reports one number, a single reading per pitch PD, so the detector samples at

fsampling = 1 / PD

Each blue dot in the strip is one of those readings: the intensity at one pixel's centre, lifted off the red curve. Nyquist's rule: to capture an oscillation faithfully you need at least two samples per fringe. Right now each fringe spans several pixels — the blue dots trace the red curve honestly.

Layer 07 · the failure mode

Aliasing — when the fringes outrun the pixels

OS < 2 Move the detector too close (or image too large an object) and the fringes squeeze tighter than two pixels. The blue dots — the pixels' readings — still land on the true curve, but the curve they imply — dashed blue — is a slower, fake oscillation. Entire fringes vanish.

Notice the sample plane on the left: the object now nearly fills the window. Insufficient sampling in detector space is insufficient padding in real space — they are the same condition seen from the two planes.

Layer 08 · the condition

The oversampling ratio

Divide sampling rate by signal rate and every quantity on this page collapses into one dimensionless number:

OS = fsamp / f₀ = zλ / (a·PD) = Ls / a = N / m  >  2

Detector-geometry form, real-space-length form, pixel-count form — the same number three ways. Satisfy it anywhere and you've satisfied it everywhere.

Layer 09 · the trade-off

Resolution pulls the other way

The reconstruction's pixel size — your resolution — comes from the green pair, now front and centre on the left: one real-space pixel is tied to the full detector width,

ps = zλ / (N·PD)

Here is the tension. Pulling the detector back (increasing z) widens the fringes, so OS rises — good for sampling. But the same move coarsens ps — bad for resolution. Moving closer sharpens the picture right up until the fringes outrun the pixels. Both requirements pull on the same lever.

So how good can the resolution get before sampling gives out?

Layer 10 · the ceiling

The best resolution sampling allows

Push to the legal limit: OS = 2 exactly. The oversampling condition OS = zλ/(a·PD) = 2 pins down the combination zλ/PD = 2a. Substitute that into the resolution formula and watch z, λ and PD all cancel:

ps│OS=2 = zλ / (N·PD) = 2a / N

At the sampling threshold the best resolution is fixed by the pixel count N alone. More resolution requires more pixels — distance can't buy it.

This is why detector format matters as much as anything else on the beamline: N is the only lever that improves resolution without spending oversampling.

Layer 11 · BCDI numbers

A gold grain at a synchrotron

Typical Bragg CDI setup: 9 keV photons (λ = 1.378 Å), a 300 nm Au nanocrystal, a photon-counting detector with 55 µm pixels and N = 256 across the region of interest.

zmin = 2·a·PD / λ ≈ 0.24 m
at z = 0.5 m:  OS ≈ 4.2,  ps ≈ 4.9 nm,  LD ≈ 14.1 mm

Half a metre comfortably clears the threshold and resolves ~5 nm features — strain lobes, facets — across the grain. Try moving everything yourself below.

Free play

The full instrument

Every variable, live. Watch the rays, the fringes, and the padding respond together. The status flips the moment you cross OS = 2.

oversampling OS = zλ/(a·P_D)
4.18
resolution p_s = zλ/(N·P_D)
4.89 nm
min distance z_min (OS = 2)
0.24 m
detector width L_D = N·P_D
14.1 mm
sampling status
—

Drag z below ~0.24 m with the defaults and watch the aliased curve appear — and the padding on the sample plane collapse with it.

Pocket reference

Reciprocal sampling

ps = zλ / (N·PD)
PD = zλ / (N·ps)

One Fourier relationship solved two ways. Detector extent sets real-space resolution; window extent sets the detector pitch you need.

Oversampling condition

OS = zλ/(a·PD) = Ls/a = N/m > 2

Two samples per fringe (Nyquist), equivalently a window at least twice the object. Aim for 3–4 in practice — algorithms are happier away from the edge.

Resolution

ps = zλ / (N·PD)

Set by the full detector width. At the OS = 2 threshold it reduces to 2a/N — pixel count is the only lever on resolution that doesn't cost you sampling.