stagnation_from_centerline — DRIVE swarmflow op

• Data kinds: table → table

• Call: import fullseye as fs; fs.ledger.stagnation_from_centerline(field, speed=None, d_range=(0.04, 0.6), min_points: 'int' = 4, n_iter: 'int' = 80) -> 'dict' (to call the implementation directly, import swarmflow; swarmflow.stagnation_from_centerline(field, speed=None, d_range=(0.04, 0.6), min_points: 'int' = 4, n_iter: 'int' = 80) -> 'dict'; from the registry, opsdrive.get("stagnation_from_centerline"))

Usage

Linearizes the centerline deficit to read the upstream impact point (stagnation point), the obstacle center and its radius (implementation 1, upstream points only).

> The detailed description below is the original text — the summary and the headings are translated.

1. 欠損(3 × 3 の平均)が d_range の上限を超える格子のうち、最も上流のものを「衝突点のそば」とする。

2. その少し上流の列(4 列)で、欠損が最大の行を放物線で副格子に求め、平均を中心線 y_c とする(上流の欠損 R²(Δx² − Δy²)/(Δx² + Δy²)² は Δy = 0 で最大)。

3. y_c の高さで欠損を行の間の 1 次補間で取り、衝突点のそばより上流で d_range の中にある格子で 1/√d = (x_c − x)/R を重みつき最小二乗で引く(速さの雑音 σ_d は 1/√d では σ_d/(2d^{3/2}) に増えるので、重み d^{3/2} —— 欠損の小さい遠くの点は雑音で暴れる): R = −1/傾き、x_c = 切片 × R。よどみ点 = (x_c − R, y_c)。

4. speed を与えないときは、上流の端の u を閉形式で割り戻して U を推定し直し、3 を繰り返す(U の変化が 1e-9 未満になるか n_iter 回まで。収束は 1 次で、R = 0.6・端までの距離 3 の場で約 30 回)。上流の端も 1/r² で欠けているので(R = 0.6、距離 3 で 4 %)、端の中央値をそのまま U にすると直線が曲がる。

Returns:

dict: stagnation (x, y)、center (x, y)、radius、n_used、rms_residual(1/√d の当てはめの残差)、

speed、ok(点が足りて傾きが負なら True)。

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_swarm_obstacle_from_flow — py -3.11 examples/poc_swarm_obstacle_from_flow.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 (swarmflow)

sph_kernel · sph_density_pressure · swarm_simulate · swarm_render_overhead · swarm_field_from_tracks · swarm_field_from_piv · potential_flow_cylinder · velocity_deficit_map


*Provenance: swarmflow.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.