Skip to content

nerve_recording.m

ceiber-uom edited this page Dec 11, 2022 · 6 revisions

models.nerve_recording computes simulated electroneurogram (ENG) recordings for a given axon population, nerve anatomy, neural interface configuration, and pattern of population activity.

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

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

The output ENG recording is in units of:

$$ENG (\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.nerve_recording by default generates outputs for a range of intra-population coherence levels (i.e. how much the spike-rate for each individual axon differs from the population-averaged spike-rate). See models.random_raster for more details about this and the other details of how the temporally varying population firing rates are controlled in ViNERS.

models.nerve_recording is part of package +models

Core Syntax:

models.nerve_recording( [sensitivity_file], [axons_file], ... )
  • -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
  • -out : specify output folder location (default: waves~/)
  • -rep [value]: override the default number of replicates for the chosen population activity pattern (see below).
  • -coh [list]: override the default values for the population coherence (see below).
  • -raster [handle]: override the call to models.random_raster for a given

Built-in temporal patterns:

  • default : 0.1, 1, 10 imp/s stationary spike-rate, coherence levels = [0.1, 0.5, 1, 2, 5]. 3 replicates per condition.
  • flat : 0.1, 0.2, 0.5, 1, 2, 5, 10, 20 imp/s stationary spike-rates, coherence levels = [0.3, 1, 3]. 3 replicates per condition.
  • base : 0.1 imp/s stationary spike-rate, coherence levels = [0.3, 1, 3]. 10 replicates per condition.
  • drift : drifting spikerate from: 0.1-1 imp/s, 1-5 imp/s, 1-10 imp/s, 1-20 imp/s, and 3-4 imp/s. For each level, the change in firing rate is simulated at 1, 5, and 20 imp/(s²). (defined using models.random_raster 'step'). coherence levels = [0.3, 1, 3]. 3 replicates per condition.
  • pulse : pulse of spikes from t=0. (defined using models.random_raster 'exp2'). For all pulses tau1 = 0.5 ms and tau2 = 2.5 ms. From a 'maintained' rate of 0.1 imp/s, the (nominal) peak spike-rates are [1 1.6 2.5 4 6.3 10 16 25 40 63 100] imp/s. coherence levels = [0.1, 0.5, 1, 2, 5]. 3 replicates per condition.
  • burst : 'bursts' of spiking of various intensity. (defined using models.random_raster 'raised_cosine'). Modulation frequencies of 10, 20, 50, and 100 Hz are simulated. Strong, moderate, and no bursting are simulated around baseline spike-rates of 1 and 10 imp/s, defined as baseline firing rates of 0.1x, 0.75x, and 1x the time-averaged spike-rate and peak firing rates of 3x, 1.5x, and 1x the time-averaged spike-rate. coherence levels = [0.1, 0.5, 1, 2, 5]. 3 replicates per condition.
  • phase : bursts of spiking activity at different phases relative to t=0. Modulation frequencies of 9.1 and 30 Hz are simulated. The baseline firing rate is 1.8 imp/s and the peak firing rate is 12 imp/s. six phases (0°, 60°, ... 300°) are simulated. Additionally, constant firing at 5 and 0.1 imp/s is simulated. coherence levels = [0.1, 0.5, 1, 2, 5]. 3 replicates per condition.

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.
  • -ref [value] reference x-axis value for spike-times in raster.
  • -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 recorded SFAP
  • -time [value, default 20 ms] set time ROI window for SFAP
  • -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