Repository navigation
Validation
golgi is validated layer by layer — the FEM solver against analytic and COMSOL references, the fiber
models against canonical electrophysiology, and end-to-end recruitment against published in-vivo and
cross-platform studies. The validation scripts live in
paper_figs/ (validate_*.py).
| Layer | Script(s) | Reference | Check |
|---|---|---|---|
| FEM solver | validate_fem_analytic.py |
analytic point source V(r)=I/(4πσ)(1/r−1/R)
|
FEniCSx solution accuracy |
| FEM (cross-platform) |
comsol_validation_fig.py, _m1_golgi_cylinder.py
|
COMSOL (M1 monopole, M2 idealized cuff w/ anisotropy + perineurium CI, M3 swine, M4 human) | point-for-point lead fields (S15) |
| Conduction velocity |
validate_fiber.py, validate_mrg.py
|
Hursh 1939, McIntyre 2002 (MRG) | CV-vs-diameter; MRG interpolation vs discrete |
| Strength–duration | validate_fiber.py |
Weiss/Lapicque (rheobase, chronaxie) | threshold vs pulse width |
| Dog cervical VNS | validate_dogvns_native.py |
Yoo 2013 (in-vivo, via ASCENT) | A/B/C thresholds, LivaNova helical cuff, perineurium CI |
| Cat tibial LIFE | validate_nrv*.py |
NRV / Couppey 2024, Nannini-Horch 1991, Yoshida-Horch 1993 | intrafascicular recruitment |
| Multi-fascicle cuff |
validate_bucksot.py, fig_bucksot.py
|
Bucksot 2019 (via ASCENT) | per-fascicle recruitment, circumferential vs inverted cuff |
Digitized literature reference curves are stored as JSON (save_bucksot_ref.py →
bucksot_reference.json; save_nrv_ref.py → nrv_reference.json) for the overlays. The integrated
Fig 4 combines the analytic/COMSOL, dog-VNS, NRV-LIFE, and Bucksot checks into one figure; S8
(supp_foundations) and S15 (supp_comsol_validation) are the supplementary validation figures.
See Reproducing the Paper.
- The analytic and COMSOL checks establish that golgi's open FEniCSx solver matches both a closed form and the field most peripheral-nerve studies have historically used (COMSOL) — so dropping the commercial solver costs no accuracy. See Finite-Element Solver.
- The Hursh / McIntyre checks establish that the fiber backends reproduce textbook conduction velocity and strength–duration behaviour. See Fiber Models & Activation.
- The Yoo / Bucksot / NRV checks establish end-to-end recruitment against independent in-vivo and cross-platform data, including the perineurium contact-impedance model. See Conductivity & Tissue Properties.
Beyond the paper validation, the repository ships fast automated tests
(Contributing): source/attribute guards that the headless API stays wired to its
pipeline drivers, a full import_nerve → run_mesh → run_fem → run_fibers → run_sweep integration test
(auto-skips without the solver stack), and pure-numpy unit tests of the
CNAP cable math.
Fiber-model foundations
- Hursh JB (1939). Conduction velocity and diameter of nerve fibers. Am J Physiol 127:131.
- McIntyre CC, Richardson AG, Grill WM (2002). Modeling the excitability of mammalian nerve fibers. J Neurophysiol 87:995.
- Weiss G (1901). Sur la possibilité de rendre comparables entre eux les appareils servant à l'excitation. Arch Ital Biol 35:413. — strength–duration.
- Lapicque L (1907). Recherches quantitatives sur l'excitation électrique des nerfs. J Physiol Pathol Gén 9:620. — chronaxie.
FEM cross-validation
- Bossetti CA, Birdno MJ, Grill WM (2008). Analysis of the quasi-static approximation for calculating potentials generated by neural stimulation. J Neural Eng 5:44.
- Pelot NA, Thio BJ, Grill WM (2019). On the parameters used in finite element modeling of compound peripheral nerves. J Neural Eng 16:016007.
- COMSOL Multiphysics (commercial; used only as an external cross-check, not by golgi).
End-to-end recruitment
- Yoo PB, et al. (2013). High-resolution measurement of electrically-evoked vagus nerve activity. J Neural Eng. — dog cervical VNS.
- Bucksot JE, et al. (2019). Flat electrode contacts for vagus nerve stimulation. PLOS ONE. — multi-fascicle cuff.
- Nannini N, Horch K (1991). Muscle recruitment with intrafascicular electrodes. IEEE Trans Biomed Eng. — LIFE.
- Yoshida K, Horch K (1993). Selective stimulation of peripheral nerve fibers using dual intrafascicular electrodes. IEEE Trans Biomed Eng. — LIFE.
- Couppey T, et al. (2024). NRV: an open framework for in silico evaluation of peripheral nerve stimulation. PLOS Comput Biol. — cross-platform LIFE.
- Musselman ED, Cariello JE, Grill WM, Pelot NA (2021). ASCENT: a pipeline for sample-specific computational modeling of electrical stimulation of peripheral nerves. PLOS Comput Biol. — reference masks/pipeline for the dog-VNS and Bucksot checks.
Reproducing the Paper · Finite-Element Solver · Fiber Models & Activation · Contributing
golgi · open image-to-recruitment modeling of peripheral nerve stimulation · repository · issues · AGPL-3.0-or-later · data CC-BY-4.0
Get started
Tutorial
Build a model
Simulate & analyze
- Finite-Element Solver
- Fiber Populations & Trajectories
- Fiber Models & Activation
- Recruitment Sweeps & Selectivity
- Recording & CNAP
Share & reproduce
Scripting & scale
Reference
Research & project