Differential dynamic microscopy

Is this tissue jammed, flowing or flocking?

Epithelial cells packed into a sheet can be stuck, each caged by its neighbours, like a solid; they can flow past each other, like a liquid; or they can all set off in the same direction, as a flock. A time-lapse movie of their stained nuclei tells which, without following any cell. Here you can check what differential dynamic microscopy (DDM) finds on simulated monolayers (Giavazzi et al. 2017, 2018).

Try this first: let the cells steer towards where they are pushed. Does the sheet become more fluid or more solid? Predict, then watch the page check it.

How deep do you want to go?
Simulating the movie...
Live simulated fluorescence time-lapse

Hands on

The bench

Choose how the cells move, then how they are filmed (controls on the left, or just below on a phone). The bench simulates a day of a monolayer and takes about ten seconds; the motility sweep of step 9 takes about two minutes. "Copy a link to this setup" gives an address that opens the bench with the same settings.

1

The monolayer and the microscope

The cells cover the dish without gaps, a single layer. Each crawls in the direction it faces, and pushes on its neighbours, which push back. The movie does not show the cells but their nuclei, stained with a fluorescent protein: one bright spot per cell, filmed through a 10x objective every few minutes for many hours.

The picture shows the cells as the simulation has them at the end of the movie, each coloured by the direction it moves in, with an arrow for its speed. The movie itself holds only the nuclei.

What this step gives: the size of the field and how many cells it holds, and the spacing of their nuclei, which sets the patterns the movie is richest in.

The math: self-propelled soft discs

Each cell i is a disc of diameter σi (15 % spread, so that the sheet does not crystallise) at position ri, with a polarity ni = (cos θi, sin θi), the direction it crawls in:

dri/dt = v0 ni + μk Σj (σij − rij) r̂ji,    dθi/dt = −J sin(θi − φi) + √(2Dr) ξi

with the sum over overlapping neighbours, φi the direction of the cell's actual velocity and ξ white noise. J turns each cell towards where it is being carried: the alignment of polarity to velocity that Giavazzi et al. (2018) added to a model of confluent tissues to explain flocking (here soft discs, as in Szabó et al. 2006 and Henkes et al. 2011, instead of their Voronoi cells). μk = 20 per hour sets how fast an overlap relaxes, Dr how fast a cell forgets its direction on its own. The nuclei are Gaussian spots of rms radius 2.5 µm, with shot noise and camera read noise; cells never divide.

2

Record a time-lapse

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

What this step gives: a stack of frames a few minutes apart over many hours: cells move micrometres per hour, so the movie has to be long.

In fastDDM
import fastddm as fd
img_seq = fd.read_images(file_names)      # one frame every few minutes
3

Subtract two frames

Subtract a frame from one taken a little later. Nuclei that stayed put cancel out; one that moved leaves a dark spot where it was and a bright one where it went.

What this step gives: for every pair of frames a delay apart, an image of what changed.

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 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 15 µm apart, the size of a cell, have q of about 0.4.

The bright ring is the spacing of neighbouring nuclei: the sheet is crowded, so that pattern is the strongest. When the whole sheet drifts, the second map turns blue in places: a pattern that has moved by half a stripe comes back with the opposite sign.

What this step gives: for each stripe spacing and direction, and each delay, how much the movie has changed.

The math: structure function of a moving sheet
d(q, Δt) = A(q) [1 − f(q, Δt)] + B,    flab(q, Δt) ≈ f(q, Δt) cos(q·VΔt)

For a sheet that drifts as a whole with velocity V, the patterns travel with it and swing; f is what is left in the frame of the sheet. The mean power of pattern q in one frame, without the camera noise, is P(q) = ⟨|F|2⟩ − B/2 = N |K(q)|2 S(q), with K the Fourier transform of the image of one nucleus, S(q) the structure factor of the nuclei, peaked at the spacing of neighbours, and the same normalisation of the transform throughout. Two frames that share nothing give twice that power in their difference, so A(q) = 2P(q) = 2N |K(q)|2 S(q), which is how step 5 computes it. Map axes: qx to the right, qy up.

5

Watch each pattern change

