Skip to content
Calvin Eiber edited this page Nov 26, 2021 · 5 revisions

ViNERS wiki

This wiki documents ViNERS (Visceral Nerve Ensemble Recording & Stimulation), a MATLAB-based computational modelling pipeline for simulating neural interface stimulation and recording from peripheral nerve, as published in Computational modelling of nerve stimulation and recording with peripheral visceral neural interfaces (Eiber et al., 2021).

In ViNERS, finite-element modelling of extracellular electrical fields is coupled with biophysical simulations of individual axons to predict axon stimulation thresholds, single-fibre action potentials (SFAPs), electroneurogram recordings (ENG) and electrically-evoked compound action potentials (ECAPs).

Please check out the +mesh, +models, +plots, +tools, and data documentation for more details.

If you have used ViNERS in your research, please cite the paper.

Overview

Outline_sfap

ViNERS is designed to operate in a SPARC dataset structure. Multiple instances of ViNERS running simultaneously in multiple MATLAB instances are supported. ViNERS can be run on PC or Unix, and some support for Octave is included.

ViNERS is organised as a series of MATLAB packages and is accompanied with some source data (axon diameter distributions for rat Vagus and Pelvic nerves, an example set of rat pelvic nerve fascicle profiles, a GMSH template for a planar electrode array, and the necessary neuron .mod files for ion channel mechanisms).

ViNERS uses GMSH to generate finite-element meshes, EIDORS to simulate electrical fields and sensitivity functions, and NEURON to simulate individual axons. The setup and installation script install_ViNERS will walk you through downloading these programs and configuring them with ViNERS.

How-to

Running a simulation in ViNERS can be broken into several steps, as demonstrated in the example script:

  1. Set up the array, nerve, and axon population to be simulated using models.electrode_array, mesh.insert_gmsh_fascicles, and models.axon_population.
  2. Generate a mesh and electric fields using models.nerve_anatomy
  3. Generate membrane current templates using models.membrane_currents
  4. (if needed) compute nerve stimulation responses using models.nerve_stimulation or models.axon_thresholds
  5. (if needed) compute ensemble or single-axon nerve recordings using models.nerve_recording or models.axon_sfap
  6. (if needed) combine axon responses to electrical stimulation into whole-nerve recording using models.ECAP_recording
  7. Visualise your results using the visualisations in the +plots package.

See Files for more details about the data files generated by each of these steps.

Philosophy

The design intent behind the interfaces and modular language of ViNERS is largely parallel to that of the Rails Doctrine. Obviously, there are differences: ViNERS is written in MATLAB, not Ruby, and ViNERS is a neural interface simulation pipeline, not a web framework, but the Rails Doctrine is an excellent starting point to read to understand why certain design decisions were made.

One of the principles is that there should be many valid ways of telling the computer what you mean. For more about the different ways that ViNERS uses and interprets input arguments to most functions, see tools.opts_to_args.

Clone this wiki locally