This is a static copy of a profile reportHome
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)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
39 | d.antenna0.receiver.switchData... | 2 | 0.317 s | 38.7% |  |
38 | f = find(flagArray); | 2 | 0.153 s | 18.7% |  |
30 | d.antenna0.receiver.data(f) = ... | 2 | 0.131 s | 16.0% |  |
35 | flagArray = [repmat(d.flags.fa... | 2 | 0.087 s | 10.7% |  |
29 | f = find(flagArray); | 2 | 0.066 s | 8.0% |  |
All other lines | | | 0.066 s | 8.0% |  |
Totals | | | 0.820 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
repmat | function | 12 | 0.077 s | 9.3% |  |
Self time (built-ins, overhead, etc.) | | | 0.743 s | 90.7% |  |
Totals | | | 0.820 s | 100% | |
Code Analyzer results
Line number | Message |
30 | To improve performance, use logical indexing instead of FIND. |
39 | To improve performance, use logical indexing instead of FIND. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 42 |
Non-code lines (comments, blank lines) | 24 |
Code lines (lines that can run) | 18 |
Code lines that did run | 16 |
Code lines that did not run | 2 |
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;