field op• Data kinds: flow2d → image2d
• Call: import fullseye as fs; fs.ledger.piv_divergence(flow, spacing=1.0) (to call the implementation directly, import pivops; pivops.piv_divergence(flow, spacing=1.0); from the registry, opspiv.get("piv_divergence"))
Divergence d(dy)/dy + d(dx)/dx. 0 if the flow is incompressible — usable as an independent cross-check.
Formula: gradient(flow[0], spacing, axis=0) + gradient(flow[1], spacing, axis=1) (numpy.gradient: central differences in the interior, one-sided differences at the grid edges). flow[0] is the displacement dy in the row direction, flow[1] the displacement dx in the column direction, x = column, y = row. Even with rows pointing down, the sign of the divergence does not depend on the axis orientation (unlike the vorticity piv_vorticity, it does not flip). Positive = source, negative = sink.
• flow: (2, h, w), components (dy, dx) [px/frame] (return value of piv_cross_correlate / piv_multipass). Unless h, w >= 2 it cannot be differentiated, hence ValueError (when the window is so large that there is only 1 vector). Finiteness is not checked ―― a NaN from piv_replace_outliers(method="nan") spreads to the 2 adjacent cells.
• spacing: vector spacing [px], a positive finite value. Pass info["step"] (left at the default 1.0, the unit becomes "1/vector spacing").
• Return value: (h, w) float64, unit 1/frame (when spacing is in px). With a field converted to m/s by piv_to_velocity and spacing in m, it is 1/s.
In 2-D PIV an out-of-plane velocity component makes it non-zero, so "incompressible, yet the divergence is large" is an indicator of out-of-plane flow or outliers (piv_outlier_mask). piv_velocity_gradient returns all 4 components.
• piv_displacement family guide
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• piv_flow_from_particles — py -3.11 examples/piv_flow_from_particles.py
• poc_what_a_picture_cannot_check — py -3.11 examples/poc_what_a_picture_cannot_check.py
image2d as input)piv_cross_correlate · piv_multipass · piv_deform_pass · strain_from_displacement · correlation_quality · speckle_quality
field)piv_vorticity · piv_flow_magnitude · piv_to_velocity · piv_velocity_gradient · piv_q_criterion · piv_swirling_strength · piv_strain_rate
*Provenance: pivops.py — PIV operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.