source: ETALON/CLIO/2017_CLIO_report/scripts/Beam_size.m @ 728

Last change on this file since 728 was 728, checked in by hodnevuc, 7 years ago
File size: 572 bytes
Line 
1close all;clear all;clc
2x0=[5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6.0 6.1]*7.94;%mm
3Ibeam=-[630 630 630 630 630 626 612 540 360 150 0]+630; %mV
4f = fit(x0',Ibeam','gauss1')
5A=f.a1;
6Xpos=f.b1;
7Sigma_b=f.c1/sqrt(2);
8figure;
9plot(x0,Ibeam,'ok','linew',2)
10x=min(x0):0.1:max(x0)+1;
11hold on
12Gauss=A.*exp(-((x-Xpos)/(sqrt(2)*Sigma_b)).^2);
13plot(x,Gauss,'r','linew',2)
14% set(gca,'fontsize',16)
15grid on
16legend('Data','Gauss fit',2)
17title(['x_{pos}=' num2str(Xpos) ' mm; \sigma=' num2str(Sigma_b) ' mm '])
18xlabel('Grating position, [mm]')
19ylabel('Amplitude, [a.u.]')
Note: See TracBrowser for help on using the repository browser.