This is a static copy of a profile report

Home

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)

Function NameFunction TypeCalls
calcSourceDistfunction3
Lines where the most time was spent

Line NumberCodeCallsTotal Time% TimeTime Plot
21
cos_el_cos_az = sin(dec) * cos...
30.197 s21.7%
23
sin_el = sin(dec) * sin(lat) +...
30.164 s18.1%
26
az = atan2(cos_el_sin_az, cos_...
30.153 s16.9%
22
cos_el_sin_az = -cos(dec) .* s...
30.142 s15.7%
25
el = asin(sin_el);
30.131 s14.5%
All other lines  0.120 s13.3%
Totals  0.907 s100% 
Children (called functions)
No children
Code Analyzer results
No Code Analyzer messages.
Coverage results
[ Show coverage for parent directory ]
Total lines in function31
Non-code lines (comments, blank lines)17
Code lines (lines that can run)14
Code lines that did run14
Code lines that did not run0
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.