fly_hex_quantize — FLYVISION sample op

• 資料種類:signal → signal

• 呼叫: import fullseye as fs; fs.ledger.fly_hex_quantize(signal, bits=3, mode='log', contrast=0.2)(要直接呼叫實作,import flyvision; flyvision.fly_hex_quantize(signal, bits=3, mode='log', contrast=0.2);從台帳取用則 opsflyvision.get("fly_hex_quantize"))

用法

> 該運算子的說明尚無譯文,以下照原文給出。

個眼信号を眼と同じやり方で量子化する: 対数圧縮してから個眼あたり n ビット(`mode="onoff"` は ON / OFF の 2 チャネル)。

複眼は生まれつき量子化器で、片眼およそ 800 個眼(間隔 4.6°)、光受容器は強度を対数圧縮して平均に適応し、

ラミナの L1 / L2 が平均からの偏差を ON と OFF に分ける。この op はその予算を再現し、下流のモデル

(reservoir・網膜部位対応の検査)に「本当に何ビット要るか」を問えるようにする。

A compound eye is a quantizer by construction: ~800 ommatidia per eye at 4.6 deg spacing,

photoreceptors that log-compress intensity and adapt to the mean, and lamina cells (L1/L2)

that split the deviation into ON and OFF channels. This op reproduces that budget so a

downstream model (reservoir, retinotopy test) can be asked how many bits it really needs.

Parameters

----------

signal : (n,) float

Per-ommatidium intensities >= 0 (`fly_hex_resample` output).

bits : int

1..8 levels = 2**bits (`mode="onoff"` ignores it: the output is the signed pair below).

mode : str

`"log"`: log1p-compress relative to the mean, shift the darkest ommatidium to 0, then

uniform levels over the compressed range; `"linear": uniform levels over [0, max]; "onoff"`: deviation from the mean

relative to `contrast clipped to [-1, 1] and returned as 2 * n values [ON..., OFF...]`

(ON = positive part, OFF = negative part), each >= 0.

contrast : float

Michelson-style contrast that saturates the ON/OFF channels (`mode="onoff"` only).

Returns

-------

(n,) float in [0, 1] (levels / (2**bits - 1)); for `"onoff"` (2n,) in [0, 1].

Notes

-----

Non-finite or negative inputs are refused. A constant signal quantizes to all-zeros

(`"log" / "onoff"`) — there is no contrast to encode.

詳細使用指南

• fly_vision 族使用指南

參考(範例資料・文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者・年份)與用途見上面的族使用指南。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• poc_eye_to_brain — py -3.11 examples/poc_eye_to_brain.py

型別可銜接的下一個運算子(可接受 signal 作為輸入)

fly_emd_response · fly_lgmd_eta · fly_tau_from_expansion · fly_dsi

同類別(sample)

fly_hex_resample


*Provenance: flyvision.py — FLYVISION 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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