Differential dynamic microscopy

Is it a liquid or a solid? Microrheology with tracer beads

Many soft materials are a bit of both: a polymer solution springs back if you poke it quickly but flows if you wait, and a gel that is just forming is barely solid. Microrheology measures it without shearing the sample: it mixes in a few tiny beads and watches how far the thermal kicks of the molecules push them in a given time. In a liquid the beads wander off; in a solid they rattle in place. From that motion follow the storage modulus G' (how elastic) and the loss modulus G'' (how viscous), over many decades of frequency, from a drop of sample. Differential dynamic microscopy (DDM) reads the motion of the beads from an ordinary microscope movie, without following any of them (Edera et al. 2017). Here a simulated microscope lets you do it on materials whose moduli are known exactly.

Try this first: can these beads escape? Predict what happens to the curves in a gel, then watch the page check it.

How deep do you want to go?
Simulating the movie...
Live simulated bright-field movie

Hands on

The bench

Choose the material and the beads, then the microscope and the camera (controls on the left, or just below on a phone). The movie is recorded again and every step below updates. "Copy a link to this setup" gives an address that opens the bench with the same settings.

1

Set up the microscope

The microscope sees a round field 25 mm across in its image plane. A camera chip covers a rectangle in it, and you choose which part of the chip to read out. For microrheology a fast camera matters: the beads move only a little, and the fastest relaxations of the material are over in milliseconds. A small region of interest reads out faster.

How one bead looks

What this step gives: the finest stripes the movie can hold, and how strongly each particle shows in them: the objective and the light decide both.

The math: how each image is computed, and how the beads move

As on the sizing page: the light scattered by each bead (Mie theory) interferes with the transmitted light through the condenser and objective apertures, or the dyed bead is convolved with the point spread function (fluorescence and confocal). Each frame is the sum of the images of all beads at their positions, with the detector's pixel size, quantum efficiency, shot noise, read noise and full well. The material itself does not show.

Motion. The material is a solvent of viscosity ηs, Maxwell modes (modulus Gk, relaxation time τk) and, for a solid, an equilibrium modulus G∞:

G'(ω) = G∞ + Σ Gk (ωτk)2 / [1 + (ωτk)2],    G''(ω) = ηsω + Σ Gk ωτk / [1 + (ωτk)2]

A bead of radius a feels each mode as a spring 6πaGk in series with a dashpot 6πaGkτk, the plateau as a spring to its resting place and the solvent as a dashpot, each dashpot with its thermal noise. This is a linear (Ornstein-Uhlenbeck) process, simulated exactly at every frame, along x, y and z alike; its mean squared displacement obeys the generalised Stokes-Einstein relation exactly. The beads do not interact, and the material is the same everywhere: no mesh that small beads slip through, no beads that stick.

2

Record a movie

32-bit, photoelectrons per pixel; opens in ImageJ, Fiji and fastDDM.

The frames are log-spaced: in each cycle the first ones follow at the frame rate, then the gaps grow, and the cycle repeats. The same 512 frames then hold delays from milliseconds to about a minute, many decades of frequency in one movie.

What this step gives: a stack of frames and the time of each. The time between frames and the length of the movie set the fastest and the slowest changes that can be measured.

In fastDDM

The structure function below is the same as fastDDM's. With your own movie you would start from the image files:

import fastddm as fd
img_seq = fd.read_images(file_names)
3

Subtract two frames

Subtract a frame from one taken a little later. Everything that stays still cancels out; what is left is what moved, plus the camera noise.

What this step gives: for every pair of frames a delay apart, an image of what changed. Random motion usually makes the difference grow with the delay; directed motion can also make it swing up and down.

The math: the difference image
ΔI(x; t, Δt) = I(x, t + Δt) − I(x, t)
4

Split it into stripe patterns

Strength of each pattern in the difference (click it, or use the sliders)
The pattern you picked
How much of each pattern is left
-10, gone1, all there

