This is a static copy of a profile report

Home

loadWrapper (1 call, 12.209 sec)
Generated 05-Aug-2011 13:01:16 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/loadWrapper.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
reduceDatafunction1
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
79
d = packd(d, [], 'none', 'load...
18.383 s68.7%
39
[K, shift] = calc_loadcorrect_...
12.219 s18.2%
68
d = apply_loadcorrect_final(do...
11.476 s12.1%
48
allLoad  = load([home,'/',inst...
10.055 s0.4%
75
setPlotDisplay(plotparams.plot...
10.033 s0.3%
All other lines  0.044 s0.4%
Totals  12.209 s100% 
Children (called functions)

Function NameFunction TypeCallsTotal Time% TimeTime Plot
packdfunction18.383 s68.7%
calc_loadcorrect_finalfunction12.219 s18.2%
apply_loadcorrect_finalfunction11.476 s12.1%
setPlotDisplayfunction10.033 s0.3%
where_am_ifunction10 s0%
checkparfunction20 s0%
logcalfunction20 s0%
Self time (built-ins, overhead, etc.)  0.098 s0.8%
Totals  12.209 s100% 
Code Analyzer results
Line numberMessage
1Extra semicolon is unnecessary.
25The value assigned to variable 'flagParams' might be unused.
28The value assigned to variable 'flagParams' might be unused.
28Use of brackets [] is unnecessary. Use parentheses to group, if needed.
37To improve performance, replace ISEMPTY(FIND(X)) with ISEMPTY(FIND( X, 1 )).
49The value assigned to variable 'allLoad' might be unused.
58The value assigned to variable 'allLoad' might be unused.
Coverage results
[ Show coverage for parent directory ]
Total lines in function86
Non-code lines (comments, blank lines)41
Code lines (lines that can run)45
Code lines that did run28
Code lines that did not run17
Coverage (did run/can run)62.22 %
Function listing
   time   calls  line
1 function d = loadWrapper(d, plotparams, parm, field);
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % function d = loadWrapper(d, plotparams, parm, field);
6 %
7 % reduceData function that removes the variation of the cold load
8 %
9 % sjcm
10 %
11 % 3/30/2011 sjcm: saving plots without displaying
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
1 14 [d,q] = logcal(d, 'load');
1 15 if (q)
16 disp('Load correction has been applied');
17 disp(' ')
18 % d=checkstatus(d);
19 return
20 end
21
1 22 parFlag = checkpar(parm, 'load');
23
1 24 if(parFlag)
1 25 flagParams = [parm.load.residual];
26 else
27 display('Using Default load cal parameters');
28 flagParams = [10];
29 end
30
31 % first we calculate and apply the load correction
1 32 dorig = d;
33
1 34 [home,installeddir]=where_am_i();
35
1 36 numDims = size(dorig.antenna0.receiver.data,2);
0.01 1 37 if(~isempty(find(d.index.blank.slow)))
38 % calculate the correction
2.22 1 39 [K, shift] = calc_loadcorrect_final(dorig);
40 % save it if desired
1 41 parFlag = checkpar(parm, 'autosave');
1 42 if(parFlag)
1 43 if(parm.autosave.flag)
1 44 switch numDims
1 45 case 10
1 46 thisLoad = [dorig.array.frame.utc(1) K shift];
47 %system('cvs update constants/load_correction_values_10.txt');
0.05 1 48 allLoad = load([home,'/',installeddir,'/constants/load_correction_values_10.txt']);
1 49 allLoad = [allLoad; thisLoad];
0.01 1 50 save([home,'/',installeddir,'/constants/load_correction_values_10.txt'], 'allLoad', '-ascii', '-single')
51
52 %system('cvs commit -m "update" constants/load_correction_values_10.txt');
53
54 case 8
55 thisLoad = [dorig.array.frame.utc(1) K shift];
56 %system('cvs update constants/load_correction_values_8.txt');
57 allLoad = load([home,'/',installeddir,'/constants/load_correction_values_8.txt']);
58 allLoad = [allLoad; thisLoad];
59 save([home,'/',installeddir,'/constants/load_correction_values_8.txt'], 'allLoad', '-ascii', '-single')
60 %system('cvs commit -m "update" constants/load_correction_values_8.txt');
61 end
1 62 end
1 63 end
64 else
65 [K shift] = getLoadCorrection(d);
66 end
67
1.48 1 68 d = apply_loadcorrect_final(dorig, K, shift);
69
70 % flag to make sure it's good
71 % dcorr = flagLoad(dcorr, d, flagParams);
72
73 % next we plot to see if there was any effect at all
74
0.03 1 75 setPlotDisplay(plotparams.plot);
1 76 display('Plotting Power Spectrum');
1 77 display('No flagging will be allowed');
78
8.38 1 79 d = packd(d, [], 'none', 'load_cal', plotparams, 'Load Plots', field,dorig);
80
81
82 % log that it has been applied
1 83 d = logcal(d, 'load');
84
85
1 86 return;

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