fly_flow_from_directions — FLYVISION direction op

• Data kinds: matrix × table → matrix

• Call: import fullseye as fs; fs.ledger.fly_flow_from_directions(responses, lattice) (to call the implementation directly, import flyvision; flyvision.fly_flow_from_directions(responses, lattice); from the registry, opsflyvision.get("fly_flow_from_directions"))

Usage

Six directional responses per ommatidium in, one local flow vector out.

The lobula plate does not keep six numbers per point of the visual field; it

keeps the direction and strength of the motion there, split over four layers

of opposite preference. This op is that reduction, done as the vector sum on

the tangent plane that makes opposite hexagonal directions cancel exactly::

f_i = (2/6) * sum_k R[k, i] * (cos t_ik, sin t_ik)

where `t_ik` is the angle of the step to ommatidium *i*'s neighbour in

direction *k*, measured in the local tangent plane with azimuth scaled by

`cos(elevation)` so that it is an angle on the sphere rather than a

difference of coordinates. The `2/6` normalises the sum so that a

cosine-tuned set of responses of amplitude `A` returns a vector of length

`A — with six directions the raw sum is 3A`.

responses: `(6, n), the return of :func:fly_t4t5_field`.

lattice: the :func:fly_hex_lattice it was measured on (a merged eye is

refused — neighbours are local, the fit downstream is not).

Returns `(n, 2)` float64: for each ommatidium the flow component along the

local azimuth (left positive) and along the local elevation (up positive), in

the response's own units. This is the `(n, 2)` field

:func:fly_egomotion_from_flow and :func:fly_matched_filter speak.

Ommatidia at the rim, which do not have all six neighbours, return exactly

zero: a partial sum over the circle does not cancel, so keeping it would draw

a ring of inward flow around the eye and the fit downstream would read that

ring as a rotation.

Ground truth: for responses `R[k] = A cos(theta_k - theta_0)` the returned

vector has length `A and angle theta_0` exactly (regular geometry, where

the six steps are 60 degrees apart); opposite directions cancel, so a

symmetric flicker response of any size returns exactly zero.

Raises `ValueError: *responses* that is not (6, n)`, a column count

that is not the lattice's ommatidium count, non-finite entries, and any

malformed *lattice*.

Detailed usage guide

• fly_vision family guide

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_fly_optomotor_steering — py -3.11 examples/poc_fly_optomotor_steering.py

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

fly_lamina_filter · fly_onoff_split · fly_t4t5_field · fly_egomotion_from_flow · fly_hs_readout

Same category (direction)

fly_t4t5_field


*Provenance: flyvision.py — FLYVISION 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.