This is a static copy of a profile report

Home

where_am_i (36 calls, 0.000 sec)
Generated 05-Aug-2011 13:01:17 using cpu time.
function in file /home/LeechJ/cbass_analysis/where_am_i.m
Copy to new window for comparing multiple runs

Parents (calling functions)

Function NameFunction TypeCalls
readAlphaDatabase_DDfunction4
createDirfunction1
getMainDirfunction24
loadWrapperfunction1
tsysWrapperfunction1
noiseWrapperfunction1
gainWrapperfunction1
tauCalWrapperfunction1
overfWrapperfunction1
reduceData>writeOutFitssubfunction1
Lines where the most time was spent
No measurable time spent in this function

Line NumberCodeCallsTotal Time% TimeTime Plot
75
return;
360 s0%
21
if (~length(home))
360 s0%
14
if(~length(installeddir)) 
360 s0%
12
installeddir = getenv('CBASS_I...
360 s0%
11
home = getenv('CBASS_HOME');
360 s0%
All other lines  0 s0%
Totals  0 s0% 
Children (called functions)
No children
Code Analyzer results
Line numberMessage
14IF might not be aligned with its matching END (line 19).
14Using ISEMPTY is usually faster than comparing LENGTH to 0.
21Using ISEMPTY is usually faster than comparing LENGTH to 0.
25The value assigned here to 'r' appears to be unused. Consider replacing it by ~.
26The value assigned here to 'r' appears to be unused. Consider replacing it by ~.
49Terminate statement with semicolon to suppress output (in functions).
58Use && instead of & as the AND operator in (scalar) conditional statements.
60Use && instead of & as the AND operator in (scalar) conditional statements.
62Use && instead of & as the AND operator in (scalar) conditional statements.
Coverage results
[ Show coverage for parent directory ]
Total lines in function75
Non-code lines (comments, blank lines)40
Code lines (lines that can run)35
Code lines that did run5
Code lines that did not run30
Coverage (did run/can run)14.29 %
Function listing
   time   calls  line
1 function [home,installeddir] = where_am_i()
2
3 % The purpose of this function is to return
4 % the users home dir and the name of the installed dir (e.g. cbass_analysis)
5 %
6 % If you have installed somewhere non-standard e.g. cbass_analysis_latest
7 % change the line below to reflect the fact.
8
9 % First look for the environment variales.
10
36 11 home = getenv('CBASS_HOME');
36 12 installeddir = getenv('CBASS_INSTALLEDDIR');
13
36 14 if(~length(installeddir))
15 % No installed dir enviro variable found
16 % set by hand here.
17 installeddir='cbass_analysis';
18 %disp(['Warn: No CBASS_INSTALLEDDIR environment variable found - will default to: ',installeddir]);
19 end
20
36 21 if (~length(home))
22
23 % get the home dir the "manual" way...
24
25 [r, home] = unix('printenv HOME');
26 [r, hostname] = unix('printenv HOSTNAME');
27
28 %if ~strcmp(home(1:5),'/home')
29 % %case where you get tcsh shell error
30 % startpt=find(home=='/');
31 % home=home(startpt(1):end-1);
32 %
33 % clear startpt
34 %else
35 % home=home(1:end-1);
36 %end
37
38 if ~strcmp(home(1:5),'/home')
39 %case where you get tcsh shell error
40 startpt=find(home=='/');
41 home=home(startpt(1):end-1);
42 clear startpt
43 else
44 home=home(1:end-1);
45 end
46
47 %Fix to work on the computer of Angela :-)
48 if (~isempty(strfind(home,'taylora')))
49 home = '/Volumes/Data/CBASS'
50 addpath([home, '/cbass_analysis/angela']);
51 elseif( strfind(home, 'cbassusr'))
52 %Fix to work on falcon
53 home = '/scratch/falcon_4/cbassusr/cbass';
54 elseif(strfind(home, 'zuntz'))
55 home = '/Users/zuntz/src/cbass';
56 elseif(strfind(home,'mirfan'))
57 home = '/scratch/falcon_4/mirfan/cbass';
58 elseif(strfind(home,'cdickins') & strfind(hostname,'falcon'))
59 home = '/scratch/falcon_4/cdickins/cbass';
60 elseif(strfind(home,'cdickins') & strfind(hostname,'haggis'))
61 home = '/scr/cdickins/cbass';
62 elseif(strfind(home,'tjp') & strfind(hostname,'haggis'))
63 home = '/home/tjp';
64 elseif(strfind(home,'oliver'))
65 home = '/Users/oliver';
66 end
67 %disp(['Warn: No CBASS_HOME environment variable found will default to: ',home]);
68
69
70
71 end;
72
73 %disp(['Using home =',home,' : installed dir = ',installeddir]);
74
36 75 return;