@@ -5757,7 +5757,7 @@ function keyPressFcn_FigProj_(hFig, event)
5757
5757
figure_wait_(1);
5758
5758
switch lower(event.Key)
5759
5759
case {'uparrow', 'downarrow'}
5760
- rescale_FigProj_(event, hFig, S_fig);
5760
+ rescale_FigProj_(event, hFig, S_fig, S0 );
5761
5761
5762
5762
case {'leftarrow', 'rightarrow'} % change channels
5763
5763
fPlot = 0;
@@ -14062,22 +14062,19 @@ function auto_scale_proj_time_(S0, fPlot)
14062
14062
if nargin<2, fPlot = 0; end
14063
14063
14064
14064
autoscale_pct = get_set_(S0.P, 'autoscale_pct', 99.5);
14065
- [hFig, S_fig] = get_fig_cache_('FigProj');
14066
- % vrY = [S_fig.hPlot0.YData(:); S_fig.hPlot1.YData(:); S_fig.hPlot2.YData(:)];
14067
- [mrMin0, mrMax0, mrMin1, mrMax1, mrMin2, mrMax2] = fet2proj_(S0, S_fig.viSites_show);
14068
- % mrAmp = [mrMin0, mrMax0, mrMin1, mrMax1, mrMin2, mrMax2];
14069
- % mrAmp = [mrMin1, mrMax1, mrMin2, mrMax2];
14070
- % S_fig.maxAmp = quantile(mrAmp(:), autoscale_pct/100);
14065
+ [hFig_proj, S_fig_proj] = get_fig_cache_('FigProj');
14066
+ [mrMin0, mrMax0, mrMin1, mrMax1, mrMin2, mrMax2] = fet2proj_(S0, S_fig_proj.viSites_show);
14071
14067
if isempty(mrMin2) || isempty(mrMax2)
14072
14068
cmrAmp = {mrMin1, mrMax1};
14073
14069
else
14074
14070
cmrAmp = {mrMin1, mrMax1, mrMin2, mrMax2};
14075
14071
end
14076
- S_fig.maxAmp = max(cellfun(@(x)quantile(x(:), autoscale_pct/100), cmrAmp));
14077
- % S_fig.maxAmp %debug
14078
- set(hFig, 'UserData', S_fig);
14072
+ S_fig_proj.maxAmp = max(cellfun(@(x)quantile(x(:), autoscale_pct/100), cmrAmp));
14073
+ set(hFig_proj, 'UserData', S_fig_proj);
14079
14074
14080
- [hFig, S_fig] = get_fig_cache_('FigTime');
14075
+
14076
+ % Update time
14077
+ [hFig_time, S_fig_time] = get_fig_cache_('FigTime');
14081
14078
iSite = S0.S_clu.viSite_clu(S0.iCluCopy);
14082
14079
[vrFet0, vrTime0] = getFet_site_(iSite, [], S0); % plot background
14083
14080
[vrFet1, vrTime1, vcYlabel, viSpk1] = getFet_site_(iSite, S0.iCluCopy, S0); % plot iCluCopy
@@ -14087,14 +14084,15 @@ function auto_scale_proj_time_(S0, fPlot)
14087
14084
[vrFet2, vrTime2, vcYlabel, viSpk2] = getFet_site_(iSite, S0.iCluPaste, S0); % plot iCluCopy
14088
14085
vrFet = [vrFet0(:); vrFet1(:); vrFet2(:)];
14089
14086
end
14090
- S_fig .maxAmp = quantile(vrFet, autoscale_pct/100);
14091
- set(hFig , 'UserData', S_fig );
14087
+ S_fig_time .maxAmp = quantile(vrFet, autoscale_pct/100);
14088
+ set(hFig_time , 'UserData', S_fig_time );
14092
14089
14090
+ % plot
14093
14091
if fPlot
14094
- keyPressFcn_cell_(get_fig_cache_('FigWav'), {'j', 't'});
14092
+ keyPressFcn_cell_(get_fig_cache_('FigWav'), {'j', 't'}, S0 );
14095
14093
else
14096
- rescale_FigProj_(S_fig .maxAmp);
14097
- rescale_FigTime_(S_fig .maxAmp, S0, S0.P);
14094
+ rescale_FigProj_(S_fig_proj .maxAmp, hFig_proj, S_fig_proj, S0 );
14095
+ rescale_FigTime_(S_fig_time .maxAmp, S0, S0.P);
14098
14096
end
14099
14097
end %func
14100
14098
@@ -14965,7 +14963,7 @@ function uistack_(h, vc)
14965
14963
if isempty(S_clu), S_clu = get0_('S_clu'); end
14966
14964
14967
14965
if fText
14968
- csText_clu = arrayfun(@(i)sprintf('%d (%d)', i, S_clu.vnSpk_clu(i)), 1:S_clu.nClu, 'UniformOutput', 0);
14966
+ csText_clu = arrayfun(@(i)sprintf('%d(%d)', i, S_clu.vnSpk_clu(i)), 1:S_clu.nClu, 'UniformOutput', 0);
14969
14967
else
14970
14968
csText_clu = arrayfun(@(i)sprintf('%d', i), 1:S_clu.nClu, 'UniformOutput', 0);
14971
14969
end
@@ -17865,8 +17863,8 @@ function plot_aux_rate_(fSelectedUnit)
17865
17863
% 9/29/17 JJJ: Displaying the version number of the program and what's used. #Tested
17866
17864
function [vcVer, vcDate, vcVer_used] = jrc_version_(vcFile_prm)
17867
17865
if nargin<1, vcFile_prm = ''; end
17868
- vcVer = 'v3.2.3 ';
17869
- vcDate = '1/3 /2018';
17866
+ vcVer = 'v3.2.4 ';
17867
+ vcDate = '1/4 /2018';
17870
17868
vcVer_used = '';
17871
17869
if nargout==0
17872
17870
fprintf('%s (%s) installed\n', vcVer, vcDate);
0 commit comments