This is a static copy of a profile report

Home

applyFlags (2 calls, 0.820 sec)
Generated 05-Aug-2011 13:00:40 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/applyFlags.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
plot1overf>getStatsPlotssubfunction2
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
39
d.antenna0.receiver.switchData...
20.317 s38.7%
38
f = find(flagArray);
20.153 s18.7%
30
d.antenna0.receiver.data(f) = ...
20.131 s16.0%
35
flagArray = [repmat(d.flags.fa...
20.087 s10.7%
29
f = find(flagArray);
20.066 s8.0%
All other lines  0.066 s8.0%
Totals  0.820 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
repmatfunction120.077 s9.3%
Self time (built-ins, overhead, etc.)  0.743 s90.7%
Totals  0.820 s100% 
Code Analyzer results
Line numberMessage
30To improve performance, use logical indexing instead of FIND.
39To improve performance, use logical indexing instead of FIND.
Coverage results
[ Show coverage for parent directory ]
Total lines in function42
Non-code lines (comments, blank lines)24
Code lines (lines that can run)18
Code lines that did run16
Code lines that did not run2
Coverage (did run/can run)88.89 %
Function listing
   time   calls  line
1 function d = applyFlags(d)
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % function d = applyFlags(d)
6 %
7 % all this does is take whatever flags you have in d.flags.fast and applies
8 % it to your data --- setting hte values in the data structure to NaN.
9 %
10 % sjcm
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
2 13 if(isfield(d.antenna0.receiver, 'data'))
2 14 switch(size(d.antenna0.receiver.data, 2))
2 15 case 6
16 flagArray = [d.flags.fast(:,1) repmat(d.flags.fast(:,2), [1 4]) ...
17 d.flags.fast(:,3)];
18
2 19 case 8
20 flagArray = [d.flags.fast(:,1) repmat(d.flags.fast(:,2), [1 6]) ...
21 d.flags.fast(:,3)];
22
2 23 case 10
0.05 2 24 flagArray = [repmat(d.flags.fast(:,1), [1 2]) ...
25 repmat(d.flags.fast(:,2), [1 6]) repmat(d.flags.fast(:,3), [1 ...
26 2])];
27
2 28 end
0.07 2 29 f = find(flagArray);
0.13 2 30 d.antenna0.receiver.data(f) = nan;
2 31 end
32
2 33 if(isfield(d.antenna0.receiver, 'switchData'))
34 % make sure the fast flags are incorporated into the switch ones.
0.09 2 35 flagArray = [repmat(d.flags.fast(:,1), [1 4]) ...
36 repmat(d.flags.fast(:,2), [1 16]) repmat(d.flags.fast(:,3), [1 ...
37 4])];
0.15 2 38 f = find(flagArray);
0.32 2 39 d.antenna0.receiver.switchData(f) = nan;
2 40 end
41
2 42 return;