Skip to content

axon_sfap.m

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

models.axon_sfap computes single-fibre action potential magnitudes for every axon in an input population (generated using models.axon_population. models.axon_sfap requires a sensitivity field (generated using models.nerve_anatomy) and membrane current profiles (generated using models.membrane_currents, and is structurally similar to models.nerve_recording, models.ECAP_recording, and plots.inner_product. Output data is saved to sfap~\sensitivity (name).mat and can be displayed using plots.view_sfap.

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

The output SFAP wave is in units of:

$$SFAP (\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.axon_sfap 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
  • -out : specify output folder location (default: sfap~/)

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.
  • -xy : replace axon positions with a homogenous grid of axons. This is actually particularly useful with models.axon_sfap. The grid is based on the median axon for each class; this can be overridden with the additional arguments -ad [myelinated axon diameter], -gr [g-ratio], -cd [unmyelinated axon diameter]. If the argument -xy-eidors is passed, the axon grid ignores the nerve profile in the axons file and instead uses a grid based on the fascicle geometry in the sensitivity file. -xy-quick generates a smaller 1D sample and -xy-resol [n_axons] sets the grid resolution.
  • -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
  • -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
Clone this wiki locally