

fi = field_integral(0,0,4000/0.511,Bmap,0.003);

figure;set(gcf,'color','w');
plot(fi(:,1),fi(:,2)*1e6); hold on;
plot(fi(:,1),fi(:,3)*1e6,'color','red'); hold off;
xlabel('z position (m)'); ylabel('second integral (um)');
legend('x','y','location','best');
enhance_plot('arial',20,2,8)

figure;set(gcf,'color','w');
plot(fi(:,1),fi(:,4)*1e3); hold on;
plot(fi(:,1),fi(:,5)*1e3,'color','red'); hold off;
xlabel('z position (m)'); ylabel('first integral (mrad)');
legend('x','y','location','best');
enhance_plot('arial',20,2,8)
