pvlib.solarposition.sun_rise_set_transit_ephem#
- pvlib.solarposition.sun_rise_set_transit_ephem(times, latitude, longitude, next_or_previous='next', altitude=0, pressure=101325, temperature=12, horizon='0:00')[source]#
Calculate the next sunrise and sunset times using the PyEphem package.
- Parameters
time (
pandas.DatetimeIndex) – Must be localizedlatitude (
float) – Latitude in degrees, positive north of equator, negative to southlongitude (
float) – Longitude in degrees, positive east of prime meridian, negative to westnext_or_previous (
str) – ‘next’ or ‘previous’ sunrise and sunset relative to timealtitude (
float, default0) – distance above sea level in meters.pressure (
intorfloat, optional, default101325) – air pressure in Pascals.temperature (
intorfloat, optional, default12) – air temperature in degrees C.horizon (
string,format +/-X:YY) – arc degrees:arc minutes from geometrical horizon for sunrise and sunset, e.g., horizon=’+0:00’ to use sun center crossing the geometrical horizon to define sunrise and sunset, horizon=’-0:34’ for when the sun’s upper edge crosses the geometrical horizon
- Returns
pandas.DataFrame– index is the same as input time argument columns are ‘sunrise’, ‘sunset’, and ‘transit’
See also