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))
In [5]:
print(ephem.separation((sun.az, sun.alt), (moon.az, moon.alt)))
In [6]:
print("%.8f %.8f %.11f" % (sun.size, moon.size, sun.size - moon.size))
In [8]:
gatech.date = ephem.date(gatech.date + 1)
Out[8]:
In [10]:
type(gatech.date)
Out[10]:
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