Skip to content

Commit

Permalink
Adjusted bilinear histogram rendering image space for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Ades91 committed Dec 15, 2020
1 parent db5edb8 commit fbc9729
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion funcs/getDcorrLocalMax.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
[A,ind] = max(d);
elseif ind == 1
break;
elseif (A - min(d(ind:end))) >= 0.001
elseif (A - min(d(ind:end))) >= 0.0005
break;
else
d(end) = [];
Expand Down
8 changes: 4 additions & 4 deletions funcs/smlmHist.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
% FOV should be in same units as data and pps
%
% Outputs:
% im Rescaled value
% im Bilinear histogram rendered image
%
% ---------------------------------------
% Adrien Descloux - adrien.descloux@epfl.ch,
Expand Down Expand Up @@ -39,9 +39,9 @@
pps = FOVx/Nx;
FOVy = pps*Ny;

% map data in image space
data(:,1) = linmap(data(:,1),0,FOVx,1,Nx);
data(:,2) = linmap(data(:,2),0,FOVy,1,Ny);
% map data in Matlab image space
data(:,1) = linmap(data(:,1),0,FOVx,0.5,Nx+0.5);
data(:,2) = linmap(data(:,2),0,FOVy,0.5,Ny+0.5);
% filter data out of the range [0, FOV]
x0 = floor(data(:,1)); y0 = floor(data(:,2));
map = x0 < Nx & x0 > 0 & y0 < Ny & y0 > 0;
Expand Down

0 comments on commit fbc9729

Please sign in to comment.