This is a static copy of a profile report

Home

assembleAlphaStreams_DD (1 call, 0.098 sec)
Generated 05-Aug-2011 13:03:50 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/assembleAlphaStreams_DD.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
alphaWrapperfunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
40
d.antenna0.receiver.data = zer...
10.033 s33.3%
77
d.antenna0.receiver.data(:,8) ...
10.011 s11.1%
75
d.antenna0.receiver.data(:,7) ...
10.011 s11.1%
72
d.antenna0.receiver.data(:,5) ...
10.011 s11.1%
70
d.antenna0.receiver.data(:,4) ...
10.011 s11.1%
All other lines  0.022 s22.2%
Totals  0.098 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function80
Non-code lines (comments, blank lines)63
Code lines (lines that can run)17
Code lines that did run14
Code lines that did not run3
Coverage (did run/can run)82.35 %
Function listing
   time   calls  line
1 function d = assembleAlphaStreams_DD(d)
2 % d = assembleAlphaStreams_DD(d)
3 %
4 % This function takes the data in d.antenna0.receiver.switchData and
5 % rearranges it, placing it in the d.antenna0.receiver.data register.
6 % the suitable configuration for the alpha corrections. The columns of the
7 % new data register are:
8 % swd = switchData
9 % Total intensity 1:
10 % 1) 1/2*(swd(:,1) + swd(:,4)) == B[(1+a)(I/2+V/2) + (1-a)Tr1 + Tn]
11 % 2) 1/2*(swd(:,2) + swd(:,3)) == B[(1-a)(I/2+V/2) + (1+a)Tr1 + Tn]
12 % Polarization combination set 1:
13 % 3) 1/2*(swd(:,5)-swd(:,6) + swd(:,8)-swd(:,7)) == B[cos(th)Q - sin(th)U]
14 % 4) 1/2*(swd(:,9)-swd(:,10)+ swd(:,12)-swd(:,11)) == B[sin(th)Q + cos(th)U]
15 % Polarization combination set 2:
16 % 5) 1/2*(swd(:,13)-swd(:,14)+swd(:,16)-swd(:,15)) == B[cos(th)Q - sin(th)U]
17 % 6)-1/2*(swd(:,17)-swd(:,18)+swd(:,20)-swd(:,19)) == B[sin(th)Q + cos(th)U]
18 % Polarization combination set 3:
19 % 7) 1/4*(swd(:,5)-swd(:,6) + swd(:,8)-swd(:,7)
20 % +swd(:,13)-swd(:,14)+swd(:,16)-swd(:,15)) == B[cos(th)Q - sin(th)U]
21 % 8) 1/4*(swd(:,13)-swd(:,14)+swd(:,16)-swd(:,15)
22 % -swd(:,17)+swd(:,18)-swd(:,20)+swd(:,19)) == B[sin(th)Q + cos(th)U]
23 % Total intensity 2:
24 % 9) 1/2*(swd(:,21) + swd(:,24)) == B[(1+a)(I/2-V/2) + (1-a)Tr1 + Tn]
25 % 10)1/2*(swd(:,22) + swd(:,23)) == B[(1-a)(I/2-V/2) + (1+a)Tr1 + Tn]
26 %
27 % OGK, 21 Nov 2010
28 %
29 % ogk: modified 7 Dec 2010
30 %
31 % ogk: modified 4 Feb 2011
32 %
33
1 34 if size(d.antenna0.receiver.data,2) == 10
35 disp('Already assembled the alpha streams!')
36 return;
37 end
38
1 39 swd = d.antenna0.receiver.switchData;
0.03 1 40 d.antenna0.receiver.data = zeros(size(swd,1),10);
41
42 % % Before the LNA change, sky was in channels 1 and 4 (and 21 and 24).
43 % % After the LNA change this swaps.
44 % if d.antenna0.receiver.utc(1) < tstr2mjd('20-AUG-2010:00:00:00')
45 % % Total intensity 1:
46 % d.antenna0.receiver.data(:,1) = 1/2*(swd(:,2) + swd(:,3)); % [(1-a)(I/2+V/2) + (1+a)Tr1 + Tn]
47 % d.antenna0.receiver.data(:,2) = 1/2*(swd(:,1) + swd(:,4)); % [(1+a)(I/2+V/2) + (1-a)Tr1 + Tn]
48 %
49 % % Total intensity 2:
50 % d.antenna0.receiver.data(:,9) = 1/2*(swd(:,22) + swd(:,23)); % [(1-a)(I/2-V/2) + (1+a)Tr1 + Tn]
51 % d.antenna0.receiver.data(:,10) = 1/2*(swd(:,21) + swd(:,24)); % [(1+a)(I/2-V/2) + (1-a)Tr1 + Tn]
52 % else
53
54 % Total intensity 1:
0.01 1 55 d.antenna0.receiver.data(:,1) = 1/2*(swd(:,1) + swd(:,4)); % [(1+a)(I/2+V/2) + (1-a)Tr1 + Tn]
1 56 d.antenna0.receiver.data(:,2) = 1/2*(swd(:,2) + swd(:,3)); % [(1-a)(I/2+V/2) + (1+a)Tr1 + Tn]
57
58 % Total intensity 2:
0.01 1 59 d.antenna0.receiver.data(:,9) = 1/2*(swd(:,21) + swd(:,24)); % [(1+a)(I/2-V/2) + (1-a)Tr1 + Tn]
1 60 d.antenna0.receiver.data(:,10) = 1/2*(swd(:,22) + swd(:,23)); % [(1-a)(I/2-V/2) + (1+a)Tr1 + Tn]
61 % end
62
63 % Polarization: the models of the outputs are:
64 % swd(:,5,8,13,16) = a*I + b*V + cos(th)Q - sin(th)U
65 % swd(:,6,7,14,15) = a*I + b*V - cos(th)Q + sin(th)U
66 % swd(:,9,12,18,19) = a*I + b*V - sin(th)Q - cos(th)U
67 % swd(:,10,11,17,20) = a*I + b*V + sin(th)Q + cos(th)U
68 % Polarization combination set 1:
1 69 d.antenna0.receiver.data(:,3) = 1/2*(swd(:,5)-swd(:,6) + swd(:,8)-swd(:,7)); % + cos(th)Q - sin(th)U
0.01 1 70 d.antenna0.receiver.data(:,4) = 1/2*(swd(:,10)-swd(:,9)+ swd(:,11)-swd(:,12)); % + sin(th)Q + cos(th)U
71 % Polarization combination set 2:
0.01 1 72 d.antenna0.receiver.data(:,5) = 1/2*(swd(:,13)-swd(:,14)+swd(:,16)-swd(:,15)); % + cos(th)Q - sin(th)U
1 73 d.antenna0.receiver.data(:,6) = 1/2*(swd(:,17)-swd(:,18)+swd(:,20)-swd(:,19)); % + sin(th)Q + cos(th)U
74 % Polarization combination set 3:
0.01 1 75 d.antenna0.receiver.data(:,7) = 1/4*(swd(:,5)-swd(:,6) + swd(:,8)-swd(:,7) ...
76 +swd(:,13)-swd(:,14)+swd(:,16)-swd(:,15)); % + cos(th)Q - sin(th)U
0.01 1 77 d.antenna0.receiver.data(:,8) = 1/4*(swd(:,10)-swd(:,9)+swd(:,11)-swd(:,12) ...
78 -swd(:,18)+swd(:,17)-swd(:,19)+swd(:,20)); % + sin(th)Q + cos(th)U
79
1 80 end