In [21]:
import ephem
import datetime

In [23]:
gatech = ephem.Observer()
gatech.lon, gatech.lat = '-84.39733', '33.775867'
start_date = datetime.datetime(1985,5,30,16,22,56)
gatech.date = start_date

In [3]:
sun, moon = ephem.Sun(), ephem.Moon()
sun.compute(gatech)
moon.compute(gatech)

In [4]:
print("%s %s" % (sun.alt, sun.az))
print("%s %s" % (moon.alt, moon.az))


70:08:39.2 122:11:26.4
70:08:39.5 122:11:26.0

In [5]:
print(ephem.separation((sun.az, sun.alt), (moon.az, moon.alt)))


0:00:00.3

In [6]:
print("%.8f %.8f %.11f" % (sun.size, moon.size, sun.size - moon.size))


1892.91210938 1891.85778809 1.05432128906

In [8]:
gatech.date = ephem.date(gatech.date + 1)


Out[8]:
30832.18259259259

In [10]:
type(gatech.date)


Out[10]:
ephem.Date

In [14]:
dates = [ephem.date(gatech.date + d) for d in range(1,356)]

In [ ]:
ephem.date

In [17]:
a_dec = []
for d in dates:
    gatech.date = d
    sun.compute(gatech)
    a_dec.append(sun.a_dec)

In [19]:
import matplotlib.pyplot as plt

In [20]:
%matplotlib inline

In [ ]:
plt.figure()
plt.plot