Skip to content

Increase LUT size to 200 and add spice kernel pipeline - #32

Merged
WillMatthews merged 1 commit into
masterfrom
lut-size-200
Jun 15, 2026
Merged

WillMatthews merged 1 commit into
masterfrom
lut-size-200

Conversation

@WillMatthews

Copy link
Copy Markdown
Owner

Summary

  • Increase eta/V lookup table from 20 to 200 points for improved accuracy in the device model
  • Add spice → kernel pipeline (spice_kernel) for computing --shape fast output constants from ngspice simulation

Related work

These changes resolve the LUT discretisation bias (issue #12, ~0.5–2.9% in static cross-check) and provide a repeatable derivation of the fast-output shaping kernel from the device circuit (issue #15).

Test plan

  • Verify static curve cross-check with SimSPAD passes at ≤0.1% with the larger LUT
  • Confirm existing stage scripts still produce consistent results
  • Check spice_kernel generates consistent fast-output kernel parameters

🤖 Generated with Claude Code

The 20-point linear LUT over [0, 5.3*tau] biased the static transfer
curve by 0.5/1.6/2.9% at lam*tau = 3/20/60 against the closed-form
renewal model (the residual grows with saturation depth because the
microcell age density concentrates where the 0.27*tau grid is
coarsest). At 200 points the residual drops to <= 0.1%, the MC noise
floor of a 200k-step run; 2000 points buys nothing further. Lookup is
an early-exit linear scan, so the runtime cost is negligible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@WillMatthews
WillMatthews merged commit 7b7c588 into master Jun 15, 2026
4 checks passed
@WillMatthews
WillMatthews deleted the lut-size-200 branch June 15, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant