Deriving spatial parameters / modifying data

Beyond raw velocity vectors, PIVlab can compute and display a range of derived flow quantities, smooth your data, and subtract a background flow — all without re-running the PIV analysis.

Open via Plot → Spatial: Derive parameters / modify data (Ctrl+Shift+D).

PIVlab Derive Parameters panel
The Derive Parameters panel.

Choosing what to display

The Display Parameter dropdown selects what's shown as a colour-coded overlay on the vector plot:

ParameterNotes
VectorsRaw velocity vectors (the default).
VorticityLocal rotation of the flow.
MagnitudeSpeed, regardless of direction.
u component / v componentHorizontal / vertical velocity only.
DivergenceNet outflow/inflow at each point.
Q criterionA common vortex-identification measure.
Shear rateMagnitude of the rate-of-strain tensor — the complete measure.
Simple strain rateOne combination of two derivatives (∂u/∂x − ∂v/∂y), not the full strain rate.
Line integral convolution (LIC)A texture-based visualization of flow direction. Reveals streak-like structure; see the resolution slider below.
Vector directionAngle in degrees.
Correlation coefficientQuality of the underlying correlation.
UncertaintyOnly available if you enabled uncertainty estimation in PIV settings.

Units shown in the dropdown adapt automatically: pixels/frame if uncalibrated, meters/frame if calibrated with a zero time step (displacements only), or meters/second once fully calibrated.

Velocity magnitude shown as a colour overlay on the vector field, with a colour bar labelled Magnitude in m/s and the masked object in red
Velocity Magnitude displayed as a colour overlay with the vectors on top and a labelled colour bar. The colour map, opacity and colour bar are all configurable in Modify plot appearance.

When Line integral convolution (LIC) is selected, a LIC resolution slider appears — higher values look more detailed but take longer to compute.

Stereo-PIV The list gains a w component and a few items change meaning — see w in the rest of PIVlab.

How each parameter is computed

Exact equation for every parameter reference

Throughout, u and v are the velocity components along x and y, and u0 / v0 are the constant offsets you can enter under Subtract flow. The notation ∂u/∂y means “the rate at which u changes as you move in the y direction”.

Derivatives are taken on the calibrated grid Before any derivative is computed, the measurement grid is converted from pixels to metres and the velocities to m/s (using your spatial calibration). That is why the gradient-based quantities below come out per second rather than per frame. Without a calibration the same equations apply, but in px and frames — which is exactly what the units in the dropdown tell you.

Velocity-based quantities

These need no derivatives — they are computed point by point from the vectors themselves, and they are the only ones affected by Subtract flow.

Magnitude — the speed, i.e. the length of the velocity vector:

|V| = √( (u − u0)² + (v − v0)² )

u component and v component are simply u − u0 and v − v0.

Vector direction — the angle of each vector, between −180° and +180°:

θ = atan2(v − v0, u − u0)

With PIVlab's default axes (x right, y up) the angles line up like this:

AngleDirection on screen
0°→ to the right
+90°↑ upwards
+180° / −180°← to the left
−90°↓ downwards

Angles are measured from the x axis towards the y axis set in the calibration.

PIVlab 3.14 With the default axes (y increases downward), +90° points down and −90° points up.

Gradient-based quantities

These are all built from the four spatial derivatives of the velocity field (∂u/∂x, ∂u/∂y, ∂v/∂x, ∂v/∂y).

Subtract flow does not change any of these Subtracting a constant velocity shifts every vector by the same amount, and a constant has no gradient — so vorticity, divergence, shear rate, strain rate and the Q criterion are deliberately computed from the unshifted field. Only the velocity-based quantities above respond to it.

Vorticity — the local rate of rotation of the fluid:

ω = ∂v/∂x − ∂u/∂y

Vorticity is the z component of the rotation, in the coordinate system set in the calibration (z = x × y). With the default axes (x right, y up), positive vorticity means counter-clockwise rotation on screen.

PIVlab 3.14 Positive vorticity is counter-clockwise rotation on screen with the default axes. If only one axis direction is changed in the calibration (x to the left or y to the top), the sign of the vorticity is wrong.

Divergence — the net rate at which fluid flows out of each point:

∇·V = ∂u/∂x + ∂v/∂y

For an incompressible flow measured in-plane this should be near zero, so a divergence map doubles as a rough sanity check on your data (or a sign of out-of-plane motion).

Shear rate — the magnitude of the rate-of-strain tensor. Writing its three independent components as

Dxx = ∂u/∂x
Dyy = ∂v/∂y
Dxy = ½ ( ∂u/∂y + ∂v/∂x )

the reported value is

‖D‖ = √( 2 ( Dxx² + Dyy² + 2 Dxy² ) )
This definition changed in PIVlab 3.10 Before 3.10, Shear rate returned ∂v/∂x + ∂u/∂y, so results from an older version are not comparable.

