function making_figure_panel_may31_2010
%used to make the figure overlaying a microperfusion and macroperfusion trace at the same synapse for the methods paper
%scaling to 38.54% after stripping the bounding box will be required

close all, tic
[little,plittle]=create_basic_text_file('patch20070322T000850',1,0,[],0); %file_to_read,electroaudio,windowing,returnrange,save_that_sht
[big,pbig]=create_basic_text_file('patch20070321T234702',1,0,[],0);

little=little*100;
little=little(45970:end,6);
little=little-mean(little(1:4500));
little([5500 5501 5521 5522 9500 9501 9521 9522 10001 10021 10022])=0; %note that originally little([5000 5001 5021 5022 5500 5501  5521 5522 9500 9501 9521 9522 10001 10021 10022])= was used to blank all the stimulus artifacts, but then the first artifact was retained for clarity

big=big*1000;
big=big(32964:end,1);
big=big-mean(big(1:4500));
%big([5001 5051])=0;

% figure, plot(big,'color','k','linewidth',.5),hold on, plot(ll,'k','linewidth',.5)
% axis([4000 14000 -1500 200]),rectangle('position',[4750 -20 900 31],'linewidth',.1,'facecolor','k','edgecolor','k')%,set(findobj('type','line'),'linewidth',2)
% set(gca,'xtick',[5000 7500 10000 12500]),set(gca,'xticklabel',[0 250 500 750]),xlabel('Time (ms)')
% set(gca,'ytick',[-1000 -500 0]),set(gca,'yticklabel',[-1 -0.5 0]),ylabel('Membrane current (nA)')

%downsampled version
downsamplestep=10
figure, plot([1:downsamplestep:length(big)],big([1:downsamplestep:length(big)]),'color','k','linewidth',.1),hold on, plot([1:downsamplestep:length(little)],little([1:downsamplestep:length(little)]),'color','k','linewidth',.1)
axis([4000 14000 -1500 200]),rectangle('position',[4750 -20 750 31],'linewidth',.1,'facecolor','k','edgecolor','k')%,set(findobj('type','line'),'linewidth',2)
set(gca,'xtick',[5000 7500 10000 12500]),set(gca,'xticklabel',[0 250 500 750]),xlabel('time (ms)')
set(gca,'ytick',[-1000 0]),set(gca,'yticklabel',[-1 0]),ylabel('Imem (nA)')

figure, plot(little,'k','linewidth',2),axis([4750 5499 -20 10])
set(gca,'xtick',[4800 5000 5200 5400]),set(gca,'xticklabel',[-20 0 20 40]),xlabel('time (ms)')
set(gca,'yaxislocation','right')
set(gca,'ytick',[-10 0]),ylabel('Imem (pA)')

toc