Mercurial > hg > map
changeset 24:a5e4a43c1673
major revision looks stable
author | Ray Meddis <rmeddis@essex.ac.uk> |
---|---|
date | Thu, 16 Jun 2011 16:43:49 +0100 |
parents | 6cce421531e2 |
children | d2c4c07df02c |
files | Help and reference data/MAPlog.doc Help and reference data/May 20 parameters.doc multithreshold 1.46/MAPmodel.m multithreshold 1.46/savedData/mostRecentResults.mat multithreshold 1.46/subjGUI_MT.m multithreshold 1.46/testBM.m multithreshold 1.46/testPhaseLocking.m parameterStore/MAPparamsNormal.m testPrograms/demoTwisterProbability.m testPrograms/demoTwisterSpikes.m testPrograms/test_MAP1_14.m userPrograms/Pavel_MAP1_14.m utilities/UTIL_showMAP.m |
diffstat | 13 files changed, 52 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/multithreshold 1.46/MAPmodel.m Wed Jun 15 15:06:10 2011 +0100 +++ b/multithreshold 1.46/MAPmodel.m Thu Jun 16 16:43:49 2011 +0100 @@ -4,7 +4,7 @@ global outerMiddleEarParams DRNLParams AN_IHCsynapseParams savePath=path; -addpath('..\MAP') +addpath(['..' filesep 'MAP'], ['..' filesep 'utilities']) modelResponse=[]; MacGregorResponse=[];
--- a/multithreshold 1.46/subjGUI_MT.m Wed Jun 15 15:06:10 2011 +0100 +++ b/multithreshold 1.46/subjGUI_MT.m Thu Jun 16 16:43:49 2011 +0100 @@ -1554,7 +1554,7 @@ global outerMiddleEarParams DRNLParams AN_IHCsynapseParams savePath=path; -addpath('..\MAP') +addpath(['..' filesep 'MAP'], ['..' filesep 'utilities']) modelResponse=[]; MacGregorResponse=[];
--- a/multithreshold 1.46/testBM.m Wed Jun 15 15:06:10 2011 +0100 +++ b/multithreshold 1.46/testBM.m Thu Jun 16 16:43:49 2011 +0100 @@ -33,7 +33,7 @@ dbstop if error figure(3), clf -% set(gcf,'position',[276 33 331 645]) +set(gcf,'position',[280 350 327 326]) set(gcf,'name','DRNL - BM') finalSummary=[];
--- a/multithreshold 1.46/testPhaseLocking.m Wed Jun 15 15:06:10 2011 +0100 +++ b/multithreshold 1.46/testPhaseLocking.m Thu Jun 16 16:43:49 2011 +0100 @@ -1,8 +1,10 @@ function testPhaseLocking testFrequencies=[250 500 1000 2000 4000 8000]; -levels=-20:10:80; +levels=50:10:80; figure(14), clf +set(gcf,'position', [980 36 383 321]) +set(gcf,'name', 'phase locking') allStrengths=zeros(length(testFrequencies), length(levels)); peakVectorStrength=zeros(1,length(testFrequencies)); freqCount=0;
--- a/parameterStore/MAPparamsNormal.m Wed Jun 15 15:06:10 2011 +0100 +++ b/parameterStore/MAPparamsNormal.m Thu Jun 16 16:43:49 2011 +0100 @@ -61,7 +61,7 @@ % OMEParams.rateToAttenuationFactor=0; % * N(all ICspikes) % 'probability model': Ar based on AN firing probabilities (LSR) -OMEParams.rateToAttenuationFactorProb=0.003;% * N(all ANrates) +OMEParams.rateToAttenuationFactorProb=0.01;% * N(all ANrates) % OMEParams.rateToAttenuationFactorProb=0;% * N(all ANrates) % asymptote should be around 100-200 ms
--- a/testPrograms/demoTwisterProbability.m Wed Jun 15 15:06:10 2011 +0100 +++ b/testPrograms/demoTwisterProbability.m Thu Jun 16 16:43:49 2011 +0100 @@ -3,44 +3,44 @@ % MAPdemo runs the MATLAB auditory periphery model (MAP1_14) as far as % the AN (probabilities) or IC (spikes) with graphical output -% Things you might want to change; #1 - #5 +restorePath=path; +addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... + ['..' filesep 'utilities']) %% #1 parameter file name MAPparamsName='Normal'; -%% #2 probability (fast) or spikes (slow) representation +%% #2 probability (fast) AN_spikesOrProbability='probability'; -%% #3 pure tone, harmonic sequence or speech file input +%% #3 speech file input signalType= 'file'; fileName='twister_44kHz'; %% #4 rms level -leveldBSPL=60; % dB SPL +leveldBSPL=60; % dB SPL %% #5 number of channels in the model % 21-channel model (log spacing) numChannels=21; -lowestBF=250; highestBF= 8000; +lowestBF=250; highestBF= 8000; BFlist=round(logspace(log10(lowestBF), log10(highestBF), numChannels)); -%% #6 change model parameters +%% #6 no change to model parameters paramChanges=[]; %% delare showMap options -showMapOptions=[]; % use defaults - -% or (example: show everything including an smoothed SACF output - showMapOptions.printModelParameters=1; - showMapOptions.showModelOutput=1; - showMapOptions.printFiringRates=1; - showMapOptions.showACF=0; - showMapOptions.showEfferent=0; +showMapOptions.printModelParameters=1; +showMapOptions.showModelOutput=1; +showMapOptions.printFiringRates=1; +showMapOptions.showACF=0; +showMapOptions.showEfferent=0; +showMapOptions.surfProbability=1; % 2D plot of HSR response %% Generate stimuli @@ -51,9 +51,9 @@ case 'tones' inputSignal=createMultiTone(sampleRate, toneFrequency, ... leveldBSPL, duration, rampDuration); - + case 'file' - [inputSignal sampleRate]=wavread(fileName); + [inputSignal sampleRate]=wavread(fileName); inputSignal(:,1); targetRMS=20e-6*10^(leveldBSPL/20); rms=(mean(inputSignal.^2))^0.5; @@ -67,6 +67,7 @@ MAP1_14(inputSignal, sampleRate, BFlist, ... MAPparamsName, AN_spikesOrProbability, paramChanges); + toc % the model run is now complete. Now display the results
--- a/testPrograms/demoTwisterSpikes.m Wed Jun 15 15:06:10 2011 +0100 +++ b/testPrograms/demoTwisterSpikes.m Thu Jun 16 16:43:49 2011 +0100 @@ -3,16 +3,20 @@ % MAPdemo runs the MATLAB auditory periphery model (MAP1_14) as far as % IC (spikes) with graphical output +restorePath=path; +addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... + ['..' filesep 'utilities']) + %% #1 parameter file name MAPparamsName='Normal'; -%% #2 probability (fast) or spikes (slow) representation +%% #2 spikes (slow) representation AN_spikesOrProbability='spikes'; -%% #3 pure tone, harmonic sequence or speech file input +%% #3 speech file input signalType= 'file'; fileName='twister_44kHz'; @@ -45,8 +49,6 @@ %% Generate stimuli dbstop if error -restorePath=path; -addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore']) switch signalType case 'tones' inputSignal=createMultiTone(sampleRate, toneFrequency, ...
--- a/testPrograms/test_MAP1_14.m Wed Jun 15 15:06:10 2011 +0100 +++ b/testPrograms/test_MAP1_14.m Thu Jun 16 16:43:49 2011 +0100 @@ -32,6 +32,9 @@ % % When the demonstration is satisfactory, freeze it by renaming it <demoxx> +restorePath=path; +addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... + ['..' filesep 'utilities']) %% #1 parameter file name MAPparamsName='Normal'; @@ -48,9 +51,9 @@ %% #3 pure tone, harmonic sequence or speech file input signalType= 'tones'; sampleRate= 100000; -duration=0.010; % seconds +duration=0.50; % seconds % toneFrequency= 250:250:8000; % harmonic sequence (Hz) -toneFrequency= 4000; % or a pure tone (Hz8 +toneFrequency= 500; % or a pure tone (Hz8 rampDuration=.005; % seconds % or @@ -60,7 +63,7 @@ %% #4 rms level % signal details -leveldBSPL= 70; % dB SPL +leveldBSPL= 90; % dB SPL %% #5 number of channels in the model @@ -140,10 +143,6 @@ disp([num2str(numChannels) ' channel model']) disp('Computing ...') -restorePath=path; -addpath (['..' filesep 'MAP']) -addpath (['..' filesep 'utilities']) - MAP1_14(inputSignal, sampleRate, BFlist, ... MAPparamsName, AN_spikesOrProbability, paramChanges); toc
--- a/userPrograms/Pavel_MAP1_14.m Wed Jun 15 15:06:10 2011 +0100 +++ b/userPrograms/Pavel_MAP1_14.m Thu Jun 16 16:43:49 2011 +0100 @@ -32,6 +32,9 @@ % % When the demonstration is satisfactory, freeze it by renaming it <demoxx> +restorePath=path; +addpath (['..' filesep 'MAP'], ['..' filesep 'wavFileStore'], ... + ['..' filesep 'utilities']) %% #1 parameter file name MAPparamsName='Normal'; @@ -144,12 +147,9 @@ disp([num2str(numChannels) ' channel model']) disp('Computing ...') -restorePath=path; -addpath (['..' filesep 'MAP']) MAP1_14(inputSignal, sampleRate, BFlist, ... MAPparamsName, AN_spikesOrProbability, paramChanges); -path(restorePath) toc % the model run is now complete. Now display the results
--- a/utilities/UTIL_showMAP.m Wed Jun 15 15:06:10 2011 +0100 +++ b/utilities/UTIL_showMAP.m Thu Jun 16 16:43:49 2011 +0100 @@ -1,13 +1,16 @@ function UTIL_showMAP (options) +% UTIL_showMAP produces summaries of the output from MAP's mmost recent run +% All MAP outputs are stored in global variables and UTIL_showMAP +% simply assumes that they are in place. +% % options -% options.printModelParameters=1; -% options.showModelOutput=1; -% options.printFiringRates=1; -% options.showACF=1; -% options.showEfferent=1; -% options.surfProbability=0; -% options.fileName=[]; -% options.surfProbability=0; +% options.printModelParameters=1; % print model parameters +% options.showModelOutput=1; % plot all stages output +% options.printFiringRates=1; % mean activity at all stages +% options.showACF=1; % SACF (probabilities only) +% options.showEfferent=1; % plot of efferent activity +% options.surfProbability=0; % HSR (probability) surf plot +% options.fileName=[]; % parameter filename for plot title dbstop if warning @@ -27,7 +30,8 @@ options=[]; end % defaults (plot staged outputs and print rates only) -if ~isfield(options,'printModelParameters'),options.printModelParameters=0;end +if ~isfield(options,'printModelParameters') + options.printModelParameters=0; end if ~isfield(options,'showModelOutput'),options.showModelOutput=1;end if ~isfield(options,'printFiringRates'),options.printFiringRates=1;end if ~isfield(options,'showACF'),options.showACF=0;end