Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Michael Hirsch scivision

💭
I may be slow to respond.
View GitHub Profile
@scivision
scivision / sunriseSunset.py
Last active Feb 3, 2021 — forked from drhirsch/pyephem_sunrise_sunset.py
Python example of computing sunrise/sunset using PyEphem
View sunriseSunset.py
import ephem
import datetime
Boston=ephem.Observer()
Boston.lat='42.3462'
Boston.lon='-71.0978'
Boston.date = datetime.datetime.now()
# %% these parameters are for super-precise estimates, not necessary.
Boston.elevation = 3 # meters
Boston.pressure = 1010 # millibar