tuning opsignal → tableimport fullseye as fs; fs.ledger.fly_dsi(responses, angles_deg) (実装を直接呼ぶなら import flyvision; flyvision.fly_dsi(responses, angles_deg)、台帳から引くなら opsflyvision.get("fly_dsi"))Direction-selectivity index and preferred direction from tuning responses.
A vector sum on the circle::
DSI = |sum_k r_k exp(i theta_k)| / (sum_k r_k + 1e-9)
preferred = angle(sum_k r_k exp(i theta_k))
where r_k >= 0 is the response to a stimulus moving at angle
theta_k = angles_deg[k] (negatives clipped to 0).
responses: a 1-D array of responses, one per direction. angles_deg: the stimulus directions in degrees, same length.
Returns a dict {"dsi": float, "pref_deg": float} with pref_deg in
[-180, 180].
Ground truth: a response at a single direction gives dsi == 1; an isotropic
response over directions evenly spanning the circle gives dsi == 0 (pinned
in the tests).
Raises ValueError: a non-1-D / empty / non-finite responses or
angles_deg, mismatched lengths, an array over :data:MAX_SIGNAL_POINTS, and
an all-zero responses (no direction tuning to report).
py -3.11 examples/poc_fly_vision.pytable を入力に取れる)fly_hex_resample · fly_hs_readout
tuning)—
Provenance: flyvision.py — FLYVISION operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.