Skip to content

Commit 64e4663

Browse files
committed
minor debugging
1 parent 7c09e63 commit 64e4663

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

demo_script.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
end
2727

2828
%% fast initialization of spatial components using the greedyROI
29-
k_sub = 1; % temporal interleaving factor (for possible memory issues)
3029

3130
nr = 30; % number of components to be found
3231
params.gSig = 4; % std of gaussian (size of neuron)
@@ -113,6 +112,6 @@
113112
param.ind = [1,2,3,4];
114113
param.sx = 16;
115114
param.make_avi = 0;
116-
param.sc = 1;
117-
param.contours = Coor(param.ind);
115+
param.show_contours = 1;
116+
param.contours = Coor;
118117
make_patch_video(A_or,C_or,b2,f2,Yr,d1,d2,param)

utilities/make_patch_video.m

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function make_patch_video(A,C,b,f,Y,d1,d2,param)
2121
else
2222
sx = 32;
2323
end
24-
24+
2525
if isfield(param,'make_avi'); % save an avi video
2626
make_avi = param.make_avi;
2727
else
@@ -63,7 +63,8 @@ function make_patch_video(A,C,b,f,Y,d1,d2,param)
6363
if ismatrix(Y)
6464
Y = reshape(Y,d1,d2,T);
6565
end
66-
66+
sx = min(sx,floor(min(d1,d2)/2));
67+
6768
Coor.x = kron(ones(d2,1),(1:d1)');
6869
Coor.y = kron((1:d2)',ones(d1,1));
6970
nr = size(A,2);
@@ -117,7 +118,7 @@ function make_patch_video(A,C,b,f,Y,d1,d2,param)
117118
for t = 1:skp:T
118119
subplot(4,6,[1,2,7,8]); imagesc(Y(:,:,t),[0,mY]);
119120
title('Raw data','fontweight','bold','fontsize',16);
120-
axis square; axis off;
121+
axis equal; axis tight; axis off;
121122
if sc
122123
hold on;
123124
for i = 1:4
@@ -129,7 +130,7 @@ function make_patch_video(A,C,b,f,Y,d1,d2,param)
129130
subplot(4,6,[3,4,9,10]); imagesc(C_rec(:,:,t) - (1-sb)*C_np(:,:,t),[0,mC]); %title(sprintf('%i',t));
130131
title('Denoised','fontweight','bold','fontsize',16);
131132
xlabel(sprintf('Timestep %i out of %i',t,T),'fontweight','bold','fontsize',16);
132-
axis square; set(gca,'XTick',[],'YTick',[]);
133+
axis equal; axis tight; set(gca,'XTick',[],'YTick',[]);
133134
if sc
134135
hold on;
135136
for i = 1:4
@@ -139,10 +140,10 @@ function make_patch_video(A,C,b,f,Y,d1,d2,param)
139140
end
140141
subplot(4,6,[5,6,11,12]); imagesc(Y(:,:,t)-C_rec(:,:,t),[-mC/2,mC/2]);
141142
title('Residual 2x','fontweight','bold','fontsize',16);
142-
axis square; axis off;
143+
axis equal; axis tight; axis off;
143144
subplot(4,6,[13,14,19,20]); imagesc(C_np(:,:,t),[0,mB]);
144145
title({'Background'; 'synchronized activity'},'fontweight','bold','fontsize',16);
145-
axis square; axis off;
146+
axis equal; axis tight; axis off;
146147

147148
for i = 1:4
148149
subplot(4,6,14+i); imagesc(A_com(:,:,i)*C(ind(i),t),[0,up(i)/1.2]); axis square;

0 commit comments

Comments
 (0)