fullseye

fly_hex_lattice — FLYVISION lattice op

使い方

Hexagonal ommatidial lattice: viewing directions of a compound eye.

A hexagon of n = 3*radius*(radius+1)+1 ommatidia on axial coordinates (u, v) with -radius <= u <= radius and max(-radius, -radius-u) <= v <= min(radius, radius-u) (u outer, v inner), each given an azimuth, an elevation and a unit viewing direction in body coordinates (x forward, y left, z up; az = atan2(y, x) left positive, el = asin(z)).

geometry="regular": az = az0 + dphi*(v + u/2), el = el0 + dphi*(sqrt(3)/2)*u — an isotropic hexagon. geometry="boxeye": the pixel-grid distortion of the connectome-derived models, pixel (y, x) = (13*(u + v/2), 13*v) with 13 px = dphi, so az = az0 - v*dphi and el = el0 - (u + v/2)*dphi; the diagonal neighbour is 1.118x the axial spacing.

radius: the hexagon radius in ommatidia. dphi_deg: the inter-ommatidial angle in degrees. az0_deg / el0_deg: the direction of the lattice centre (the optical axis). geometry: one of :data:GEOMETRIES.

Returns a dict {"uv": (n,2) int, "az_rad": (n,), "el_rad": (n,), "dirs": (n,3) unit vectors, "dphi_rad": float, "geometry": str}.

Ground truth: n == 3*radius*(radius+1)+1 exactly, every dirs row is a unit vector, and for "boxeye" the ratio of the diagonal to the axial nearest-neighbour angular spacing is 1.118 (both pinned in the tests).

Raises ValueError: a radius outside [1, MAX_LATTICE_RADIUS], a non-positive dphi_deg, a non-real / non-finite / string / bool angle, and an unknown geometry.

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(table を入力に取れる)

fly_hex_resample · fly_hs_readout

同カテゴリ(lattice)


Provenance: flyvision.py — FLYVISION operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.