Skip to content

Commit 56bd0dd

Browse files
committed
v3.2.4
Bugfix: Manual GUI: projection display is correctly updated. Previously the second unit selection (shown in red) required two right clicks to update.
1 parent 29e64bd commit 56bd0dd

File tree

4 files changed

+48
-20
lines changed

4 files changed

+48
-20
lines changed

change_log.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
J. James Jun
33

44
--------------------------------------------------------------------
5+
[2019/1/12: v3.2.4]
6+
Bugfix: Manual GUI: projection display is correctly updated.
7+
Previously the second unit selection (shown in red) required two right clicks to update.
8+
59
[2019/1/3: v3.2.3]
610
Bugfix: incorrect "gather" function was called for R2017b when Bigdata toolbox is installed.
711
Faster and more robust fft_clean operation (run if `fft_thresh` > 0)

default.prm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ fInverse_file = 0; % Set to 1 to flip the polarity of the signal
1616
header_offset = 0; % File header offset (set to 0 for files containing no header info (e.g. WHISPER format)
1717

1818
% #Execution parameters
19-
version = 'v3.2.3'; % JRCLUST version. Updated on Jan 3, 2018
19+
version = 'v3.2.4'; % JRCLUST version. Updated on Jan 4, 2018
2020
fVerbose = 0; % Verbose flag, set to 0 to suppress displaying extra information
2121
fParfor = 1; % Use Multiple CPU cores (if parallel processing toolbox is installed)
2222
fGpu = 1; % Use GPU if parallel processing toolbox is installed

jrc3.m

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5757,7 +5757,7 @@ function keyPressFcn_FigProj_(hFig, event)
57575757
figure_wait_(1);
57585758
switch lower(event.Key)
57595759
case {'uparrow', 'downarrow'}
5760-
rescale_FigProj_(event, hFig, S_fig);
5760+
rescale_FigProj_(event, hFig, S_fig, S0);
57615761

57625762
case {'leftarrow', 'rightarrow'} % change channels
57635763
fPlot = 0;
@@ -14062,22 +14062,19 @@ function auto_scale_proj_time_(S0, fPlot)
1406214062
if nargin<2, fPlot = 0; end
1406314063

1406414064
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);
1407114067
if isempty(mrMin2) || isempty(mrMax2)
1407214068
cmrAmp = {mrMin1, mrMax1};
1407314069
else
1407414070
cmrAmp = {mrMin1, mrMax1, mrMin2, mrMax2};
1407514071
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);
1407914074

14080-
[hFig, S_fig] = get_fig_cache_('FigTime');
14075+
14076+
% Update time
14077+
[hFig_time, S_fig_time] = get_fig_cache_('FigTime');
1408114078
iSite = S0.S_clu.viSite_clu(S0.iCluCopy);
1408214079
[vrFet0, vrTime0] = getFet_site_(iSite, [], S0); % plot background
1408314080
[vrFet1, vrTime1, vcYlabel, viSpk1] = getFet_site_(iSite, S0.iCluCopy, S0); % plot iCluCopy
@@ -14087,14 +14084,15 @@ function auto_scale_proj_time_(S0, fPlot)
1408714084
[vrFet2, vrTime2, vcYlabel, viSpk2] = getFet_site_(iSite, S0.iCluPaste, S0); % plot iCluCopy
1408814085
vrFet = [vrFet0(:); vrFet1(:); vrFet2(:)];
1408914086
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);
1409214089

14090+
% plot
1409314091
if fPlot
14094-
keyPressFcn_cell_(get_fig_cache_('FigWav'), {'j', 't'});
14092+
keyPressFcn_cell_(get_fig_cache_('FigWav'), {'j', 't'}, S0);
1409514093
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);
1409814096
end
1409914097
end %func
1410014098

@@ -14965,7 +14963,7 @@ function uistack_(h, vc)
1496514963
if isempty(S_clu), S_clu = get0_('S_clu'); end
1496614964

1496714965
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);
1496914967
else
1497014968
csText_clu = arrayfun(@(i)sprintf('%d', i), 1:S_clu.nClu, 'UniformOutput', 0);
1497114969
end
@@ -17865,8 +17863,8 @@ function plot_aux_rate_(fSelectedUnit)
1786517863
% 9/29/17 JJJ: Displaying the version number of the program and what's used. #Tested
1786617864
function [vcVer, vcDate, vcVer_used] = jrc_version_(vcFile_prm)
1786717865
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';
1787017868
vcVer_used = '';
1787117869
if nargout==0
1787217870
fprintf('%s (%s) installed\n', vcVer, vcDate);

prb/imec2aux.prb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
% Order of the probe sites in the recording file
2+
channels = 1 + [40 103 39 104 41 102 38 105 42 101 37 106 43 100 36 107, 44 99 35 108 45 98 34 109 46 97 33 110 47 96 32 111, 48 127 63 112 49 126 62 113 50 125 61 114 51 124 60 115, 52 116 59 123 53 117 58 122 54 118 57 121 55 119 56 120, 8 71 7 72 9 70 6 73 10 74 5 69 11 75 4 68, 12 76 3 67 13 77 2 66 14 78 1 65 15 79 0 64, 16 80 31 95 17 81 30 94 18 82 29 93 19 83 28 92, 20 84 27 91 21 85 26 90 22 86 25 89 23 87 24 88];
3+
channels(end+1:end+4) = 129:132;
4+
5+
% Site location in micrometers (x and y)
6+
geometry = zeros(numel(channels), 2);
7+
geometry(1:2:128,1) = 0;
8+
geometry(2:2:128,1) = 28;
9+
geometry(1:2:128,2) = 20*(0:63);
10+
geometry(2:2:128,2) = geometry(1:2:128,2);
11+
12+
% Reference sites are being excluded
13+
ref_sites = [1 18 33 50 65 82 97 114];
14+
channels(ref_sites) = [];
15+
geometry(ref_sites,:) = [];
16+
17+
% Recording contact pad size in micrometers. Height x width
18+
pad = [12 12];
19+
20+
% Default prm
21+
maxSite = 6.5;
22+
um_per_pix = 20;
23+
nSites_ref = 8;
24+
25+
% Shanks
26+
% shank = ones(size(channels)); shank(geometry(:,1)>0)=2;

0 commit comments

Comments
 (0)