One thing first. The whole sheet may travel. The page measures that motion from how the widest patterns shift between frames, moves every frame back by it, and analyses what is left: the curves here are in the frame of the sheet. Step 7 shows how, and what changes without it.

For each stripe spacing, follow how much of the pattern is left as the delay grows. In a jammed sheet the curves sink a little and stall: each cell rattles in the cage of its neighbours. In a fluid one they fall to zero within an hour.

Dots: f(q, Δt) = 1 − (d − B) / A in the frame of the sheet (step 7); hollow circles: as recorded, in the frame of the microscope. A = 2⟨|F|2⟩ − B, from the mean power of each mode, so that patterns that never change keep their whole amplitude.

How much of each pattern is left, in the frame of the sheet
The numbers behind this chart: how much of each pattern is left against the delay
Predict first: the sheet on the bench is jammed. Now each cell also turns, little by little, towards the direction it is being pushed in. What happens?

What this step gives: how fast each pattern fades, and whether it stalls (a solid) or fades away (a liquid).

6

How fast each pattern fades: the rate against q

An extra step: the rate of each pattern against its size, the classical result of DDM, with a choice of model for the fit.

Fit each curve of step 5 with a model and read its rate: how many times per hour the pattern fades by a factor e. Finer patterns fade faster, because a smaller move is enough to blur them. How fast the rate grows with q hints at how the cells move: if halving the width of the pattern doubles the rate (rate proportional to q), the cells go straight over that distance; if it multiplies it by four (q2), they wander at random, or rattle in cages. The slope alone cannot tell those two apart: read it with the shape of the curves (do they stop at a plateau?) and with how long the movie lasts. Whether the sheet is solid or fluid is decided in step 7, from how far the cells get over the whole movie.

The models, fitted to f(q, Δt) at each q with A and B as in step 5: exponential, f = e−ΓΔt (diffusion, Γ = Dq2); stretched or compressed exponential, f = e−(ΓΔt)β (β < 1: a spread of rates; β > 1: persistent, directed motion); persistent random walk, f = e−q2⟨Δr2⟩/4 with ⟨Δr2⟩ = 4D(Δt − tp(1 − e−Δt/tp)) (straight for a time tp, then at random); exponential to a plateau, f = c + (1 − c) e−ΓΔt (each cell rattles in a cage and the curve stops at c). Γ is the rate at which the model falls to 1/e (for the plateau model, the rate of the decaying part).

Rate of each pattern against q, in the frame of the sheet
The numbers behind this chart: rate of each pattern against the wave vector q
Shape of the fitted curve against q
What the analysis is told, and what it finds

Told (inputs): the model, and nothing else: the curves are those of step 5.

Found from the movie: at each q with signal well above the noise, the rate and the shape of the fitted curve; how the rate grows with q; and, for this movie, which of the four models describes the curves best.

The page also fits, with the same model, how single simulated cells move relative to the sheet (the self part of the intermediate scattering function, from their true positions). Above the peak of A, where each nucleus counts on its own, the two should agree; near and below it the patterns follow the crowd, not single cells.

What this step gives: the classical result of DDM, the rate against q; with the shape of the curves, whether the cells go straight, wander at random or stay caged over the distances the patterns probe and the times the movie covers.

A question to think about: In the fluid sheet the rate grows about as q, with a compressed exponential (β near 1.75). The cells crawl at 30 µm/h and keep their direction for about 2 hours. Why do the patterns not show diffusion?

The patterns used are 5 to 10 µm wide. A cell crosses them in well under an hour, long before it turns: over those distances it goes straight, so the rate is set by its speed (rate proportional to q) and the curves fall faster than an exponential (β > 1). Diffusion, with the rate proportional to q2, would show only for patterns much wider than the distance a cell travels before turning, here tens of micrometres, where the arrangement of the cells and the size of the field get in the way.

The math: fitting, the truth, and what was tried

