This is a static copy of a profile reportHome
createDir (1 call, 0.557 sec)
Generated 05-Aug-2011 13:00:30 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/createDir.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 |
20 | d=framecut(d,ind); | 1 | 0.339 s | 60.8% |  |
46 | unix(sprintf('mkdir %s',str)); | 21 | 0.087 s | 15.7% |  |
23 | the_date_string=datestr([start... | 1 | 0.044 s | 7.8% |  |
45 | if (exist(str)~=7) | 21 | 0.022 s | 3.9% |  |
44 | str=strcat(maindir,'/',subdir{... | 21 | 0.011 s | 2.0% |  |
All other lines | | | 0.055 s | 9.8% |  |
Totals | | | 0.557 s | 100% | |
Children (called functions)
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
framecut | function | 1 | 0.328 s | 58.8% |  |
datestr | function | 1 | 0.044 s | 7.8% |  |
strcat | function | 23 | 0.022 s | 3.9% |  |
where_am_i | function | 1 | 0 s | 0% |  |
mjd2date_v2 | function | 1 | 0 s | 0% |  |
getmonth | function | 1 | 0 s | 0% |  |
Self time (built-ins, overhead, etc.) | | | 0.164 s | 29.4% |  |
Totals | | | 0.557 s | 100% | |
Code Analyzer results
Line number | Message |
17 | The value assigned to variable 'month' might be unused. |
30 | EXIST with two input arguments is generally faster and clearer than with one input argument. |
39 | EXIST with two input arguments is generally faster and clearer than with one input argument. |
45 | EXIST with two input arguments is generally faster and clearer than with one input argument. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 55 |
Non-code lines (comments, blank lines) | 29 |
Code lines (lines that can run) | 26 |
Code lines that did run | 26 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function createDir(d,src)
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 % createDir(d,src)
4 %
5 % Creates the subdirectories for all the plotting functions
6 %
7 % sjcm
8 %
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10
11
1 12 subdir={'intro', 'pointing', 'intent', 'deglitch', 'positional', 'rfi', 'mains', 'alpha', 'rfactor', 'load', ...
13 'tau', 'tsys', 'noise', 'gain', 'astro', 'power', 'overf', 'rms', ...
14 'map', 'summary', 'fits'};
15
16
1 17 month=getmonth;
18
1 19 ind=d.array.frame.features>0 & d.array.frame.features<2^31;
0.34 1 20 d=framecut(d,ind);
1 21 start=mjd2date_v2(d.array.frame.utc(1));
22
0.04 1 23 the_date_string=datestr([start.year,start.month,start.day,start.hour,start.minute,round(start.second)]);
1 24 date_string_parts=regexp(the_date_string,' ','split');
1 25 time=sprintf('%s:%s',char(date_string_parts(1)),char(date_string_parts(2)));
26
1 27 [home,installeddir]=where_am_i();
0.01 1 28 maindir=strcat(home,'/',installeddir,'/reduc/',src);
29
1 30 if (exist(maindir)~=7)
0.01 1 31 unix(sprintf('mkdir %s',maindir));
1 32 end
33
34 %[r, user] = unix('whoami');
35
36
1 37 maindir=strcat(maindir,'/',time);
38
1 39 if (exist(maindir)~=7)
1 40 unix(sprintf('mkdir %s',maindir));
1 41 end
42
1 43 for i=1:length(subdir)
0.01 21 44 str=strcat(maindir,'/',subdir{i});
0.02 21 45 if (exist(str)~=7)
0.09 21 46 unix(sprintf('mkdir %s',str));
21 47 end
21 48 end
49
1 50 pause(0.1);
1 51 eval(sprintf('save %s/%s/reduc/maindir_%s.mat maindir',home,installeddir,src));
52
53
54
1 55 return;