4. Apparent AZ & EL:
Apparent azimuth and elevation of target. Corrected for light-time,
the gravitational deflection of light, stellar aberration, precession and
nutation. There is an optional (approximate) correction for atmospheric
refraction (Earth only). Azimuth measured North(0) -> East(90) ->
South(180) -> West(270). Elevation is with respect to plane perpendicular
to local zenith direction. TOPOCENTRIC ONLY. Units: DEGREES
Labels: Azi_(a-appr)_Elev (airless)
Azi_(r-appr)_Elev (refracted)
Sun at noon every 2 days for 1 year starting May 25, 2010
Analemma
Projection of the analemma in Seattle from a stick pointing straight up
{{{id=55| show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=True) /// }}}Sun data from Horizons - today, every 10 minutes from 7 AM to 5 PM
{{{id=57| start = datetime(2010, 6, 2, 7, 00, 1) # y m d h min s end = datetime(2010, 6, 2, 17, 00, 0) step = '10m' data = get_angle_data(start, end, step, utc_offset=int(-8)) plot_sun(data) /// Data received }}} {{{id=58| stick_base = vector([0,-.5,1]) stick_tip = vector([0,.5,1]) #stick_vector(0, pi/2, 1, stick_base) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=False) /// }}} {{{id=59| stick_base = vector([-.5,0,1]) stick_tip = vector([.5,0,1]) #stick_vector(0, pi/2, 1, stick_base) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=True, points=False) /// }}} {{{id=60| normal = vector([0,-1,0]) anchor = vector([0,0,0]) stick_base = vector([0,0,0]) stick_tip = vector([0,-1,0]) #stick_vector(0, pi/2, 1, stick_base) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=True, points=False) /// }}}Model of the sundial on the Physics and Astronomy building today
{{{id=61| normal = vector(polar_to_cartesian(7*pi/6, 0)) anchor = vector([0,0,0]) stick_base = vector([0,0,0]) stick_tip = stick_vector(pi, -pi/4, 1, stick_base) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=False) /// }}}Model of the sundial on the Physics and Astronomy building on 3/20/2010 (spring equinox)
{{{id=62| start = datetime(2010, 3, 20, 10, 00, 1) # y m d h min s end = datetime(2010, 3, 20, 18, 00, 0) step = '1m' data = get_angle_data(start, end, step, utc_offset=int(-8)) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=False) /// Data received }}}Equatorial sundial - today from 6 AM to 6 PM every hour
{{{id=67| normal = vector(polar_to_cartesian(0, r_from_d(47))) anchor = vector([0,0,0]) stick_base = vector(polar_to_cartesian(0, r_from_d(47))) stick_tip = stick_vector(0, r_from_d(47), 1, stick_base) start = datetime(2010, 6, 2, 6, 00, 1) # y m d h min s end = datetime(2010, 6, 2, 18, 00, 2) step = '1h' data = get_angle_data(start, end, step, utc_offset=int(-8)) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=True) /// Data received }}}Horizontal sundial today
{{{id=70| normal = vector((0,0,1)) anchor = vector((0,0,0)) stick_base = vector((0,0,0)) stick_tip = stick_vector(0, r_from_d(47), 1, stick_base) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=True, points=True) /// }}}Vertical sundial today
{{{id=72| normal = vector([0,-1,0]) anchor = vector(polar_to_cartesian(0, r_from_d(47))) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=False) /// }}}Polar sundial today
{{{id=71| normal = vector(polar_to_cartesian(0, r_from_d(47) + pi/2)) anchor = vector((0,0,-1)) show_projection(stick_base, stick_tip, normal, anchor, data, normalize=False, points=True) /// }}} {{{id=77| DAYS_IN_YEAR = 365.25636 SECONDS_IN_YEAR = DAYS_IN_YEAR*24*60*60 def earth_location(t): ''' t is the time past since perihelion in days returns an (r, theta) pair of the earth's position relative to the sun (add pi to get sun relative to earth) r isn't required for the sundial, but it's used if we want to plot the path of the earth in polar coords this follows the steps found here: http://en.wikipedia.org/wiki/Kepler's_laws_of_planetary_motion#Position_as_a_function_of_time ''' var('E th') a = 1.4960e8 # semi-major axis in km - half the measurement of the orbit at it's widest part ec = 0.0167 # eccentricity - a really accurate value of this would be nice M = 2*pi*t/DAYS_IN_YEAR # mean anomaly ecc_anomaly = find_root(M == E-ec*sin(E), 0, 2*pi) # eccentric anomaly true_anomaly = 2*arctan(sqrt((1+ec)/(1-ec))*tan(E/2)).subs(E=ecc_anomaly) r = (a*(1-ec^2)/(1+ec*cos(th))).subs(th=true_anomaly) return (r, true_anomaly) def graph_earth(t): var('x y') r, th = earth_location(t) # neat python trick to assign variables to entries in a tuple # get x and y values to plot on a graph x = float((r*cos(th)).subs(th=th)) y = float((r*sin(th)).subs(th=th)) g = point((x, y), color='green') + point((0,0), color='orange') # adding two points together makes them part of the same plot g.set_axes_range(-1.4960e8, 1.4960e8, -1.4960e8, 1.4960e8) # fix the axes so we don't zoom in and out g.set_aspect_ratio(1) return g /// }}} {{{id=19| # this will make an animation of the orbit, 1 frame per earth day # it takes a couple minutes to render, though animate([graph_earth(t) for t in xrange(0, 365)]).show(delay=1) /// }}} {{{id=20| DAYS_IN_YEAR = 365.242199 # shows the earth's position given a day of the year @interact def show_earth(t=(0,365)): print 'percentage of year:' print t/DAYS_IN_YEAR*100 graph_earth(t).show(aspect_ratio=1) /// }}} {{{id=21| # shows the earth's position at certain points in the year # you can see that 1/4 of the way through the year, the earth has actually moves more than 90 degrees! show_earth(DAYS_IN_YEAR/4) show_earth(DAYS_IN_YEAR/2) show_earth(DAYS_IN_YEAR*3/4) /// percentage of year: 25.0000000000000