stream_flux_read — DRIVE scoop op

• Data kinds: any × scalar × scalar → table

• Call: import fullseye as fs; fs.ledger.stream_flux_read(frames, dt: 'float', radius_px: 'float', *, band_rows=None, band_px: 'int' = 9, window: 'int' = 32, particle_mass: 'float | None' = None, c_max: 'float' = 0.95, min_valid: 'float' = 0.3, min_crossings: 'float' = 30.0) -> 'dict' (to call the implementation directly, import scoop; scoop.stream_flux_read(frames, dt: 'float', radius_px: 'float', *, band_rows=None, band_px: 'int' = 9, window: 'int' = 32, particle_mass: 'float | None' = None, c_max: 'float' = 0.95, min_valid: 'float' = 0.3, min_crossings: 'float' = 30.0) -> 'dict'; from the registry, opsdrive.get("stream_flux_read"))

Usage

Reads the flow rate [particles/s] (and the mass flow rate) from the frame sequence of the stream — the speed by PIV (median over all frame pairs of pivops.piv_cross_correlate), the particle line density λ by inverting the Boolean model on the time-averaged coverage (stream_areal_density) and integrating across the stream, and the flow rate λ v.

band_rows = centre rows of the bands to measure (None = all row centres of the PIV windows). Each band is the mean of band_px rows. Speed is the component along the flow direction (increasing row), linearly interpolated between PIV window rows, and columns are averaged with coverage weights.

Returns: rows, v_px (px/frame), v (px/s), lam (grains/px), flux (grains/s), flux_naive (naive c/(πr²)), flux_mean, flux_spread ((max − min)/mean across bands = a continuity check of the flux), mass_flux (when particle_mass is given), valid_fraction (fraction of finite PIV windows), c_max_seen, n_crossed_est (estimated number of grains crossing each band during the recording, flux·T), rel_err_poisson (1/√n, the counting fluctuation of grains), reliable (n ≥ min_crossings in all bands). With few grains, the flux is just counting fluctuation (if 2 grains cross a band, ±70 %) —— reported via reliable=False. Raises ValueError: fewer than 2 frames / shapes do not match / finite PIV windows fewer than min_valid (too few grains to read the speed —— where it breaks) / band outside the image / saturated.

References (sample data, literature)

• 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.

Runnable examples (verified samples that actually call this op)

• poc_powder_scoop_pour — py -3.11 examples/poc_powder_scoop_pour.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (scoop)

spoon_bowl_volume · scoop_synth_side · revolution_volume_side · two_view_volume · scoop_volume_read · scoop_count · scoop_image_limit · tilt_wedge_retained


*Provenance: scoop.py — DRIVE 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.