
function mark_cells(picked_cells,corners_x,corners_y,linecolor,linewidth)
%Fred Cross June 2016 The Rockefeller University

%small box upper left of picked cells in pickedcells matrix

hdist=corners_x(1,2)-corners_x(1,1);
vdist=corners_y(2,1)-corners_y(1,1);


for row=1:size(picked_cells,1)
    for col=1:size(picked_cells,2)
        if picked_cells(row,col)  
            rectangle('Position',[corners_x(row,col)+2,corners_y(row,col)+4,linewidth+hdist/10,linewidth+vdist/10],'EdgeColor',linecolor,'FaceColor',linecolor);
          %  line([corners_x(row,col) ,corners_x(row,col+1) ,corners_x(row+1,col+1) ,corners_x(row+1,col) ,corners_x(row,col) ],[corners_y(row,col) ,corners_y(row,col+1) ,corners_y(row+1,col+1) ,corners_y(row+1,col) ,corners_y(row,col) ],'Color',linecolor,'LineWidth',linewidth);
    %%
        end
    end
end 