Any image can be built by adding up stripe patterns of different spacing and direction. The Fourier transform tells how much of each pattern the difference image contains, averaged over the whole movie. The centre of the map holds wide stripes, the edge fine ones. The beads move the same way in every direction, so the map is round.

The charts further down label each pattern by q, a number that grows as the stripes get finer: q = 2π divided by the stripe spacing, in inverse micrometres. Stripes 1 µm apart have q of about 6.

A bead that moves by a fraction of a stripe spacing already changes that pattern; to renew a wide pattern it must go much further. So fine stripes are a magnifying glass for small motions, wide stripes for large ones, and together they cover displacements from nanometres to micrometres.

The second map shows how much of each pattern is left after the delay: red where it is still all there, the colour of the page where it has faded. In a gel the wide patterns stay red at every delay.

The dashed circle on the strength map marks the finest pattern the objective can resolve.

What this step gives: for each stripe spacing (each q, one ring of the map) and each delay, how much the movie has changed.

The math: structure function of tracer beads

For beads that do not interact, with Gaussian displacements,

d(q, Δt) = ⟨ |F[ΔI](q; t, Δt)|2 ⟩ = A(q) [1 − f(q, Δt)] + B,    f(q, Δt) = exp[−q2 ⟨Δr2(Δt)⟩ / 4]

with ⟨Δr2⟩ the mean squared displacement in the image plane. For free diffusion ⟨Δr2⟩ = 4DΔt and f = e−Dq2Δt, as on the sizing page. Map axes: qx to the right, qy up.

fastDDM's fd.ddm(img_seq, lags) works on evenly spaced frames: its lags count frames. With log-spaced frames (the standard here; "Download the movie" and "Frame times" give both files), the frames are paired by their times instead. This routine does it as the page does (the complete notebook goes on to the displacement and the moduli); on an exported movie it gives the same delays and d(q, Δt), apart from a few pairs that fall exactly on the edge between two groups of delays:

import numpy as np, tifffile

frames = tifffile.imread("movie.tif").astype(np.float64)       # T x n x n, from "Download the movie"
t = np.loadtxt("movie-times.csv", delimiter=",", skiprows=1)[:, 1]   # time of each frame (s), from "Frame times"
pixel_um = 0.1625                                             # pixel size in the sample (um) of this setup (step 2): change it with the objective or the binning

T, n, _ = frames.shape
F = np.fft.fft2(frames)                                        # one transform per frame
dt = np.diff(t).min()                                          # shortest interval between frames

# every pair of frames up to half the movie apart, grouped by its delay: one group per whole number of
# shortest intervals up to 10, then 12 groups per decade; at most about T pairs per group, spread over the movie
i, j = np.triu_indices(T, 1)
gap = t[j] - t[i]
keep = gap <= (t[-1] - t[0]) / 2 * (1 + 1e-12)
i, j, gap = i[keep], j[keep], gap[keep]
u = np.round(gap / dt, 6)                                      # delay in shortest intervals (rounded: no float noise at the group edges)
group = np.where(u < 10.5, np.round(u) - 1, 10 + np.floor(12 * np.log10(u / 10.5))).astype(int)
taus, d2d = [], []
for g in np.unique(group):
    sel = np.flatnonzero(group == g)
    sel = sel[:: int(np.ceil(len(sel) / T))]
    if len(sel) < 4:
        continue
    acc = np.zeros((n, n))
    for a, b in zip(i[sel], j[sel]):
        acc += np.abs(F[b] - F[a]) ** 2
    taus.append(gap[sel].mean())                               # the delay of this group (s)
    d2d.append(acc / len(sel) / n**2)                          # d(q, dt) on the Fourier map
taus = np.array(taus)

