Coherent diffractive imaging · the double slit

Two slits,
oversampled.

A screen with two slits, a detector, and one Fourier transform between them. Scroll to build the picture one layer at a time — pixels, reciprocal lengths, interference fringes, and the moment everything aliases — with the same geometry read back, at every step, as Bragg CDI on a crystal. Then take the controls.

scroll to begin

Layer 01 · the stage

Two slits, one transform

A coherent plane wave ψ(r) = A·eikr of wavelength λ hits an opaque screen pierced by two slits — separation d, each of width w. The wave just past the screen — the exit wave — is bright across the two openings and zero on the bar.

ψESW(r) = A(r)·eiφ₀(r)   (two open apertures)

After travelling a distance z, the pattern on the detector is the Fourier transform of that exit wave — Young's interference fringes. Everything on this page follows from that single fact.

→ In BCDI

Swap the screen for a crystal. Its exit wave carries the lattice and shape; the far field is again a Fourier transform — only it sits wrapped around a Bragg peak instead of the zero-angle axis. BCDI runs the trip in reverse: measure the far field, apply the inverse transform, and reconstruct the object.

Layer 02 · real space

Pixelate the slit plane

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

Ls = N·ps     m = d / ps

The empty pixels around the slits are the no-density region (padding) — not wasted space but known zeros, the extra equations phase retrieval needs to pin down the unknown phases.

→ In BCDI

Identical bookkeeping. The crystal sits inside a padded window; everything outside its support is a known zero. The slit-pair extent d plays the part of the crystal's overall size.

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.

→ In BCDI

Same grid, except the N pixels mark a region of interest cropped around the Bragg peak rather than the forward beam.

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.

→ In BCDI

Reciprocity is geometry-agnostic — it holds identically around a Bragg peak. The same two pairs set BCDI's resolution and required detector pitch.

Layer 05 · the signal

Two slits make interference fringes

A new panel has appeared below the planes: a horizontal slice through the intensity on the detector. It is the textbook double-slit pattern — fast cos² interference fringes set by the separation d, riding under a broad sinc² envelope set by the slit width w.

I(x) ∝ sinc²(wx/zλ)·cos²(πdx/zλ)  ⇒  fringe spacing = zλ/d

The slit separation d — the object's largest dimension — sets the finest fringe, the highest spatial frequency the pattern carries: f₀ = d/zλ. The slit width only shapes the envelope.

→ In BCDI

The crystal's overall size plays the role of d: it sets the spacing of the speckle fringes draped over the Bragg peak. The slit width w is like fine internal structure — facets, strain — that shapes the envelope but not the fringe spacing that drives sampling.

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 interference fringe spans several pixels — the blue dots trace the red curve honestly.

→ In BCDI

Same Nyquist demand on the speckle. Two pixels per speckle fringe is the floor; below it, the recorded pattern no longer determines the crystal.

Layer 07 · the failure mode

Aliasing — when the fringes outrun the pixels

OS < 2 Move the detector too close (or widen the slit separation) 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 slit plane on the left: the slit pair now nearly fills the window. Insufficient sampling in detector space is insufficient padding in real space — the same condition seen from the two planes.

→ In BCDI

Under-sample the speckle and reconstruction fails the same way — the algorithm cannot tell the true crystal from an aliased ghost. This is why BCDI scans are planned to keep OS comfortably above 2.

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λ / (d·PD) = Ls / d = 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.

→ In BCDI

Replace d with the crystal size a and the condition is BCDI's verbatim: OS = zλ/(a·PD) > 2, and it must hold along every dimension of the 3D pattern.

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?

→ In BCDI

The same tug-of-war sets every BCDI beamline geometry: detector distance buys sampling at the cost of resolution, and vice versa.

Layer 10 · the ceiling

The best resolution sampling allows

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

ps│OS=2 = zλ / (N·PD) = 2d / 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.

→ In BCDI

With d → crystal size a, the ceiling is 2a/N. Detector format is the only lever that improves BCDI resolution without spending oversampling.

Layer 11 · the generalisation

From two slits to a crystal

Everything above is the double slit in one dimension, at zero scattering angle. Real Bragg CDI keeps the exact geometry and adds three things:

① The object is a 3D crystal, so the pattern is a 3D speckle volume and the oversampling condition must hold along every axis — including the rocking direction, swept by rotating the crystal through the Bragg condition.
② The pattern sits around a Bragg peak, not the optical axis; the phase of the speckle now encodes lattice strain, not just shape.
③ The slit separation d becomes the crystal's overall size, the cos² fringes become 3D speckle, and the sinc² envelope becomes the peak's shape.

Strip those three away and you are left with exactly this page: one transform, one sampling condition, one resolution trade-off.

Layer 12 · BCDI numbers

A gold grain at a synchrotron

Typical Bragg CDI setup: 9 keV photons (λ = 1.378 Å), a 300 nm Au nanocrystal (this is the "slit separation" d — the object's overall size), a photon-counting detector with 55 µm pixels and N = 256 across the region of interest.

zmin = 2·d·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. Separation d drives the fringes and the sampling; width w shapes the envelope. Watch the rays, the fringes, and the padding respond together — the status flips the moment you cross OS = 2.

oversampling OS = zλ/(d·P_D)
4.18
resolution p_s = zλ/(N·P_D)
4.89 nm
min distance z_min (OS = 2)
0.24 m
fringes / envelope ≈ 2d/w
8.6
sampling status
—

Drag z below ~0.24 m with the defaults and watch the aliased curve appear — and the padding on the slit plane collapse with it. Widen w and the envelope tightens, swallowing the outer fringes, but OS doesn't budge: only separation sets sampling.

Pocket reference

Double-slit pattern

I(x) ∝ sinc²(w·x/zλ)·cos²(πd·x/zλ)

Fast interference fringes (spacing zλ/d, set by the separation) under a slow single-slit envelope (set by the width w). In BCDI the separation d becomes the crystal size and the fringes become Bragg-peak speckle.

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λ/(d·PD) = Ls/d = N/m > 2

Two samples per interference fringe (Nyquist), equivalently a window at least twice the slit separation. 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 2d/N — pixel count is the only lever on resolution that doesn't cost you sampling.