This is a static copy of a profile reportHome
overfWrapper (1 call, 233.039 sec)
Generated 05-Aug-2011 13:01:00 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/overfWrapper.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Function Name | Function Type | Calls |
reduceData | function | 1 |
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
19 | stats = plot1overf(d, plotpara... | 1 | 225.071 s | 96.6% |  |
54 | allScan = load([home,'/',inst... | 1 | 3.093 s | 1.3% |  |
73 | allNoise = load([home,'/',ins... | 1 | 3.082 s | 1.3% |  |
75 | save([home,'/',installeddir,'/... | 1 | 0.874 s | 0.4% |  |
56 | save([home,'/',installeddir,'/... | 1 | 0.863 s | 0.4% |  |
All other lines | | | 0.055 s | 0.0% |  |
Totals | | | 233.039 s | 100% | |
Children (called functions)
Code Analyzer results
Line number | Message |
1 | Extra semicolon is unnecessary. |
42 | Use && instead of & as the AND operator in (scalar) conditional statements. |
48 | The value assigned to variable 'allScan' might be unused. |
55 | The value assigned to variable 'allScan' might be unused. |
62 | Use && instead of & as the AND operator in (scalar) conditional statements. |
67 | The value assigned to variable 'allNoise' might be unused. |
74 | The value assigned to variable 'allNoise' might be unused. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 86 |
Non-code lines (comments, blank lines) | 44 |
Code lines (lines that can run) | 42 |
Code lines that did run | 36 |
Code lines that did not run | 6 |
Coverage (did run/can run) | 85.71 % |
Function listing
time calls line
1 function d = overfWrapper(d, plotparams, parm, field);
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % function d = overfWrapper(d, plotparams, parm, field);
6 %
7 % reduceData function that does 1/f plot
8 %
9 % sjcm
10 %
11 % 3/30/2011 sjcm : saving plots wihtout display
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
0.03 1 14 setPlotDisplay(plotparams.plot);
15 % there is no flagging on this step
1 16 display('Calculating and plotting 1/f');
1 17 display('No flagging will be allowed');
18
225.07 1 19 stats = plot1overf(d, plotparams, field);
20
1 21 d.correction.overf.stat = stats;
22
23 % next we save for posterity
24 % first the scan 1/f parameters, removing bad ones.
1 25 indBad = mean(isnan(stats.scan.fknee),2)==1;
0.02 1 26 scan = structcut(stats.scan, ~indBad);
1 27 numChan = size(scan.fknee,2);
1 28 thisScan = [scan.mjd scan.fknee scan.alpha scan.white scan.errorFlags];
29
30
31 % and the noise
1 32 indBad = mean(isnan(stats.noise.fknee),2)==1;
1 33 noise = structcut(stats.noise, ~indBad);
1 34 thisNoise = [noise.mjd noise.fknee noise.alpha noise.white noise.errorFlags];
35
1 36 [home,installeddir]=where_am_i();
37
38 % make sure file is up-to-date
1 39 parFlag = checkpar(parm, 'autosave');
1 40 if(parFlag)
41
1 42 if(parm.autosave.flag & ~isempty(thisScan))
43
1 44 switch(numChan)
1 45 case 8
46 %system('cvs update constants/overf_scan_8chan.txt');
47 allScan = load([home,'/',installeddir,'/constants/overf_scan_8chan.txt']);
48 allScan = [allScan; thisScan];
49 save([home,'/',installeddir,'/constants/overf_scan_8chan.txt'], 'allScan', '-ascii', '-single')
50 %system('cvs commit -m "update" constants/overf_scan_8chan.txt');
51
1 52 case 10
53 %system('cvs update constants/overf_scan_10chan.txt');
3.09 1 54 allScan = load([home,'/',installeddir,'/constants/overf_scan_10chan.txt']);
1 55 allScan = [allScan; thisScan];
0.86 1 56 save([home,'/',installeddir,'/constants/overf_scan_10chan.txt'], 'allScan', '-ascii', '-single')
57 %system('cvs commit -m "update" constants/overf_scan_10chan.txt');
58
1 59 end
1 60 end
61
1 62 if(parm.autosave.flag & ~isempty(thisNoise))
1 63 switch(numChan)
1 64 case 8
65 %system('cvs update constants/overf_noise_8chan.txt');
66 allNoise = load([home,'/',installeddir,'/constants/overf_noise_8chan.txt']);
67 allNoise = [allNoise; thisNoise];
68 save([home,'/',installeddir,'/constants/overf_noise_8chan.txt'], 'allNoise', '-ascii', '-single')
69 %system('cvs commit -m "update" constants/overf_noise_8chan.txt');
70
1 71 case 10
72 %system('cvs update constants/overf_noise_10chan.txt');
3.08 1 73 allNoise = load([home,'/',installeddir,'/constants/overf_noise_10chan.txt']);
1 74 allNoise = [allNoise; thisNoise];
0.87 1 75 save([home,'/',installeddir,'/constants/overf_noise_10chan.txt'], 'allNoise', '-ascii', '-single')
76 %system('cvs commit -m "update" constants/overf_noise_10chan.txt');
77
1 78 end
1 79 end
1 80 end
81
82 % log that it has been applied
1 83 d = logcal(d, 'overf');
84
85
1 86 return;
Other subfunctions in this file are not included in this listing.