rsc=[.5:9.5 15:10:105]; %radial bin centres (cm)
zsc=10:20:2000;   %Longitudinal Bin Centres (cm)
Eo=1e11; %Primary Energy
Do=[1e3 0 7.5]; % Position of observer 
fs=1e6; %sampling frequency
t_axis=(-512:511)/fs; %time axis for plot (default 1024 points)
atten=1; % Learned's attenuation
nmc=1e4; % Number of MC points 
tsmc=ShowerParm(rsc,zsc,Eo,'Sloan');
%as the 10-100cm bins are 10x wider need to scale by a factor of 10 
tsmc=tsmc*diag(kron([1 10],ones(1,10)));
%generate MC points. Note bin EDGES need to be provided 
pointsc=MCGEn(tsmc,[0 zsc+10],[0 rsc+[0.5*ones(1,10) 5*ones(1,10)]],nmc);
%Convert to cartesian
[x,y,z]=pol2cart(rand(nmc,1)*2*pi,pointsc(:,2),pointsc(:,1));
% Convert fom cm to m 
points=[x y z]*1e-2;
tic % start stopwatch
p=kernelfr2(points,Do,log10(Eo),atten,10);
toc %generate time taken for integration
% Now plot
set(gca,'fonts',15)
plot(t_axis*1e3,p),xlabel('Time (ms)'),ylabel('Pressure (Pa)')  
set(gca,'xlim',[-0.4 0.4])
title('Sample Pulse at 1 km')