-
Notifications
You must be signed in to change notification settings - Fork 0
axon_thresholds.m
models.axon_thresholds
computes the stimulus thresholds for each axon in the sample defined in axons~/axons.mat
, as generated by models.axon_population, using models.axon_model. models.axon_thresholds requires an extracellular stimulus field (generated using models.nerve_anatomy), and is structurally similar to models.nerve_stimulation, the primary difference being that models.axon_thresholds computes an exact threshold for each axon, as opposed to an approximate threshold based on pre-determined stimulus level. Output data is saved to thresholds~\stimulus (name)
Type-fascicle0.mat.
In addition to 'name', value
syntax, models.axon_thresholds accepts an options structure; the fields of options.thresholds
and options.stimulation
are treated as additional input arguments (see tools.opts_to_args). Where relevant, options.thresholds
takes priority over options.stimulation
.
models.axon_thresholds is part of package +models
-
-file 'stimulus*.mat'
: specify extracellular potential function (generated using models.nerve_anatomy) -
-axons 'axons*.mat'
: specify axon population for SFAP calculation, defaults to newest axons file inaxons~/
-
-out
: specify output folder location (default:sfap~/
) -
-stimulus
: set stimulus waveform and possibly current levels. See plots.preview_stimulus for more details. if-stim
is not set, construct a biphasic stimulus using-pw [pulse-width (ms)]
(default: 100 µs, with a 50 µs inter-phase gap). -
-pair [ch]
,-elec [ch]
,-chan [ch]
: set stimulus channel(s) to use. By default the stimulus is a bipolar stimulus, withreturn = ch + 1
. If the stimulus file contains monopolar stimulation fields (see models.nerve_anatomy), monopolar stimuli can be requested using-mono
. Ifnumel(ch) > 2
a evenly balanced tripolar (or quadrapolar, or etc) stimulus is generated unless the voltage profile is set explicitly using-pattern [pattern]
(where the elements ofpattern
correspond to the elements ofch
. models.analysis_interface.hoc is capable of compositing multiple fields into a single stimulus; if this is desired, you will have to set-stimulus [stim]
,-mono
, and-chan [ch-list]
such thatsize(stim.p,2) == numel(cc)
. -
-voltage
and-debug
are passed to models.axon_model if set. -
-args {models_axon_model_args}
enables arbitrary arguments to be passed through to models.axon_model.
-
-downsample [value]
: downsample all axons (scalar value) or set per-axon-class downsample (numel(value) = numel(pop)
). -
-no-parallel
: run in debug mode (without using the parallel pool). -
-fascicles [list]
: simulate only the specified fascicles (Default: all) -
-Ve [Ve_function]
: use explicit input voltage fields. Ifiscell(Ve_function)
, use theVe_function
corresponding to this 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) -
-xy
: replace axon positions with a homogenous grid of axons, similar to 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-grid
generates a full 2D grid sample; by defult, a fast 1D sample is generated instead.-xy-resol [n_axons]
sets the grid resolution.-xy-inspect
generates an illustration. -
-fix-Gaines
,-fix-Sundt
,-fix-MRG
: re-run just one class (note: if other classes are defined using models.axon_populations, the model name for those classes are what is used here. If multiple-fix
options are set, multiple classes are simulated. -
-resume
skip any file which has already been generated. -
-q
,-quiet
: suppress most output to console.
TODO list relevent +plots code