diff testPrograms/showMAP.m @ 21:c489ebada16e

pre Oldenburg changes
author Ray Meddis <rmeddis@essex.ac.uk>
date Mon, 13 Jun 2011 18:13:29 +0100
parents 37a379b27cff
children
line wrap: on
line diff
--- a/testPrograms/showMAP.m	Tue Jun 07 09:53:50 2011 +0100
+++ b/testPrograms/showMAP.m	Mon Jun 13 18:13:29 2011 +0100
@@ -1,4 +1,4 @@
-function showMAP (options)
+function showMAP ()
 % defaults
 % options.showModelParameters=1;
 % options.showModelOutput=1;
@@ -17,6 +17,7 @@
     CNoutput  ICoutput ICmembraneOutput ICfiberTypeRates MOCattenuation
 global OMEParams DRNLParams IHC_cilia_RPParams IHCpreSynapseParams
 global AN_IHCsynapseParams MacGregorParams MacGregorMultiParams
+global showMapOptions
 
 
 restorePath=path;
@@ -172,21 +173,28 @@
     colorbar
 end
 
+if options.surfProbability
 %% surface plot of probability
-if options.surfProbability
     figure(97), clf
     % select only HSR fibers at the bottom of the matrix
     ANprobRateOutput= ANprobRateOutput(end-length(savedBFlist)+1:end,:);
-    [nY nX]=size(ANprobRateOutput);
-    time=dt*(1:nX);
-    surf(time, savedBFlist, ANprobRateOutput)
+    PSTHbinWidth=0.001;
+    PSTH=UTIL_PSTHmakerb(ANprobRateOutput, ANdt, PSTHbinWidth);
+    [nY nX]=size(PSTH);
+    PSTH=PSTH(:,200:end);
+    [nY nX]=size(PSTH);
+    time=PSTHbinWidth*(1:nX);
+    surf(time, savedBFlist, PSTH)
     shading interp
     set(gca, 'yScale','log')
-    xlim([0 max(time)]), ylim([0 max(savedBFlist)]), zlim([0 1000])
+    xlim([0 max(time)])
+    ylim([0 max(savedBFlist)])
+    zlim([0 1000])
     xlabel('time (s)')
     ylabel('best frequency (Hz)')
     zlabel('spike rate')
     view([-20 60])
+%     view([0 90])
     title ([options.fileName ':   ' num2str(signalRMSdb,'% 3.0f') ' dB'])
 end