Skip to content

ecap_recording.m

Calvin Eiber edited this page Jun 30, 2021 · 1 revision

models.ECAP_recording computes simulated electrically-evoked compound action potential (ECAP) recordings for a given axon population, nerve anatomy, neural interface configuration, and stimulus.

models.ECAP_recording requires an input population (generated using models.axon_population, a sensitivity field (generated using models.nerve_anatomy) membrane current profiles (generated using models.membrane_currents, and finally stimulus-evoked spike-times generated using models.nerve_stimulation. models.ECAP_recording is structurally similar to models.axon_sfap, models.nerve_recording, and plots.inner_product.

In addition to 'name', value syntax, models.nerve_recording accepts an options structure; the fields of options.ecap are treated as additional input arguments (see tools.opts_to_args).

The output ECAP recording is in units of:

$$ECAP (\mu V) = \frac{I (nA)}{4 \pi~\text{sigma}~(\Omega / m)~ \text{distance}~(mm)}$$

The mm and the nA cancel to yield µV, so no further conversion is necessary.

models.ECAP_recording is part of package +models

Core Syntax:

  • -file 'sensitivity*.mat' : specify spatial sensitivity function (generated using models.nerve_anatomy)
  • -axons 'axons*.mat' : specify axon population for SFAP calculation, defaults to newest axons file in axons~/
  • -currents [folder] : specify root folder for membrane currents (generated using models.membrane_currents), defaults to the folder X corresponding to axons (X).mat
  • -stim [folder] : specify root folder for stimulus spike-times (generated using models.nerve_stimulation). If this is not specified ViNERS will make a guess as to what you wanted based on the sensitivity file name and whatever stimulus folder is newest.
  • -out : specify output folder location (default: waves~/)

Additional options:

  • -axon-t set 3D axon trajectories (not yet implemented, may interfere with -axons?)
  • -delta-xy [x y] displace axons by specified amount (in µm)
  • -no-parallel run in debug mode (without using the parallel pool).
  • -recenter-peak [new_peak_x] shift simulated sensitivity peaks in space. Useful for the situation in which many electrodes of different designs were simulated in a single mesh. If numel(new_peak_x) > 1, modulo.
  • -distortion apply a systemic distortion to the recorded velocities, temporal current width, and/or spatial current width (not tested in a long time). -debug-distortion illustrates the applied distortion.
  • -fasc [list] simulate activity only the listed fascicles
  • -f-sum sum computed waves across fascicles (default returns one wave per fascicle, more useful for models.compose_waves
  • -fs [rate, default 30 kHz] set sampling rate for ECAP
  • -time [value, default 20 ms] set time ROI window for ECAP
  • -q,-quiet suppress most output to console.
  • -debug-units set up the calculation and display axon trajectories against the fascicle, useful for debugging units issues. Synonym for -preview

Visualisations ???

Clone this wiki locally