Skip to content

inner_product.m

Calvin Eiber edited this page Nov 18, 2021 · 5 revisions

plots.inner_product is a viewer which shows axon SFAPs in context with membrane currents and sensitivity curves. The name indicates the origin of the SFAP: the inner product at each moment in time between the instantaneous membrane current (computed using models.membrane_currents and saved in .mat files organized under sub~/axons/[name]/) at that moment in time, across all axon collocation points in space, and the sensitivity function

(computed using models.membrane_currents and saved in .mat files organized under sub~/eidors/)

for each of those spatial locations. This function does not actually use the output of models.axon_sfap)

plots.inner_product is part of package +plots, but shares structural similarities to models.nerve_recording.

Syntax [raw docstr]

plots.inner_product( [eidors_file], [axons_file], [model], ... )
  • -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
  • -model [model] : axon model (one of 'Gaines', 'MRG', 'Sundt', or 'Tigerholm') - strictly speaking the -model indicator is not necessary, but allows you to extend ViNERS with other axon models.
  • -fascicle [#] : which fascicle to compute SFAPs and visualise? --f is a synonym.
  • -elec [list] set electrodes to display (default: sequential bipolar pairs), n_electrodes x 1 or n_channels x 2 list of electrodes. Synonyms: -pair, -chan
  • -axon [#] : which axon model should be used to compute SFAPs? By default, the median axon model is used.

Additional options:

  • -field {cell array of ScatteredInterpolant} : use a modified set of sensitivity functions
  • -nX [n] size of the grid of axon potentials to simulate. Grid is centered on fascicle cross-section and is n-by-n (ignoring axons falling outside the fascicle)
  • -axon-t set 3D axon trajectories (not yet implemented, may interfere with -axons?)
  • -delta-xy [x y] displace axons by specified amount (in µm)
  • -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, -debug-distortion -and-plot also generates the default output figure.
  • -ref [value] reference x-axis value for spike-times in raster.
  • -pad [value] change before/after padding for SFAP calculation (default 5x pad).
  • -fs [rate, default 30 kHz] set sampling rate for recorded SFAP. Synonyms: -sample-rate [rate]
  • -time [value, default 50 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
  • -smooth-n [n] apply N-point smooth to computed SFAP (default: 5-point smooth).
  • -smooth-k [kernel] apply convolutional filter to computed SFAP.
  • -index [list] select indices from the grid to display, by default the axon model producing the largest SFAP and the axon model closest to the centre of the fascicle are displayed.

Example output

plots_inner_product

In this example, the title is set by the name of the sensitivity file used to generate the figure (a particular bent fascicle model)

Clone this wiki locally