Simple strain rate — the difference between the two normal strain rates:

∂u/∂x − ∂v/∂y

Q criterion — a standard vortex-identification measure that compares rotation against strain. It is defined from the rotation tensor Ω and the strain-rate tensor S as ½(‖Ω‖² − ‖S‖²), where ‖·‖² means “the sum of the squares of all components”. Written out for a 2D field:

Q = ½ [ ½ (∂v/∂x − ∂u/∂y)² − (∂u/∂x)² − (∂v/∂y)² − 2 ( ½ (∂u/∂y + ∂v/∂x) )² ]

Positive Q marks regions where rotation dominates over strain — the usual criterion for identifying a vortex core.

Quantities carried over from the analysis

The last three come from the PIV analysis itself and are only displayed here.

Correlation coefficient — for each interrogation window, the Pearson correlation between the two image patches:

R = Σ(a·b) ⁄ √( Σa² · Σb² )

where a and b are the two interrogation windows with their mean brightness subtracted.

Crucially, this is evaluated on the final pass, after the windows have been deformed by the displacement measured up to that point. So it does not tell you how similar the two raw images were — it tells you how well the two windows match once they have been shifted and deformed by the vector PIVlab found. A value near 1 means the measured displacement really does explain the particle pattern; a low value flags a suspect vector. Masked windows are reported as 0. You can filter on exactly this quantity in image-based validation.

Uncertainty — an estimate of the error on each vector, in the same units as the velocity. PIVlab uses the particle-image disparity method: after both images are fully deformed by the measured displacement, any residual mismatch between individual particle pairs is measured, and the RMS spread of those mismatches within each interrogation window becomes the uncertainty (the x and y parts are combined as √(ex² + ey²)). The implementation follows:

Sciacchitano A, Wieneke B and Scarano F (2013), PIV uncertainty quantification by image matching, Meas. Sci. Technol. 24 045302, doi:10.1088/0957-0233/24/4/045302 — adapted from the MATLAB package by Dr. A. Sciacchitano (TU Delft).

A high uncertainty can mean two very different things Either the vector really is unreliable — too few particles, noisy images, or particles moving out of the light sheet — or the vector is correct but the flow varies strongly within the interrogation window, as happens at shear layers, sharp gradients and vortex cores. In the second case it is a spatial-resolution warning rather than a measurement error, telling you a smaller interrogation area would resolve more.

This map only exists if Estimate uncertainty (slow) was enabled in PIV settings before the analysis ran.

Line integral convolution (LIC) smears a random noise image along the local flow direction, which makes streak-like patterns emerge that follow the vector field — a texture, not a measured quantity, so it carries no units and is always drawn with a gray colormap. The technique was introduced by Cabral & Leedom (Imaging vector fields using line integral convolution, SIGGRAPH '93); PIVlab's implementation comes from the Matlab VFV Toolbox 1.0, by courtesy of Nima Bigdely Shamlo, Computational Science Research Center, San Diego State University.

Data smoothing

ModeEffect
NoneNo smoothing (default).
2DSpatial smoothing within each frame. Controlled by Smoothing parameter (default 0.2; larger = smoother, typical range 0.1–1).
time (moving average)A moving average across neighbouring frames. Temporal window (± frames) sets how many frames on each side to include, combined with more weight given to closer frames.
2D + timeBoth, spatial smoothing first, then temporal.
Smoothing happens before the derivatives Whatever you select here is applied to the velocity field first, and the derived parameters are then computed from the smoothed result. This matters because differentiating amplifies noise: a vorticity or Q-criterion map from an unsmoothed field is often far speckier than the underlying flow really is. PIVlab likewise uses your validated vectors when validation has been run, and can fill in rejected vectors first if interpolate missing data is enabled.

Subtracting a background flow

To reveal flow structure relative to a moving reference frame (e.g. removing a convection velocity), subtract a constant velocity from every vector:

A separate, temporary highpass is also available Highpass vector field (with a Strength slider) removes a non-uniform background flow for display purposes — unlike the subtract-flow fields above, this modified data is not saved, only shown.

Colormap and display

ControlEffect
autoscaleStretches the colour map to each frame's own min/max. Turn this off when rendering a video, so the color scale stays consistent across frames.
min / maxManual colour-map bounds, editable once autoscale is off.
Extrapolate borderFills the border region using spring inpainting instead of the mean value — slower, but smoother-looking.

Applying

Click Apply to current frame to preview on the current frame, or Apply to all frames to compute the selected parameter and settings across the whole session.

Combining data across frames instead? See Deriving temporal parameters — mean, sum, standard deviation and turbulent kinetic energy across a whole time-resolved sequence.