Fitting. Least squares on f at all delays of the movie, with A and B fixed as in step 5. Each model is reduced to a scan of its shape parameter (β from 0.3 to 2, tp over the delays of the movie) and, for each shape, a one-dimensional search of the rate; the plateau c is solved for directly. Only patterns with A > 3B are fitted. A rate counts as measured when the fitted curve has fallen below 0.8 by the longest delay and was still above 0.2 at the shortest; otherwise the curve barely moved, or had already gone, and the point is drawn hollow. Slope. A straight line through log Γ against log q over the measured points from the start of the band of step 7. Truth. Fs(q, Δt) = ⟨J0(q|Δr|)⟩ over the simulated cells, with Δr relative to the centre of mass, fitted with the same model. Which model. For each movie the page ranks the four by the Bayesian information criterion, n ln(∑r2/n) + k ln n summed over q.

What we found trying them. On the four standard states (nuclei, with the motion of the sheet taken out): in the fluid sheet and the flocking liquid the compressed exponential (β 1.5 to 1.75) and the persistent random walk fit best, the rate grows as q1.0, and the rates agree with the simulated cells within about 10 % over the band; 2Γ/q, the rms speed if each cell went straight, gives 14 µm/h in the fluid sheet, as the simulated cells move relative to the sheet over one frame; in the jammed sheet and the flocking solid the plateau model fits best (the curves stop at c of about 0.2 to 0.4 within the movie), and the stretched exponential (β 0.9) comes next, with the rate growing as q1.9 to q2. The simple exponential is never the best, which is why the stretched or compressed one is the default. The parameters of the persistent random walk are effective ones: in the fluid sheet its persistence time came out near 0.2 h, where each simulated cell keeps its direction for about 2 h, because collisions with neighbours bend its path. A fifth model, two exponentials, fitted as well as the plateau model but its rates jumped from one q to the next, so we left it out.

In Python, with t the delays and f one curve:

import numpy as np
from scipy.optimize import curve_fit
kww = lambda t, G, b: np.exp(-(G * t) ** b)
(G, b), _ = curve_fit(kww, t, f, p0=(1 / np.median(t), 1), bounds=([0, 0.3], [np.inf, 2]))
7

How far the cells wander, and where the sheet goes

First the page finds out whether the whole sheet moves: the widest patterns shift together from one frame to the next, and how far gives the path of the sheet. Then it moves every frame back by that path, and reads from the patterns that remain how far each cell wanders relative to its neighbours. Cells that wander less than a fraction of their size over the whole movie are jammed; a sheet that moves together is a flock.

The sheet: from the phase of the widest patterns (|k| ≤ 4) between consecutive frames, −q·ΔR, fitted for ΔR (phase differential microscopy, Colin et al. 2014); V from a straight line through R(t). The cells: every frame moved back, F(q, t) eiq·R(t), the structure function again, and the mean squared displacement from f as a Gaussian, ⟨Δr2⟩ = −4 ln f / q2 (Giavazzi et al. 2018), over a band of q above the peak of A(q) where 0.1 < f < 0.95, combined by the mean of ln.

Mean squared displacement of the cells, relative to the sheet
The numbers behind this chart: mean squared displacement of the cells against the delay
Where the sheet went over the movie
Signal A(q) and camera noise B. The bright nuclei make a strong signal, peaked at the spacing of neighbours; it fades at fine patterns, smaller than a nucleus.
The numbers behind this chart: signal and noise amplitudes
What the analysis is told, and what it finds

Told (inputs): the pixel size, the time between frames, the camera noise (from the mean count and the read noise), and the typical size of a cell, to judge whether a displacement is small.

Found from the movie: the path and velocity of the sheet, the mean squared displacement of the cells relative to it, the order of the sheet and its state.

In this simulation every cell moves as the model says and the nuclei are simple spots, so agreement shows that the analysis recovers what was simulated; real monolayers also divide, change shape and form streams and swirls instead of one flock.

What this step gives: whether the sheet moves as a whole, how fast, and whether its cells rearrange: jammed, fluid, flocking solid or flocking liquid.

The math: order and state

