% This program can draw calcium signal deltaF/F psudocolor heatmap 
% Author:  Yuting Cui
%          National Institute of Biological Sciences (NIBS), Beijing 102206, China
%          cuiyuting@nibs.ac.cn

function hotmapimaging
baseline=imread('c1c2t01.jpg');%%请在baseline输入baseline的图片的名称
smap20=imread('c1c2t11.jpg');%%请在image输入刺激图片的名称
baselinegdata=rgb2gray(baseline);
imagegdata=rgb2gray(smap20);
 baselinegdata = double(baselinegdata);baselinegdata=mean(mean(baselinegdata));
  peakdata=double(imagegdata);
%     peakdata=medfilt2(peakdata, [2,2]); 
  df=peakdata-baselinegdata;
  dff0=df./baselinegdata;
  df=peakdata-baselinegdata;
  dff0=df./baselinegdata;
figure;
imagesc(dff0);hold on
%   patch([70,82.6,82.6,70],[5 5 3 3],'white');
set(gca,'looseInset',[0 0 0 0]);
end

