% Obtained from 2-sigma of gold normal incidence
clear all;
lower_bound = 972;
upper_bound = 1267;

raw_data = [10 0 60.50;
            15 0 1146.32;
            20 0 3959.48;
            30 0 10370;
            35 0 1394.16;
            40 0 25278;
            55 0 10000;
            60 0 58876;
            145 0 219493];
%------------------------------------------------------------
% ANALYSIS
% Dropped 10, 35
% Make 15->16, 20->19, 30->29, 40->39
%------------------------------------------------------------

temp = load('10deg_60_50.Spe');
raw_data(1,2) = sum(temp(lower_bound:upper_bound));
temp = load('15deg_1146_32.Spe');
raw_data(2,2) = sum(temp(lower_bound:upper_bound));
temp = load('20deg_3959_48.Spe');
raw_data(3,2) = sum(temp(lower_bound:upper_bound));
temp = load('30deg_10370sec.Spe');
raw_data(4,2) = sum(temp(lower_bound:upper_bound));
temp = load('35deg_1394_16.Spe');
raw_data(5,2) = sum(temp(lower_bound:upper_bound));
temp1 = load('40deg_4707_28.Spe');
temp2 = load('40deg_570_96.Spe');
temp3 = load('40degreesovernight20Ks0930.Spe');
temp = temp1+temp2+temp3;
raw_data(6,2) = sum(temp(lower_bound:upper_bound));
temp = load('55deg_10000sec.Spe');
raw_data(7,2) = sum(temp(lower_bound:upper_bound));
temp = load('60degrees1001.Spe');
raw_data(8,2) = sum(temp(lower_bound:upper_bound));
temp = load('150deg_219493sec.Spe');
raw_data(9,2) = sum(temp(lower_bound:upper_bound));
clear temp temp1 temp2 temp3

process_raw_data;