Order. ψ2 = |V|2 Δt2 / ⟨Δr2⟩lab at the shortest delay where the lab-frame displacement is measured: the share of each cell's motion that the motion of the whole sheet explains, 1 for a sheet moving as one block and 0 without a common motion; it plays the part of the polar order parameter of the simulation (the mean of the unit vectors of the cells' velocities). State. A flock when ψ > 0.5 and |V| is above three times its uncertainty; solid when the displacement relative to the sheet stays below a tenth of a cell's area (about a third of its diameter) over the delays the movie holds, liquid otherwise. Reach. At the lowest q of the band, f = 0.1 means ⟨Δr2⟩ = 9.2 / q2, about 25 µm2 here: beyond, the page only says that the cells move more. What the page does not fix. Near the end of its reach the Gaussian inversion reads low in a flowing sheet, whose displacements have long tails: in a flocking liquid our tests read 10 µm2 where the cells had moved 34. Below about 5 µm2 it was within 20 % in every state. Nuclei, edges or both. "Images analysed" runs the same analysis on the cell edges drawn from the nuclei (step 8), or on both. In our tests the states and the velocity of the sheet came out the same from all three; the edges read the displacement higher at the shortest delays (in the jammed sheet 0.35 µm2 in half an hour against 0.18 simulated, 2.4 against 2.2 in three hours), because a corner of the network, set by three nuclei, moves more than each of them. Seen together, nuclei and edges cancel at the spacing of neighbours, where the edges are half a period from the nuclei, so the peak of A is looked for among patterns 0.6 to 2 cells wide.

In Python, with the azimuthal average aa of fastDDM and A, B as above:

import numpy as np
f = 1 - (aa.data - B[:, None]) / A[:, None]          # q x delays
ok = (f > 0.1) & (f < 0.95)
msd = np.where(ok, -4 * np.log(np.clip(f, 1e-9, 1)) / aa.k[:, None] ** 2, np.nan)
msd_t = np.exp(np.nanmean(np.log(msd[band]), axis=0))   # one curve, over the q band
8

The network of nuclei

An extra step: the nuclei found one by one, the network they make, and how many neighbours each cell keeps over time.

DDM never looks for single cells. Here the nuclei are bright and well apart, so the page can also find them one by one, follow each from frame to frame, and give each the part of the dish that is closer to it than to any other nucleus. These parts make the Voronoi network, a rough stand-in for the outlines of the cells. Two cells whose parts share a side are neighbours.

In a jammed sheet a cell keeps the same neighbours for the whole movie. In a fluid sheet cells squeeze past each other and swap neighbours within hours. Move the frame slider to watch the network change, or not.

Nuclei: local maxima of the frame, lightly smoothed, brighter than everything within a third of a cell spacing and than the background plus a quarter of the brightest pixels; the position to a fraction of a pixel from a parabola through the logarithm of three pixels, in x and in y. Tracks: a nucleus in one frame and one in the next are the same when each is the other's nearest, closer than half a spacing. Cells: each cut out by the perpendicular bisectors towards its neighbours, kept only when every nucleus that could cut it is inside the field. Neighbours share a side longer than a tenth of a spacing; one is kept after a delay while the two still share a side of any length.

Share of its neighbours a cell still has after a delay
The numbers behind this chart: share of neighbours kept against the delay
Shape index of the Voronoi cells: 3.72 for a regular hexagon, higher for elongated or ragged cells
The numbers behind this chart: distribution of the shape index of the cells
What the analysis is told, and what it finds

Told (inputs): the pixel size, the time between frames, and the typical size of a cell, which sets how far apart two nuclei must be and how far a nucleus may move between frames.

Found from the movie: the position of every nucleus in every frame, their tracks, the Voronoi cell of each, its number of sides and its shape, how many neighbours each cell keeps over time, and how far the nuclei move.

The page checks each of these against the true positions of the simulation. In a real monolayer nuclei divide, overlap and are not at the centre of their cell, and the true outlines need a stain of the membranes.

What this step gives: a second reading of the same movie, cell by cell: whether cells keep their neighbours, and how far each one moves, to set beside what DDM found without looking for any cell.

A question to think about: On this bench tracking the nuclei and DDM agree. When would you rather use DDM?

When single cells are hard to find: in phase-contrast or bright-field movies without a stain, with dim or crowded nuclei, or out of focus. When cells move more than about half their spacing between frames, a nucleus can no longer be told apart from its neighbours from one frame to the next, and the tracks break. And when the movie is large: DDM gives the average motion of thousands of cells without deciding where each one is. Tracking gives what DDM cannot: who is next to whom, and how that changes.

The math: Voronoi cells, shape index and neighbours

