Revision 25:d2c4c07df02c
| multithreshold 1.46/subjGUI_MT.m | ||
|---|---|---|
| 1581 | 1581 |
options.showACF=0; |
| 1582 | 1582 |
options.showEfferent=1; |
| 1583 | 1583 |
options.surfProbability=0; |
| 1584 |
showMapOptions.surfSpikes=0; |
|
| 1584 | 1585 |
UTIL_showMAP(options) |
| 1585 | 1586 |
end |
| 1586 | 1587 |
|
| parameterStore/MAPparamsEndo.m | ||
|---|---|---|
| 20 | 20 |
currentFile=mfilename; % i.e. the name of this mfile |
| 21 | 21 |
method.parameterSource=currentFile(10:end); % for the record |
| 22 | 22 |
|
| 23 |
switchOffEfferent=0; |
|
| 24 | 23 |
efferentDelay=0.010; |
| 25 | 24 |
method.segmentDuration=efferentDelay; |
| 26 | 25 |
|
| ... | ... | |
| 57 | 56 |
|
| 58 | 57 |
% Acoustic reflex: maximum attenuation should be around 25 dB Price (1966) |
| 59 | 58 |
% i.e. a minimum ratio of 0.056. |
| 60 |
if ~switchOffEfferent |
|
| 61 |
% 'spikes' model: AR based on brainstem spiking activity (LSR) |
|
| 62 |
OMEParams.rateToAttenuationFactor=0.003; % * N(all ICspikes) |
|
| 59 |
% 'spikes' model: AR based on brainstem spiking activity (LSR) |
|
| 60 |
OMEParams.rateToAttenuationFactor=0.006; % * N(all ICspikes) |
|
| 63 | 61 |
% OMEParams.rateToAttenuationFactor=0; % * N(all ICspikes) |
| 64 |
% 'probability model': Ar based on An firing probabilities (LSR) |
|
| 65 |
OMEParams.rateToAttenuationFactorProb=0.005;% * N(all ANrates) |
|
| 62 |
|
|
| 63 |
% 'probability model': Ar based on AN firing probabilities (LSR) |
|
| 64 |
OMEParams.rateToAttenuationFactorProb=0.01;% * N(all ANrates) |
|
| 66 | 65 |
% OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates) |
| 67 |
else |
|
| 68 |
OMEParams.rateToAttenuationFactor=0; % 0= off |
|
| 69 |
OMEParams.rateToAttenuationFactorProb=0; % 0= off |
|
| 70 |
end |
|
| 66 |
|
|
| 71 | 67 |
% asymptote should be around 100-200 ms |
| 72 | 68 |
OMEParams.ARtau=.05; % AR smoothing function |
| 73 | 69 |
% delay must be longer than the segment length |
| ... | ... | |
| 79 | 75 |
DRNLParams.BFlist=BFlist; |
| 80 | 76 |
|
| 81 | 77 |
% DRNL nonlinear path |
| 82 |
DRNLParams.a=3e4; % nonlinear path gain (below compression threshold) |
|
| 83 |
% DRNLParams.a=3e2; % DRNL.a=0 means no OHCs (no nonlinear path) |
|
| 78 |
DRNLParams.a=5e4; % DRNL.a=0 means no OHCs (no nonlinear path) |
|
| 84 | 79 |
|
| 85 | 80 |
DRNLParams.b=8e-6; % *compression threshold raised compression |
| 86 | 81 |
% DRNLParams.b=1; % b=1 means no compression |
| ... | ... | |
| 104 | 99 |
|
| 105 | 100 |
% DRNL MOC efferents |
| 106 | 101 |
DRNLParams.MOCdelay = efferentDelay; % must be < segment length! |
| 107 |
if ~switchOffEfferent |
|
| 108 |
% 'spikes' model: MOC based on brainstem spiking activity (HSR) |
|
| 109 |
DRNLParams.rateToAttenuationFactor = .009; % strength of MOC |
|
| 110 |
DRNLParams.rateToAttenuationFactor = .009; % strength of MOC |
|
| 102 |
|
|
| 103 |
% 'spikes' model: MOC based on brainstem spiking activity (HSR) |
|
| 104 |
DRNLParams.rateToAttenuationFactor = .01; % strength of MOC |
|
| 111 | 105 |
% DRNLParams.rateToAttenuationFactor = 0; % strength of MOC |
| 106 |
% 'probability' model: MOC based on AN spiking activity (HSR) |
|
| 107 |
DRNLParams.rateToAttenuationFactorProb = .005; % strength of MOC |
|
| 108 |
% DRNLParams.rateToAttenuationFactorProb = .0; % strength of MOC |
|
| 109 |
DRNLParams.MOCrateThreshold =70; % spikes/s probability only |
|
| 112 | 110 |
|
| 113 |
% 'spikes' model: MOC based on brainstem spiking activity (HSR) |
|
| 114 |
DRNLParams.rateToAttenuationFactorProb = .002; % strength of MOC |
|
| 115 |
else |
|
| 116 |
DRNLParams.rateToAttenuationFactor = 0; % 0 = MOC off (probability) |
|
| 117 |
DRNLParams.rateToAttenuationFactorProb = 0; % 0 = MOC off (spikes) |
|
| 118 |
end |
|
| 119 |
DRNLParams.MOCtau =.03; % smoothing for MOC |
|
| 120 |
DRNLParams.MOCrateThreshold =50; % set to AN rate threshold |
|
| 111 |
DRNLParams.MOCtau =.1; % smoothing for MOC |
|
| 121 | 112 |
|
| 122 | 113 |
|
| 123 | 114 |
%% #4 IHC_cilia_RPParams |
| ... | ... | |
| 130 | 121 |
IHC_cilia_RPParams.u1= 1e-9; |
| 131 | 122 |
IHC_cilia_RPParams.s1= 1e-9; |
| 132 | 123 |
|
| 133 |
IHC_cilia_RPParams.Gmax= 5e-9; % 2.5e-9 maximum conductance (Siemens)
|
|
| 134 |
IHC_cilia_RPParams.Ga= 1e-9; % 4.3e-9 fixed apical membrane conductance
|
|
| 124 |
IHC_cilia_RPParams.Gmax= 5e-9; % 2.5e-9 maximum conductance (Siemens) |
|
| 125 |
IHC_cilia_RPParams.Ga= 1e-9; % 4.3e-9 fixed apical membrane conductance |
|
| 135 | 126 |
|
| 136 | 127 |
% #5 IHC_RP |
| 137 | 128 |
IHC_cilia_RPParams.Cab= 4e-012; % IHC capacitance (F) |
| 138 | 129 |
IHC_cilia_RPParams.Cab= 1e-012; % IHC capacitance (F) |
| 139 |
IHC_cilia_RPParams.Et= 0.100; % endocochlear potential (V) |
|
| 140 |
IHC_cilia_RPParams.Et= 0.065; % endocochlear potential (V) |
|
| 130 |
IHC_cilia_RPParams.Et= 0.07; % endocochlear potential (V) |
|
| 141 | 131 |
|
| 142 | 132 |
IHC_cilia_RPParams.Gk= 2e-008; % 1e-8 potassium conductance (S) |
| 143 | 133 |
IHC_cilia_RPParams.Ek= -0.08; % -0.084 K equilibrium potential |
| ... | ... | |
| 156 | 146 |
% reminder: changing z has a strong effect on HF thresholds (like Et) |
| 157 | 147 |
IHCpreSynapseParams.z= 2e42; % scalar Ca -> vesicle release rate |
| 158 | 148 |
|
| 159 |
LSRtauCa=50e-6; HSRtauCa=85e-6; % seconds
|
|
| 149 |
LSRtauCa=35e-6; HSRtauCa=85e-6; % seconds
|
|
| 160 | 150 |
% LSRtauCa=35e-6; HSRtauCa=70e-6; % seconds |
| 161 | 151 |
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber |
| 162 | 152 |
|
| parameterStore/MAPparamsOHC.m | ||
|---|---|---|
| 57 | 57 |
% Acoustic reflex: maximum attenuation should be around 25 dB Price (1966) |
| 58 | 58 |
% i.e. a minimum ratio of 0.056. |
| 59 | 59 |
% 'spikes' model: AR based on brainstem spiking activity (LSR) |
| 60 |
OMEParams.rateToAttenuationFactor=0.003; % * N(all ICspikes)
|
|
| 60 |
OMEParams.rateToAttenuationFactor=0.006; % * N(all ICspikes)
|
|
| 61 | 61 |
% OMEParams.rateToAttenuationFactor=0; % * N(all ICspikes) |
| 62 | 62 |
|
| 63 | 63 |
% 'probability model': Ar based on AN firing probabilities (LSR) |
| 64 |
OMEParams.rateToAttenuationFactorProb=0.005;% * N(all ANrates)
|
|
| 64 |
OMEParams.rateToAttenuationFactorProb=0.01;% * N(all ANrates)
|
|
| 65 | 65 |
% OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates) |
| 66 | 66 |
|
| 67 | 67 |
% asymptote should be around 100-200 ms |
| ... | ... | |
| 75 | 75 |
DRNLParams.BFlist=BFlist; |
| 76 | 76 |
|
| 77 | 77 |
% DRNL nonlinear path |
| 78 |
DRNLParams.a=3e4; % nonlinear path gain (below compression threshold) |
|
| 79 | 78 |
DRNLParams.a=0; % DRNL.a=0 means no OHCs (no nonlinear path) |
| 80 | 79 |
|
| 81 | 80 |
DRNLParams.b=8e-6; % *compression threshold raised compression |
| ... | ... | |
| 100 | 99 |
|
| 101 | 100 |
% DRNL MOC efferents |
| 102 | 101 |
DRNLParams.MOCdelay = efferentDelay; % must be < segment length! |
| 102 |
|
|
| 103 | 103 |
% 'spikes' model: MOC based on brainstem spiking activity (HSR) |
| 104 |
DRNLParams.rateToAttenuationFactor = .009; % strength of MOC |
|
| 105 |
DRNLParams.rateToAttenuationFactor = .009; % strength of MOC |
|
| 104 |
DRNLParams.rateToAttenuationFactor = .01; % strength of MOC |
|
| 106 | 105 |
% DRNLParams.rateToAttenuationFactor = 0; % strength of MOC |
| 106 |
% 'probability' model: MOC based on AN spiking activity (HSR) |
|
| 107 |
DRNLParams.rateToAttenuationFactorProb = .005; % strength of MOC |
|
| 108 |
% DRNLParams.rateToAttenuationFactorProb = .0; % strength of MOC |
|
| 109 |
DRNLParams.MOCrateThreshold =70; % spikes/s probability only |
|
| 107 | 110 |
|
| 108 |
% 'probability' model: MOC based on AN spiking activity (HSR) |
|
| 109 |
DRNLParams.rateToAttenuationFactorProb = .002; % strength of MOC |
|
| 110 |
DRNLParams.MOCtau =.03; % smoothing for MOC |
|
| 111 |
DRNLParams.MOCrateThreshold =50; % set to AN rate threshold |
|
| 111 |
DRNLParams.MOCtau =.1; % smoothing for MOC |
|
| 112 | 112 |
|
| 113 | 113 |
|
| 114 | 114 |
%% #4 IHC_cilia_RPParams |
| ... | ... | |
| 127 | 127 |
% #5 IHC_RP |
| 128 | 128 |
IHC_cilia_RPParams.Cab= 4e-012; % IHC capacitance (F) |
| 129 | 129 |
IHC_cilia_RPParams.Cab= 1e-012; % IHC capacitance (F) |
| 130 |
IHC_cilia_RPParams.Et= 0.100; % endocochlear potential (V)
|
|
| 130 |
IHC_cilia_RPParams.Et= 0.1; % endocochlear potential (V) |
|
| 131 | 131 |
|
| 132 | 132 |
IHC_cilia_RPParams.Gk= 2e-008; % 1e-8 potassium conductance (S) |
| 133 | 133 |
IHC_cilia_RPParams.Ek= -0.08; % -0.084 K equilibrium potential |
| ... | ... | |
| 146 | 146 |
% reminder: changing z has a strong effect on HF thresholds (like Et) |
| 147 | 147 |
IHCpreSynapseParams.z= 2e42; % scalar Ca -> vesicle release rate |
| 148 | 148 |
|
| 149 |
LSRtauCa=50e-6; HSRtauCa=85e-6; % seconds
|
|
| 149 |
LSRtauCa=35e-6; HSRtauCa=85e-6; % seconds
|
|
| 150 | 150 |
% LSRtauCa=35e-6; HSRtauCa=70e-6; % seconds |
| 151 | 151 |
IHCpreSynapseParams.tauCa= [LSRtauCa HSRtauCa]; %LSR and HSR fiber |
| 152 | 152 |
|
| testPrograms/demoTwisterProbability.m | ||
|---|---|---|
| 3 | 3 |
% MAPdemo runs the MATLAB auditory periphery model (MAP1_14) as far as |
| 4 | 4 |
% the AN (probabilities) or IC (spikes) with graphical output |
| 5 | 5 |
|
| 6 |
dbstop if error |
|
| 6 | 7 |
restorePath=path; |
| 7 | 8 |
addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... |
| 8 | 9 |
['..' filesep 'utilities']) |
| ... | ... | |
| 44 | 45 |
|
| 45 | 46 |
%% Generate stimuli |
| 46 | 47 |
|
| 47 |
dbstop if error |
|
| 48 |
restorePath=path; |
|
| 49 |
addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore']) |
|
| 50 | 48 |
switch signalType |
| 51 | 49 |
case 'tones' |
| 52 | 50 |
inputSignal=createMultiTone(sampleRate, toneFrequency, ... |
| testPrograms/demoTwisterSpikes.m | ||
|---|---|---|
| 48 | 48 |
|
| 49 | 49 |
%% Generate stimuli |
| 50 | 50 |
|
| 51 |
dbstop if error |
|
| 52 | 51 |
switch signalType |
| 53 | 52 |
case 'tones' |
| 54 | 53 |
inputSignal=createMultiTone(sampleRate, toneFrequency, ... |
| testPrograms/test_MAP1_14.m | ||
|---|---|---|
| 32 | 32 |
% |
| 33 | 33 |
% When the demonstration is satisfactory, freeze it by renaming it <demoxx> |
| 34 | 34 |
|
| 35 |
dbstop if error |
|
| 35 | 36 |
restorePath=path; |
| 36 | 37 |
addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... |
| 37 | 38 |
['..' filesep 'utilities']) |
| ... | ... | |
| 45 | 46 |
|
| 46 | 47 |
% or |
| 47 | 48 |
% NB probabilities are not corrected for refractory effects |
| 48 |
AN_spikesOrProbability='probability'; |
|
| 49 |
% AN_spikesOrProbability='probability';
|
|
| 49 | 50 |
|
| 50 | 51 |
|
| 51 | 52 |
%% #3 pure tone, harmonic sequence or speech file input |
| 52 | 53 |
signalType= 'tones'; |
| 53 | 54 |
sampleRate= 100000; |
| 54 |
duration=0.50; % seconds |
|
| 55 |
duration=0.050; % seconds
|
|
| 55 | 56 |
% toneFrequency= 250:250:8000; % harmonic sequence (Hz) |
| 56 |
toneFrequency= 500; % or a pure tone (Hz8
|
|
| 57 |
toneFrequency= 1000; % or a pure tone (Hz8
|
|
| 57 | 58 |
rampDuration=.005; % seconds |
| 58 | 59 |
|
| 59 | 60 |
% or |
| ... | ... | |
| 63 | 64 |
|
| 64 | 65 |
%% #4 rms level |
| 65 | 66 |
% signal details |
| 66 |
leveldBSPL= 90; % dB SPL
|
|
| 67 |
leveldBSPL= 70; % dB SPL
|
|
| 67 | 68 |
|
| 68 | 69 |
|
| 69 | 70 |
%% #5 number of channels in the model |
| ... | ... | |
| 73 | 74 |
BFlist=round(logspace(log10(lowestBF), log10(highestBF), numChannels)); |
| 74 | 75 |
|
| 75 | 76 |
% or specify your own channel BFs |
| 77 |
% numChannels=1; |
|
| 76 | 78 |
% BFlist=toneFrequency; |
| 77 | 79 |
|
| 78 | 80 |
|
| ... | ... | |
| 84 | 86 |
% *after* the MAPparams file has been read |
| 85 | 87 |
% This example declares only one fiber type with a calcium clearance time |
| 86 | 88 |
% constant of 80e-6 s (HSR fiber) when the probability option is selected. |
| 89 |
|
|
| 87 | 90 |
% paramChanges={'AN_IHCsynapseParams.ANspeedUpFactor=5;', ...
|
| 88 | 91 |
% 'IHCpreSynapseParams.tauCa=86e-6;'}; |
| 92 |
|
|
| 89 | 93 |
% paramChanges={'DRNLParams.rateToAttenuationFactorProb = 0;'};
|
| 90 | 94 |
|
| 95 |
% paramChanges={'IHCpreSynapseParams.tauCa=86e-6;',
|
|
| 96 |
% 'AN_IHCsynapseParams.numFibers= 100;'}; |
|
| 97 |
|
|
| 91 | 98 |
|
| 92 | 99 |
%% delare 'showMap' options to control graphical output |
| 93 |
global showMapOptions |
|
| 94 | 100 |
|
| 95 |
% or (example: show everything including an smoothed SACF output |
|
| 96 | 101 |
showMapOptions.printModelParameters=1; % prints all parameters |
| 97 | 102 |
showMapOptions.showModelOutput=1; % plot of all stages |
| 98 | 103 |
showMapOptions.printFiringRates=1; % prints stage activity levels |
| 99 | 104 |
showMapOptions.showACF=0; % shows SACF (probability only) |
| 100 | 105 |
showMapOptions.showEfferent=1; % tracks of AR and MOC |
| 101 | 106 |
showMapOptions.surfProbability=1; % 2D plot of HSR response |
| 107 |
showMapOptions.surfSpikes=1; % 2D plot of spikes histogram |
|
| 108 |
|
|
| 109 |
% disable certain silly options |
|
| 102 | 110 |
if strcmp(AN_spikesOrProbability, 'spikes') |
| 103 | 111 |
% avoid nonsensical options |
| 104 | 112 |
showMapOptions.surfProbability=0; |
| 105 | 113 |
showMapOptions.showACF=0; |
| 114 |
else |
|
| 115 |
showMapOptions.surfSpikes=0; |
|
| 106 | 116 |
end |
| 107 | 117 |
if strcmp(signalType, 'file') |
| 108 | 118 |
% needed for labeling plot |
| ... | ... | |
| 113 | 123 |
|
| 114 | 124 |
%% Generate stimuli |
| 115 | 125 |
|
| 116 |
dbstop if error |
|
| 117 |
restorePath=path; |
|
| 118 |
addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore']) |
|
| 119 | 126 |
switch signalType |
| 120 | 127 |
case 'tones' |
| 121 | 128 |
inputSignal=createMultiTone(sampleRate, toneFrequency, ... |
| ... | ... | |
| 179 | 186 |
inputSignal=inputSignal.*ramp; |
| 180 | 187 |
|
| 181 | 188 |
% add 10 ms silence |
| 182 |
silence= zeros(1,round(0.03/dt));
|
|
| 183 |
silence= zeros(1,round(0.01/dt));
|
|
| 189 |
silence= zeros(1,round(0.05/dt));
|
|
| 190 |
silence= zeros(1,round(0.05/dt));
|
|
| 184 | 191 |
inputSignal= [silence inputSignal silence]; |
| 185 | 192 |
|
| utilities/UTIL_showMAP.m | ||
|---|---|---|
| 1 |
function UTIL_showMAP (options)
|
|
| 1 |
function UTIL_showMAP (showMapOptions)
|
|
| 2 | 2 |
% UTIL_showMAP produces summaries of the output from MAP's mmost recent run |
| 3 | 3 |
% All MAP outputs are stored in global variables and UTIL_showMAP |
| 4 | 4 |
% simply assumes that they are in place. |
| 5 | 5 |
% |
| 6 |
% options
|
|
| 7 |
% options.printModelParameters=1; % print model parameters
|
|
| 8 |
% options.showModelOutput=1; % plot all stages output
|
|
| 9 |
% options.printFiringRates=1; % mean activity at all stages
|
|
| 10 |
% options.showACF=1; % SACF (probabilities only)
|
|
| 11 |
% options.showEfferent=1; % plot of efferent activity
|
|
| 12 |
% options.surfProbability=0; % HSR (probability) surf plot
|
|
| 13 |
% options.fileName=[]; % parameter filename for plot title
|
|
| 6 |
% showMapOptions
|
|
| 7 |
% showMapOptions.printModelParameters=1; % print model parameters
|
|
| 8 |
% showMapOptions.showModelOutput=1; % plot all stages output
|
|
| 9 |
% showMapOptions.printFiringRates=1; % mean activity at all stages
|
|
| 10 |
% showMapOptions.showACF=1; % SACF (probabilities only)
|
|
| 11 |
% showMapOptions.showEfferent=1; % plot of efferent activity
|
|
| 12 |
% showMapOptions.surfProbability=0; % HSR (probability) surf plot
|
|
| 13 |
% showMapOptions.fileName=[]; % parameter filename for plot title
|
|
| 14 | 14 |
|
| 15 | 15 |
dbstop if warning |
| 16 | 16 |
|
| ... | ... | |
| 27 | 27 |
addpath ( ['..' filesep 'utilities'], ['..' filesep 'parameterStore']) |
| 28 | 28 |
|
| 29 | 29 |
if nargin<1 |
| 30 |
options=[];
|
|
| 30 |
showMapOptions=[];
|
|
| 31 | 31 |
end |
| 32 |
% defaults (plot staged outputs and print rates only) |
|
| 33 |
if ~isfield(options,'printModelParameters') |
|
| 34 |
options.printModelParameters=0; end |
|
| 35 |
if ~isfield(options,'showModelOutput'),options.showModelOutput=1;end |
|
| 36 |
if ~isfield(options,'printFiringRates'),options.printFiringRates=1;end |
|
| 37 |
if ~isfield(options,'showACF'),options.showACF=0;end |
|
| 38 |
if ~isfield(options,'showEfferent'),options.showEfferent=0;end |
|
| 39 |
if ~isfield(options,'surfProbability'),options.surfProbability=0;end |
|
| 40 |
if ~isfield(options,'fileName'),options.fileName=[];end |
|
| 32 |
% defaults (plot staged outputs and print rates only) if options omitted |
|
| 33 |
if ~isfield(showMapOptions,'printModelParameters') |
|
| 34 |
showMapOptions.printModelParameters=0; end |
|
| 35 |
if ~isfield(showMapOptions,'showModelOutput'),showMapOptions.showModelOutput=1;end |
|
| 36 |
if ~isfield(showMapOptions,'printFiringRates'),showMapOptions.printFiringRates=1;end |
|
| 37 |
if ~isfield(showMapOptions,'showACF'),showMapOptions.showACF=0;end |
|
| 38 |
if ~isfield(showMapOptions,'showEfferent'),showMapOptions.showEfferent=0;end |
|
| 39 |
if ~isfield(showMapOptions,'surfProbability'),showMapOptions.surfProbability=0;end |
|
| 40 |
if ~isfield(showMapOptions,'fileName'),showMapOptions.fileName=[];end |
|
| 41 |
if ~isfield(showMapOptions,'surfSpikes'),showMapOptions.surfSpikes=0;end |
|
| 41 | 42 |
|
| 42 | 43 |
|
| 43 |
if options.printModelParameters
|
|
| 44 |
if showMapOptions.printModelParameters
|
|
| 44 | 45 |
% Read parameters from MAPparams<***> file in 'parameterStore' folder |
| 45 | 46 |
% and print out all parameters |
| 46 | 47 |
cmd=['MAPparams' saveMAPparamsName ... |
| ... | ... | |
| 48 | 49 |
eval(cmd); |
| 49 | 50 |
end |
| 50 | 51 |
|
| 51 |
if options.printFiringRates
|
|
| 52 |
if showMapOptions.printFiringRates
|
|
| 52 | 53 |
%% print summary firing rates |
| 53 | 54 |
fprintf('\n\n')
|
| 54 | 55 |
disp('summary')
|
| ... | ... | |
| 78 | 79 |
|
| 79 | 80 |
|
| 80 | 81 |
%% figure (99) summarises main model output |
| 81 |
if options.showModelOutput
|
|
| 82 |
if showMapOptions.showModelOutput
|
|
| 82 | 83 |
plotInstructions.figureNo=99; |
| 83 | 84 |
signalRMS=mean(savedInputSignal.^2)^0.5; |
| 84 | 85 |
signalRMSdb=20*log10(signalRMS/20e-6); |
| ... | ... | |
| 163 | 164 |
end |
| 164 | 165 |
end |
| 165 | 166 |
|
| 166 |
if options.surfProbability
|
|
| 167 |
if showMapOptions.surfProbability
|
|
| 167 | 168 |
%% surface plot of probability |
| 168 | 169 |
figure(97), clf |
| 169 | 170 |
% select only HSR fibers at the bottom of the matrix |
| ... | ... | |
| 183 | 184 |
zlabel('spike rate')
|
| 184 | 185 |
view([-20 60]) |
| 185 | 186 |
% view([0 90]) |
| 186 |
title ([options.fileName ': ' num2str(signalRMSdb,'% 3.0f') ' dB'])
|
|
| 187 |
title ([showMapOptions.fileName ': ' num2str(signalRMSdb,'% 3.0f') ' dB'])
|
|
| 187 | 188 |
end |
| 188 | 189 |
|
| 190 |
if showMapOptions.surfSpikes |
|
| 191 |
%% surface plot of probability |
|
| 192 |
figure(97), clf |
|
| 193 |
% select only HSR fibers at the bottom of the matrix |
|
| 194 |
ANoutput= ANoutput(end-length(savedBFlist)+1:end,:); |
|
| 195 |
PSTHbinWidth=0.001; % 1 ms bins |
|
| 196 |
PSTH=UTIL_PSTHmakerb(ANoutput, ANdt, PSTHbinWidth); |
|
| 197 |
[nY nX]=size(PSTH); |
|
| 198 |
time=PSTHbinWidth*(1:nX); |
|
| 199 |
surf(time, savedBFlist, PSTH) |
|
| 200 |
shading interp |
|
| 201 |
set(gca, 'yScale','log') |
|
| 202 |
xlim([0 max(time)]) |
|
| 203 |
ylim([0 max(savedBFlist)]) |
|
| 204 |
% zlim([0 1000]) |
|
| 205 |
xlabel('time (s)')
|
|
| 206 |
ylabel('best frequency (Hz)')
|
|
| 207 |
zlabel('spike rate')
|
|
| 208 |
view([-20 60]) |
|
| 209 |
% view([0 90]) |
|
| 210 |
title ([showMapOptions.fileName ': ' num2str(signalRMSdb,'% 3.0f') ' dB']) |
|
| 211 |
end |
|
| 212 |
|
|
| 189 | 213 |
|
| 190 | 214 |
%% plot efferent control values as dB |
| 191 |
if options.showEfferent
|
|
| 215 |
if showMapOptions.showEfferent
|
|
| 192 | 216 |
plotInstructions=[]; |
| 193 | 217 |
plotInstructions.figureNo=98; |
| 194 | 218 |
figure(98), clf |
| ... | ... | |
| 212 | 236 |
end |
| 213 | 237 |
|
| 214 | 238 |
%% ACF plot if required |
| 215 |
if options.showACF
|
|
| 239 |
if showMapOptions.showACF
|
|
| 216 | 240 |
tic |
| 217 | 241 |
method.dt=dt; |
| 218 | 242 |
method.segmentNo=1; |
Also available in: Unified diff