This is a static copy of a profile reportHome
pointingWrapper (1 call, 0.011 sec)
Generated 05-Aug-2011 13:03:49 using cpu time.
function in file /home/LeechJ/cbass_analysis/reduc/support/pointingWrapper.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 |
14 | if(nargin==3) | 1 | 0.011 s | 100.0% |  |
28 | return; | 1 | 0 s | 0% |  |
27 | display('NO CROSSES IN THIS DA... | 1 | 0 s | 0% |  |
25 | else | 1 | 0 s | 0% |  |
22 | elseif(length(find(d.index.rad... | 1 | 0 s | 0% |  |
All other lines | | | 0 s | 0% |  |
Totals | | | 0.011 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
Line number | Message |
1 | Extra semicolon is unnecessary. |
20 | The value assigned to variable 'hasPoint' might be unused. |
23 | The value assigned to variable 'hasPoint' might be unused. |
29 | This statement (and possibly following ones) cannot be reached. |
46 | The variable 'srcNum' appears to change size on every loop iteration. Consider preallocating for speed. |
60 | The value assigned to variable 'allCross' might be unused. |
Coverage results
[ Show coverage for parent directory ]
Total lines in function | 76 |
Non-code lines (comments, blank lines) | 35 |
Code lines (lines that can run) | 41 |
Code lines that did run | 6 |
Code lines that did not run | 35 |
Coverage (did run/can run) | 14.63 % |
Function listing
time calls line
1 function d = pointingWrapper(d, plotparams, parm, field);
2
3 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4 %
5 % function d = pointingWrapper(d, plotparams, parm, field);
6 %
7 % reduceData function that scans for pointing crosses, fits a gaussian to
8 % it, and then records the data to disk
9 %
10 % sjcm
11 %
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
0.01 1 14 if(nargin==3)
15 field = [];
16 end
17
18 % check if we have any pointing crosses.
1 19 if(length(find(d.index.radio_point_cross.slow))>10)
20 hasPoint = 1;
21 isScan = 0;
1 22 elseif(length(find(d.index.radio_point_scan.slow))>10)
23 hasPoint = 1;
24 isScan = 1;
1 25 else
26 % no crosses to look at
1 27 display('NO CROSSES IN THIS DATA SET');
1 28 return;
29 hasPoint = 0;
30 isScan = 0;
31 end
32
33
34 % call to radPointPlots
35
36 if(isScan)
37 [obs off] = radPointPlots(d, plotparams, 'scan', field);
38 else
39 [obs off] = radPointPlots(d, plotparams, 'cross', field);
40 end
41
42 % next we save the values.
43 if(~isempty(off.az))
44 % form is: [time, sourceName, sourceaz, sourceel, offaz, offel];
45 for m=1:length(off.sources)
46 srcNum(m) = sourceCorrespondance(off.sources{m});
47 end
48
49 thisCross = [off.timeVal' srcNum' obs.az' obs.el' off.az off.el];
50
51 [home,installeddir]=where_am_i();
52
53 % and now we save it for posterity
54 parFlag = checkpar(parm, 'autosave');
55 if(parFlag)
56 if(parm.autosave.flag)
57
58 %system('cvs update constants/pointing_crosses.txt');
59 allCross = load([home,'/',installeddir,'/constants/pointing_crosses.txt']);
60 allCross = [allCross; thisCross];
61 save([home,'/',installeddir,'/constants/pointing_crosses.txt'], 'allCross', '-ascii', '-single')
62 %system('cvs commit -m "update" constants/pointing_crosses.txt');
63 end
64 end
65
66
67 display(sprintf('Measured %d good pointing crosses', length(off.az)));
68 display(sprintf('Mean az/el offset: %2.3f, %2.3f degrees', mean(off.az), mean(off.el)));
69
70 else
71 display('NO GOOD CROSSES IN YOUR DATA SET');
72 end
73
74 close all;
75
76 return;
Other subfunctions in this file are not included in this listing.