# azimuthal average: rings of whole wave numbers, central cross left out (as fastDDM's central_cross_mask)
k = np.fft.fftfreq(n) * n
kx, ky = np.meshgrid(k, k)
ring = np.rint(np.hypot(kx, ky)).astype(int)
ring[(kx == 0) | (ky == 0) | (ring > n // 2)] = 0
count = np.bincount(ring.ravel(), minlength=n // 2 + 1)
dq = np.array([np.bincount(ring.ravel(), m.ravel(), n // 2 + 1) / np.maximum(count, 1) for m in d2d])[:, 1:]
q = 2 * np.pi * np.arange(1, n // 2 + 1) / (n * pixel_um)     # um^-1

With evenly spaced frames (log-spaced frames switched off), fastDDM does the same:

dqt = fd.ddm(img_seq, range(1, len(img_seq) // 2))   # lags in frames
dqt.pixel_size = 0.1625        # um, the pixel of this setup (step 2)
dqt.set_frame_rate(500)     # frames per second of this setup: sets the delays in seconds
aa = fd.azimuthal_average(dqt, bins=bins, range=(0, dqt.ky[-1]))
5

Watch each pattern change

For each stripe spacing, follow how much of the pattern is left as the delay grows. Fine stripes (red) change first, because a bead only has to move a little to shift them; wide ones (blue) change later. In a liquid every curve falls to zero in the end: given time, the beads wander off and every pattern is renewed.

The points are measured: how different two frames a delay apart look, with the camera noise taken away and divided by the full change, then turned around so that 1 means the whole pattern is still there and 0 that it is gone. The lines are drawn from how far the beads move, found in step 6 from these same points, so they show that one displacement describes all the curves; the comparison with the simulated material in step 6 shows whether it is right.

The points are f(q, Δt) = 1 − (d − B) / A. The lines are exp[−q2 ⟨Δr2⟩ / 4] with the mean squared displacement of step 6 (leaving out the small effect of the depth of field), the same for every q: if the beads' displacements are Gaussian, one displacement explains all the curves. The order of the analysis. d is measured first; B comes from the camera and A from the mean power of each pattern; the points follow. The displacement comes from these points in step 6, so the lines test only that one displacement describes all of them; the comparison with the simulated material tests the result.

Things that never move vanish from the differences of step 3, but not from the full strength of each pattern, which the page needs in order to tell how much has changed. In a real sample dust or uneven light would bias that strength; a movie of the background, taken the same way, corrects for it.

The numbers behind this chart: how much of each pattern is left against the delay
Can these beads escape? Predict first: the sample becomes a soft gel, in which each bead sits in a cage. Do the curves still fall to zero at long delays?

What this step gives: how much of each pattern is left over time. Curves that level off above zero mean beads that stay caged over the time measured; whether they would ever escape, a movie of finite length cannot tell.

6

From the curves to the moduli

Each curve of step 5 gives, at each delay, how far the beads have moved: the mean squared displacement, the average of the squared distances they travel, in square micrometres (its square root is a typical distance). Fine stripes give the small displacements of short delays, wide stripes the large ones of long delays, and where they overlap they agree. Free diffusion makes the displacement grow in proportion to the delay (a slope of 1 on these axes); beads held in cages make it level off (a slope of 0).

A rule that goes back to Einstein turns the displacement into the moduli: the stiffer the material, the less the beads move, and the faster it relaxes, the sooner they escape. A delay Δt stands for an angular frequency ω of about 1/Δt, in rad/s (the frequency in hertz is ω/2π).

The generalised Stokes-Einstein relation turns the displacement into the moduli: the stiffer the material, the less the beads move, and the faster it relaxes, the sooner they escape. A delay Δt stands for an angular frequency ω of about 1/Δt, in rad/s (the frequency in hertz is ω/2π).

How far the beads get
    The numbers behind this chart: mean squared displacement against delay
    The moduli: elastic (G') and viscous (G'')
      The numbers behind this chart: storage and loss moduli against frequency
      Signal A(q) and camera noise B(q). A falls at high q because the optics blur fine patterns. As the signal becomes small next to the camera noise, more averaging is needed: a pattern is usable as long as its amplitude and its changes can be estimated reliably, and the checks of this step decide which are kept. A signal below the noise is not unusable as such: on the proteins page it is far below it and still gives the diffusion coefficient.
      The numbers behind this chart: signal and noise amplitudes
      Predict first: the beads are twice as large. Do the moduli change?
      What the analysis is told, and what it finds

      Told (inputs): the bead radius and the temperature; the pixel size and the times of the frames; the read noise and the gain of the camera, for B; the optics of the microscope, for the depth-of-field correction.

      Found from the movie: how much of each pattern is left over time and the mean squared displacement of the beads. The moduli follow from it with the bead radius and the temperature it was told.

      In this simulation the analysis uses the same model of the optics that made the movie, so agreement here shows that the analysis recovers what was simulated under those assumptions; with a real microscope the optics are another input that can be wrong.

      What this step gives: the mean squared displacement of the beads, measured. The moduli are an interpretation: they come from the generalised Stokes-Einstein relation, with the bead size and the temperature the analysis is told.

      A question to think about: You double the bead size and the mean squared displacement halves. Which quantity should come out the same, and why?

      The moduli G' and G''. They belong to the material, and the generalised Stokes-Einstein relation multiplies the displacement by the bead radius, which undoes the change. If they did not come out the same, the beads would be probing something else than the bulk material: a layer depleted of polymer around them, or a mesh as large as they are.

      The math: from f to the moduli

      Notation. ⟨Δr2⟩, the mean squared displacement, measured in the image plane (two directions); for motion in three dimensions it is 1.5 times larger, ⟨Δr2⟩3D. J(t), the creep compliance: how much the material deforms under a steady stress, per unit of stress (1/Pa); Ĵ(ω) its one-sided Fourier transform. a, the bead radius. ω, the angular frequency in rad/s; the ordinary frequency is ω / 2π, in Hz. In Mason's formulas Γ is the gamma function (not a rate, as on the other pages) and α the local slope of ⟨Δr2⟩ on logarithmic axes.

      ⟨Δr2(Δt)⟩ = −(4 / q2) ln f(q, Δt),    J(t) = πa ⟨Δr2(t)⟩3D / kBT,    ⟨Δr2⟩3D = 1.5 ⟨Δr2⟩

      Amplitude and noise. A(q) = 2⟨|F(q)|2⟩ − B, from the mean power of each pattern, which holds the whole amplitude even when part of the pattern never changes during the movie; B = 2 (excess-noise factor × mean count + read noise2), the camera noise, the same at every q. The mean power counts everything in the image that stays put during the movie: in a gel the frozen positions of the beads, which belong in A, but also dust and uneven light, which do not. The difference images of step 3 are blind to those; the amplitude is not. The simulated movies have neither. In a real experiment, subtract the power of a movie taken the same way without beads, or, for a material that flows, use twice the variance over time of each pattern, which leaves out what never changes. Displacement. At each q and delay, ⟨Δr2⟩ is the value that gives the measured f, with the depth of field: beads moving up or down change their image too, which adds a factor Cq(⟨Δz2⟩) through the optics of step 1, with ⟨Δz2⟩ = ⟨Δr2⟩/2. Only points where f is clearly below 1 (by three times its noise, and by at least 1 %) and above 0.15 are used, from the fourth q bin up; the q are combined with weights from the noise of ln ⟨Δr2⟩, at least three per delay. The noise of f and the uncertainty of the result come from a jackknife over ten parts of the movie.

      Moduli. G*(ω) = 1 / [iω Ĵ(ω)]. The measured J(t) is fitted with springs and dashpots side by side (Kelvin-Voigt elements, retardation times four per decade) and a free flow t/η, all with positive weights; the moduli of that sum follow exactly. A direct transform of the measured points (Evans et al. 2009) rang with their noise. For comparison (Researcher level) Mason's local power-law formulas, |G*(ω)| = kBT / [πa⟨Δr2(1/ω)⟩3D Γ(1 + α)], G' = |G*| cos(πα/2), G'' = |G*| sin(πα/2), with α the local slope of ⟨Δr2⟩ on logarithmic axes.

      Settings used for this run
      
                

      In a real experiment

      What matters

      Each card sets the bench to a typical case and shows where to look. Use "Back to the standard sample" to start again.

      What this page adds to the published methods

      DDM microrheology was introduced by Edera et al. (2017), and Bayles, Squires and Helgeson (2017) did the same independently: f(q, Δt) turned into a mean squared displacement at each q, then into the moduli through the generalised Stokes-Einstein relation. Edera et al. chose A and B by making the displacements from all q agree; in a simulation the camera is known, so this page gets B from the photon count and A from the mean power instead. The steps below are not in the papers we cite: we added them while testing the page against its own simulations, and some may exist elsewhere. At the "Addict" level each can be switched off, and the result table shows a plain method on the same movie (A from the variance, B from the first delays, no depth of field, q where the displacement is below 1/q², Mason's formulas). This baseline is one implementation of the published steps, run on movies from this page's own simulation: it shows what each added step changes here, not how the published method performs in general.

      Glossary

      Numerical aperture (NA)
      How wide a cone of light the objective collects, or the condenser sends: n sin(half-angle). A larger NA resolves finer details and keeps a thinner layer in focus.
      Wave vector q
      Describes a stripe pattern of the image: q = 2π divided by the stripe spacing, in µm-1. Not the wave number of the light, k = 2πn/λ.
      Structure function d(q, Δt)
      The average strength of pattern q in the difference of two frames taken Δt apart.
      Amplitude A and noise B
      A(q): how much pattern q changes once the sample has fully renewed it. B: what the camera noise adds, at every delay.
      Intermediate scattering function f(q, Δt)
      How much of pattern q is still there after a delay Δt: 1, all of it; 0, gone.
      Hydrodynamic radius
      The radius of a sphere that would diffuse as the particle or protein does (Stokes-Einstein relation).
      Self and collective diffusion
      Self: how one particle wanders among the others. Collective: how ripples in the number of particles even out.
      Mean squared displacement
      The average of the squared distance the particles travel in a given time.
      Storage and loss moduli G', G''
      How elastic and how viscous a material is, at an angular frequency ω (rad/s; the frequency in hertz is ω/2π).
      Molar mass M
      The mass of one mole of a protein, in g/mol; a protein of 148 kDa has M = 148 000 g/mol.
      Second virial coefficient
      How two molecules interact, on balance: B2 per pair of molecules (a volume), A2 = B2NA/M2 per gram (mol mL/g2), with NA Avogadro's number. Positive: they keep apart; negative: they attract.
      Diffusion interaction parameter kD
      How fast collective diffusion changes with the concentration: D = D0(1 + kDc). It holds the interactions and the drag of neighbours through the liquid.

      About this tool

      This page is a simple tool, generated with Claude Opus 5.5, that simulates a realistic microscopy experiment in which DDM is used to measure the moduli of a soft material from the motion of tracer beads. The microscope, light sources, cameras, spinning disk and point scanner are modelled mostly on the instruments of our SoMeX lab. The beads are spheres that do not interact with each other, in a material that is the same everywhere and whose moduli are set exactly; the concentrated micelles come from the measurements cited on the page, the other materials have values chosen for the page. The aim is not to produce research-quality data, but to give anyone thinking of using DDM an idea of what microrheology can measure, and of what limits it.

      If you find something that looks wrong or does not work, please let us know through the contact page.

      To cite this page: R. Cerbino, DDM, hands on: liquid or solid, rcerbino.github.io/ddm/rheology/ (2026), with the date you used it.

      Go further