Voronoi cell. The cell of nucleus i is the set of points closer to ri than to any other nucleus: the polygon cut out by the perpendicular bisectors towards its neighbours. It is complete once the next nucleus is more than twice as far as its farthest corner; in the image it is kept only if that whole range lies inside the field. Shape index. p = P / √A, with P the perimeter and A the area: 3.72 for a regular hexagon, 3.81 for a regular pentagon, 4 for a square. In the vertex model and in the self-propelled Voronoi model of tissues, a target shape index near 3.81 is where the model sheet goes from solid to fluid (Bi et al. 2015, 2016), and Park et al. (2015) saw the cells of airway epithelium grow more elongated as the sheet unjammed. Neighbours kept. K(Δt) = Σ nkept / Σ n0 over cells followed in both frames and over 8 starting frames, counting only neighbours still followed.

What the page does not fix. In this model the cells are soft discs, with no shape of their own, so the shape index only follows how disordered the arrangement is: in our tests the mean p was 3.77 in the jammed sheet and the flocking solid, 3.80 in the flocking liquid and 3.83 in the fluid sheet. That it falls on either side of 3.81 is suggestive, not a test of the vertex model, and Voronoi cells of nuclei are only an approximation of real outlines.

In Python, with the nuclei of one frame in x, y (scipy):

import numpy as np
from scipy.spatial import Voronoi
vor = Voronoi(np.c_[x, y])
def shape_index(i):              # drop cells near the edge of the field
    reg = vor.regions[vor.point_region[i]]
    if not reg or -1 in reg: return np.nan
    P = vor.vertices[reg]
    area = 0.5 * abs(np.dot(P[:, 0], np.roll(P[:, 1], 1)) - np.dot(P[:, 1], np.roll(P[:, 0], 1)))
    perim = np.hypot(*(P - np.roll(P, 1, axis=0)).T).sum()
    return perim / np.sqrt(area)
pairs = {tuple(sorted(p)) for p in vor.ridge_points}   # neighbours
9

Waking up a jammed tissue: a motility sweep

Repeat the measurement as the cells crawl harder, with and without the alignment. Without it, slow cells stay jammed and fast ones flow, each in its own direction. With it, the sheet flocks: slow cells move as one rigid block, fast ones flow while they travel together. This is how Malinverno et al. (2017) found that a jammed epithelium can be woken up: the protein RAB5A made the cells crawl harder and the sheet flow and flock.

The sweep runs six crawling speeds v0 from 3 to 30 µm/h, without alignment and with J = 2 per hour, a new movie each, and plots the displacement relative to the sheet after 2 hours, the order ψ and the share of neighbours a cell keeps over 4 hours (step 8), with the values of the simulation.

What this step gives: where the sheet unjams, and how alignment turns a jammed or fluid sheet into a flock.

A question to think about: In a flocking solid every cell moves at about 7 µm/h, yet the page says the sheet is solid. In the frame of the microscope, would the cells look jammed?

No: in the frame of the microscope every nucleus travels tens of micrometres in a few hours, and the recorded patterns fade quickly, as in a fluid. Jammed or fluid is about how cells move relative to their neighbours, which is why the page first finds the motion of the whole sheet and moves the frames back by it. At the Addict level, switch "Motion relative to the sheet" off and see the flocking solid read as a liquid.

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; some also run the sweep of step 9. Use "Back to the standard sample" to start again.

What this page adds to the published methods

Giavazzi et al. (2018) measured the mean squared displacement of cells in confluent monolayers with DDM, from the intermediate scattering function as a Gaussian at the wave vectors where the structure factor of the nuclei is close to 1, in the frame of the microscope. The step below is not in the papers we cite: we added it while testing the page against its own simulations, and it may exist elsewhere. At the "Addict" level it can be switched off, and the result table shows a baseline: the published steps alone, as implemented here, on the same movie. 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 time-lapse of a confluent epithelial monolayer with stained nuclei and analyses it with DDM. The cells are self-propelled soft discs that align their direction to how they move, a minimal model of the jamming and flocking of tissues; the nuclei are simple bright spots. The aim is not to produce research-quality data, but to give anyone thinking of using DDM on cell monolayers an idea of what it 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: moving tissues, rcerbino.github.io/ddm/tissues/ (2026), with the date you used it.

Go further