-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadindata.m
executable file
·50 lines (44 loc) · 1.31 KB
/
readindata.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
close all
files = 1:9;
numfiles = length(files);
[data, xData, yData, legcell] = deal(cell(size(files)));
for qq = 1:numfiles
kk = files(qq);
data{qq} = dlmread(['n60ThermalSpectrum_10usExposure_0' mat2str(kk) 'VUV_2016_06_19.csv']);
xData{qq} = data{qq}(:,1);
yData{qq} = data{qq}(:,2);
end
powerinmW = {6 21 44 72 102 130 153 170 183 190};
figure
hold on
for qq = 1:numfiles
kk = files(qq);
plot(xData{qq}, yData{qq}/powerinmW{kk}, 'Color', FrancyColors3(numfiles, qq))
legstr = mat2str(powerinmW{qq});
legcell{qq} = legstr;
end
set(gca, 'Color', [.8 .8 .8])
h =legend(legcell);
v = get(h,'title');
set(v,'string','UV Power (mW)');
set(h, 'Location', 'Best')
xlabel('UV Detuning (MHz)')
ylabel('Signal (Counts/us/mW)')
% files2 = [5];
% numfiles2 = length(files2);
% for qq = 1:numfiles2
% kk = files2(qq);
% data2{qq} = dlmread(['n60ThermalSpectrum_02usExposure_03VUV_0' mat2str(kk) 'Vred_2016_06_19.csv']);
% xData2{qq} = data2{qq}(:,1);
% yData2{qq} = data2{qq}(:,2);
% end
% norm = [1.6 1.15 1];
% norm = [1/7];
%
% for qq = 1:numfiles2
% kk = files2(qq);
% plot(xData2{qq}, norm(qq)*yData2{qq}/powerinmW{3}, 'o','Color', FrancyColors3(numfiles, qq))
% % legstr = mat2str(powerinmW{qq});
% % legcell{qq} = legstr;
% end
% legend('3V red', '4V red', '5V red')