This is a static copy of a profile report

Home

setNewFlag (43 calls, 0.732 sec)
Generated 05-Aug-2011 13:03:48 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/flag/setNewFlag.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
deglitchfunction1
deglitchWrapperfunction1
rfiWrapperfunction6
alphaWrapperfunction1
packdfunction17
skimfunction17
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
106
flags = applyFlag2(d, flag, bi...
80.448 s61.2%
110
d = setFlagBits(d, flags);
90.240 s32.8%
103
flags = applyFlag(d, flag, bit...
10.044 s6.0%
113
return;
90 s0%
107
end
80 s0%
All other lines  0 s0%
Totals  0.732 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
setNewFlag>applyFlag2subfunction80.448 s61.2%
setNewFlag>setFlagBitssubfunction90.240 s32.8%
setNewFlag>applyFlagsubfunction10.044 s6.0%
Self time (built-ins, overhead, etc.)  0 s0%
Totals  0.732 s100% 
Code Analyzer results
Line numberMessage
Coverage results
[ Show coverage for parent directory ]
Total lines in function113
Non-code lines (comments, blank lines)62
Code lines (lines that can run)51
Code lines that did run46
Code lines that did not run5
Coverage (did run/can run)90.20 %
Function listing
   time   calls  line
1 function [d flags bitNum] = setNewFlag(d, flag, step)
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % function [d flags bitNum] = setNewFlag(d, flag, step)
6 %
7 % function which sets flag.bits according to the proper step in the
8 % analysis. The following steps are valid:
9 %
10 % bit 0 - flagged by bitmask (antenna diagnostics flag)
11 % bit 1 - user flag
12 % bit 2 - time flag
13 % bit 3 - deglitch
14 % bit 4 - rfi
15 % bit 5 - horizon
16 % bit 6 - satellite
17 % bit 7 - sun
18 % bit 8 - moon
19 % bit 9 - pos_user
20 % bit 10 - alpha
21 % bit 11 - tsys
22 % bit 12 - noise
23 % bit 13 - gain
24 % bit 14- tau
25 % bit 15- astro
26 % bit 16- rfactor
27 %
28 %
29 % sjcm
30 %
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
32
33 % first we see if we have a valid entry
43 34 switch step
43 35 case 'antenna'
2 36 bitNum = 1;
37
41 38 case 'user'
2 39 bitNum = 2;
40
39 41 case 'time'
2 42 bitNum = 3;
43
37 44 case 'deglitch'
4 45 bitNum = 4;
46
33 47 case 'rfi'
3 48 bitNum = 5;
49
30 50 case 'horizon'
3 51 bitNum = 6;
52
27 53 case 'satellite'
3 54 bitNum = 7;
55
24 56 case 'sun'
3 57 bitNum = 8;
58
21 59 case 'moon'
3 60 bitNum = 9;
61
18 62 case 'pos_user'
3 63 bitNum = 10;
64
15 65 case 'alpha'
3 66 bitNum = 11;
67
12 68 case 'tsys'
2 69 bitNum = 12;
70
10 71 case 'noise'
2 72 bitNum = 13;
73
8 74 case 'gain'
2 75 bitNum = 14;
76
6 77 case 'tau'
2 78 bitNum = 15;
79
4 80 case 'astro'
2 81 bitNum = 16;
82
2 83 case 'rfactor'
2 84 bitNum = 17;
85
86 otherwise
87 error('Flag bit not recognized');
88
89 end
90
43 91 if(isempty(d))
34 92 flags = [];
34 93 return;
94 end
95
96 % first we check what the second argument is, whether it's a vector of
97 % indices or a structure.
9 98 if(isstruct(flag))
99 % make sure we've set the right bit.
100 flags = setRightBit(flag, bitNum);
9 101 elseif(isvector(flag))
102 % make it into the structure form.
0.04 1 103 flags = applyFlag(d, flag, bitNum);
8 104 elseif(size(flag,2)==3)
105 % make it into the structure form
0.45 8 106 flags = applyFlag2(d, flag, bitNum);
8 107 end
108
109 % apply it to the existing data
0.24 9 110 d = setFlagBits(d, flags);
111
112
9 113 return;

Other subfunctions in this file are not included in this listing.