Revision 23:6cce421531e2 testPrograms/demoTwisterProbability.m

View differences:

testPrograms/demoTwisterProbability.m
10 10

  
11 11

  
12 12
%% #2 probability (fast) or spikes (slow) representation
13
% AN_spikesOrProbability='spikes';
14
% or
15 13
AN_spikesOrProbability='probability';
16 14

  
17 15

  
18 16
%% #3 pure tone, harmonic sequence or speech file input
19
signalType= 'tones';
20
duration=0.100;                 % seconds
21
duration=0.020;                 % seconds
22
sampleRate= 64000;
23
% toneFrequency= 250:250:8000;    % harmonic sequence (Hz)
24
toneFrequency= 2000;            % or a pure tone (Hz8
25

  
26
rampDuration=.005;              % seconds
27

  
28
% or
29 17
signalType= 'file';
30 18
fileName='twister_44kHz';
31
% fileName='new-da-44khz';
32 19

  
33 20

  
34 21
%% #4 rms level
35
% signal details
36
leveldBSPL=70;                  % dB SPL
22
leveldBSPL=60;                  % dB SPL
37 23

  
38 24

  
39 25
%% #5 number of channels in the model
......
42 28
lowestBF=250; 	highestBF= 8000; 
43 29
BFlist=round(logspace(log10(lowestBF), log10(highestBF), numChannels));
44 30

  
45
%   or specify your own channel BFs
46
% BFlist=toneFrequency;
47

  
48

  
49 31
%% #6 change model parameters
50 32
paramChanges=[];
51 33

  
52
% or
53
% Parameter changes can be used to change one or more model parameters
54
%  *after* the MAPparams file has been read
55
% This example declares only one fiber type with a calcium clearance time
56
% constant of 80e-6 s (HSR fiber) when the probability option is selected.
57
% switch AN_spikesOrProbability
58
%     case 'probability'
59
%         paramChanges={'IHCpreSynapseParams.tauCa=80e-6;'};
60
%     otherwise
61
%         paramChanges=[];
62
% end
63 34

  
64 35
%% delare showMap options
65 36
showMapOptions=[];  % use defaults
66 37

  
67 38
% or (example: show everything including an smoothed SACF output
68
    showMapOptions.showModelParameters=1;
39
    showMapOptions.printModelParameters=1;
69 40
    showMapOptions.showModelOutput=1;
70 41
    showMapOptions.printFiringRates=1;
71 42
    showMapOptions.showACF=0;
72
    showMapOptions.showEfferent=1;
43
    showMapOptions.showEfferent=0;
73 44

  
74 45
%% Generate stimuli
75 46

  
......
99 70
toc
100 71

  
101 72
% the model run is now complete. Now display the results
102
showMAP(showMapOptions)
73
UTIL_showMAP(showMapOptions)
103 74

  
104 75
toc
105 76
path(restorePath)

Also available in: Unified diff