-
Notifications
You must be signed in to change notification settings - Fork 0
inner_product.m
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, which is the inner product at each moment in time between the instantaneous membrane current at that moment in time, across all axon collocation points in space, and the sensitivity function for each of those spatial locations. This function does not actually use the output of models.axon_sfap
This function is part of package +plots, but shares structural similarities to +models.nerve_recording and +models.axon_sfap
in function inner_product(varargin): named = @(v) strncmpi(v,varargin,length(v)); get_ = @(v) varargin{find(named(v))+1}; if any(named('-q')), printf = @(varargin) []; else printf = @fprintf; end opts.verbose = ~any(named('-q')); opts.use_parallel = ~any(named('-no-p'));
in for f = fieldnames(EM.utils)' % Create utility local functions: if any(named('-model')), axon_type = get_('-model'); elseif any(named('MRG')), axon_type = 'MRG'; elseif any(named('sundt')), axon_type = 'Sundt'; elseif any(named('tiger')), axon_type = 'Tigerholm'; elseif any(named('gai')), axon_type = 'Gaines'; if any(named('-fa')), f_id = get_('-fa'); % fascicle elseif any(named('--f')), f_id = get_('--f'); if any(named('-field')), elec_sensor = get_('-field'); if any(named('-nx')), n = get_('-nx'); elseif any(named('-ng')), n = ceil(sqrt(get('-ng'))); if any(named('-debug-units')) if any(named('-and-plot')), figure; if any(named('-sample-rate')), fs = get_('-sample-rate'); elseif any(named('-fs')), fs = get_('-fs'); if any(named('-time')),time_span = get_('-time'); end if any(named('-pad')), if any(named('-ax-id')), gg = get_('-ax-id'); end if any(named('-smooth-k')), elseif any(named('-smooth-n')), if any(named('-id')), example_axon = get_('-id'); elseif any(named('-ind')), example_axon = get_('-ind'); if any(named('-chan')), example_chan = get_('-chan'); elseif any(named('-elec')), example_chan = get_('-elec'); elseif any(named('-pair')), example_chan = get_('-pair');
-
-f [list]
set fascicles to display. -
-e [list]
set electrodes to display. -
-ty [class]
choose axon class to visualise for multiple fascicle figure. -
-bi
use bipolar electrode montage for recording sensitivity -
-im
interpolate results to a heatmap image (Default: plot each axon). This is only useful if the SFAPs were generated using the-xy
option. The resolution of the interpolated output image can be tuned using-res [nPixels]
-
-pk-q [val 0..1]
set quantile for Vpp calculation (default: 100% or 'true' Vpp) -
-hz [ freq_lc freq_hc order]
apply zero-phase bandpass filtering to displayed SFAP -
-mf
make multi-fascicle section figure even if nF = 1 -
-q
quiet mode, less console output
In this example, the title is set by the name of the sensitivity file used to generate the figure (a particular bent fascicle model)