source: ETALON/CLIO/Analysis/Data24May/Bpower4.m @ 719

Last change on this file since 719 was 719, checked in by hodnevuc, 7 years ago
File size: 3.8 KB
Line 
1close all; clear all; clc;
2load analyzeBP.mat
3
4
5%% Spectrum
6
7
8figure(9)
9hold on
10bp=3
11Spectrum=amp(bp,:).*exp(lamb(bp,:)*separation);
12errorbar(48:7:118,Spectrum,Spectrum.*sqrt((Ierrp(bp,:,1)./amp(bp,:)).^2+(separation*Ierrp(bp,:,2)).^2),'-k','linewidth',2)
13
14%  plot(48:7:118, SP_spec_1(1:2:(end-1))*5e+16,'k','linewidth',2)
15load('GFW/Spec3.mat')
16 plot(48:7:118, Spectr(1:11)./max(Spectr(1:11))*max(Spectrum),'--or','linewidth',2)
17load('GFW/Spec.mat')
18 plot(48:7:118, Spectr(1:11)./max(Spectr(1:11))*max(Spectrum),'-^r','linewidth',2)
19load('GFW/Spec7.mat')
20 plot(48:7:118, Spectr(1:11)./max(Spectr(1:11))*max(Spectrum),'-.*r','linewidth',2)
21
22set(gca,'fontsize',16)
23
24legend('BP=2','3ps','5ps','7ps','location','southeast')
25xlabel('Angle, [deg.]')
26ylabel('Amplitude, [a.u.]')
27title('Spectrum')
28grid on
29ylim([0 0.02])
30load('GFW/SEY.mat')
31
32
33figure(10)
34  [hc hc]=contourf (48:7:118, Bphase, amp.*exp(lamb.*separation))
35    set(hc,'LineStyle','none');
36
37 set(gca,'fontsize',16)
38 xlabel('Angle, [deg.]')
39 ylabel('Buncher power, [a.u.]')
40 title('Spectrum map')
41 
42 
43 load('GFW/SEYP5.mat')
44
45figure(10341)
46 [hc hc]=contourf(300./(6*(1-cos((48:7:118)/180*pi))), Bphase, amp.*exp(lamb.*(-5))./repmat((Integral(1:11)),[7 1])*1e-17,40)
47 colorbar
48  set(hc,'LineStyle','none');
49 set(gca,'fontsize',16)
50 xlabel('Frequency, [GHz]')
51 ylabel('Buncher power, [a.u.]')
52 title('Form Factor (BGS=5 mm)')
53
54
55load('GFW/SEY.mat')
56
57 figure(10342)
58 [hc hc]=contourf(300./(6*(1-cos((48:7:118)/180*pi))), Bphase, amp.*exp(lamb.*(-10))./repmat((Integral(1:11)),[7 1])*1e-17,40)
59 colorbar
60  set(hc,'LineStyle','none');
61 set(gca,'fontsize',16)
62 xlabel('Frequency, [GHz]')
63 ylabel('Buncher power, [a.u.]')
64 title('Form Factor (BGS=10 mm)')
65 
66 
67load('GFW/SEYP15.mat')
68
69 figure(10343)
70 [hc hc]=contourf(300./(6*(1-cos((48:7:118)/180*pi))), Bphase, amp.*exp(lamb.*(-15))./repmat((Integral(1:11)),[7 1])*1e-17,40)
71 colorbar
72  set(hc,'LineStyle','none');
73 set(gca,'fontsize',16)
74 xlabel('Frequency, [GHz]')
75 ylabel('Buncher power, [a.u.]')
76 title('Form Factor (BGS=15 mm)')
77
78% figure(11)
79% [hc hc]=contourf(300./(6*(1-cos((48:7:118)/180*pi))), Bphase, amp.*exp(lamb.*separation),40)
80%
81%  colorbar
82%   set(hc,'LineStyle','none');
83%  set(gca,'fontsize',16)
84%  xlabel('Frequency, [GHz]')
85%  ylabel('\phi_B, [a.u.]')
86%  title('Spectrum without background')
87%
88
89
90figure(12)
91c=6;
92hold on
93load('GFW/SEYP5.mat')
94plot(300./(6*(1-cos((48:7:118)/180*pi))), ((amp(c,:).*exp(lamb(c,:)*separation))./Integral(1:11)*1e-25),'-^k','linewidth',2)
95load('GFW/SEY.mat')
96plot(300./(6*(1-cos((48:7:118)/180*pi))), ((amp(c,:).*exp(lamb(c,:)*separation))./Integral(1:11)*1e-25),'-^r','linewidth',2)
97load('GFW/SEYP15.mat')
98plot(300./(6*(1-cos((48:7:118)/180*pi))), ((amp(c,:).*exp(lamb(c,:)*separation))./Integral(1:11)*1e-25),'-^b','linewidth',2)
99set(gca,'fontsize',16)
100legend('BGS=5mm','BGS=10mm','BGS=15mm','Location','northwest')
101xlabel('Frequency, [GHz]')
102ylabel('Amplitude, [a.u.]')
103title('FormFactor')
104grid on
105
106load('GFW/SEY.mat')
107figure
108hold on
109plot(300./(6*(1-cos((48:7:118)/180*pi))),  amp(1,:).*exp(lamb(1,:).*(-10))./(Integral(1:11))*1e-24,'-^b','linewidth',2)
110plot(300./(6*(1-cos((48:7:118)/180*pi))),  amp(2,:).*exp(lamb(2,:).*(-10))./(Integral(1:11))*1e-24,'-^m','linewidth',2)
111plot(300./(6*(1-cos((48:7:118)/180*pi))),  amp(3,:).*exp(lamb(3,:).*(-10))./(Integral(1:11))*1e-24,'-^k','linewidth',2)
112 plot(300./(6*(1-cos((48:7:118)/180*pi))),  amp(4,:).*exp(lamb(4,:).*(-10))./(Integral(1:11))*1e-24,'-^g','linewidth',2)
113plot(300./(6*(1-cos((48:7:118)/180*pi))),  amp(5,:).*exp(lamb(5,:).*(-10))./(Integral(1:11))*1e-24,'-^r','linewidth',2)
114
115 set(gca,'fontsize',16)
116 xlabel('Frequency, [GHz]')
117 legend('BP=2.4','BP=2.2','BP=2.0','BP=1.8','BP=1.6')
118 title('Form Factor (BGS=10 mm)')
119ylabel('Amplitude, [a.u.]')
120grid on
121Freq=300./(6*(1-cos((48:7:118)/180*pi)));
122for c=1:7
123FF(c,:)=amp(c,:).*exp(lamb(c,:).*(-10))./(Integral(1:11))*1e-24;
124end
125save FFXBP.mat Freq FF
Note: See TracBrowser for help on using the repository browser.