This is a static copy of a profile reportHome
radec2azel (3 calls, 0.907 sec)
Generated 05-Aug-2011 13:01:31 using cpu time.
function in file /home/LeechJ/cbass_analysis/matutils/interf/radec2azel.m
Copy to new window for comparing multiple runs
Parents (calling functions)
Lines where the most time was spent
Line Number | Code | Calls | Total Time | % Time | Time Plot |
21 | cos_el_cos_az = sin(dec) * cos... | 3 | 0.197 s | 21.7% |  |
23 | sin_el = sin(dec) * sin(lat) +... | 3 | 0.164 s | 18.1% |  |
26 | az = atan2(cos_el_sin_az, cos_... | 3 | 0.153 s | 16.9% |  |
22 | cos_el_sin_az = -cos(dec) .* s... | 3 | 0.142 s | 15.7% |  |
25 | el = asin(sin_el); | 3 | 0.131 s | 14.5% |  |
All other lines | | | 0.120 s | 13.3% |  |
Totals | | | 0.907 s | 100% | |
Children (called functions)
No childrenCode Analyzer results
No Code Analyzer messages.Coverage results
[ Show coverage for parent directory ]
Total lines in function | 31 |
Non-code lines (comments, blank lines) | 17 |
Code lines (lines that can run) | 14 |
Code lines that did run | 14 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
Function listing
time calls line
1 function [az,el]=radec2azel(ra,dec,lst)
2 % function [az,el]=radec2azel(ra,dec,lst)
3 %
4 % given ra and dec of source, get az,el at certain lst
5 % input ra and lst in decimal hours, dec in degrees, output in
6 % degrees
7 %
8 % MKS stolen from C code, possibly Erik's?
9
10 % hour angle
0.01 3 11 ha=lst-ra;
3 12 r2d=180/pi;
3 13 lat=(37+14/60)/r2d;
14
15 % ha to deg
0.04 3 16 ha=360*ha/24;
17 % to rad
0.01 3 18 ha=ha/r2d;
0.03 3 19 dec=dec/r2d;
20
0.20 3 21 cos_el_cos_az = sin(dec) * cos(lat) - cos(dec) .* sin(lat) .* cos(ha);
0.14 3 22 cos_el_sin_az = -cos(dec) .* sin(ha);
0.16 3 23 sin_el = sin(dec) * sin(lat) + cos(dec) .* cos(lat) .* cos(ha);
24
0.13 3 25 el = asin(sin_el);
0.15 3 26 az = atan2(cos_el_sin_az, cos_el_cos_az);
27
0.01 3 28 el=el*r2d;
3 29 az=az*r2d;
30
3 31 return
Other subfunctions in this file are not included in this listing.