Revision 25:d2c4c07df02c testPrograms/test_MAP1_14.m

View differences:

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

  

Also available in: Unified diff