fullseye

fly_dsi — FLYVISION tuning op

使い方

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

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

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

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

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.