Skip to content

Commit a8f8576

Browse files
committed
Update solarposition.py
1 parent 25bcf02 commit a8f8576

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

pvlib/solarposition.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
from pvlib import atmosphere, tools
2727
from pvlib.tools import datetime_to_djd, djd_to_datetime
28-
from pvlib._deprecation import renamed_kwarg_warning
2928

3029

3130
def get_solarposition(time, latitude, longitude,
@@ -1347,21 +1346,15 @@ def solar_zenith_analytical(latitude, hourangle, declination):
13471346
)
13481347

13491348

1350-
@renamed_kwarg_warning("0.11.2", "times", "time", "0.12.0")
1351-
def hour_angle(time, longitude, equation_of_time):
1349+
def hour_angle(times, longitude, equation_of_time):
13521350
"""
13531351
Hour angle in local solar time. Zero at local solar noon.
13541352
13551353
Parameters
13561354
----------
1357-
time : :class:`pandas.DatetimeIndex`
1355+
times : :class:`pandas.DatetimeIndex`
13581356
Corresponding timestamps, must be localized to the timezone for the
13591357
``longitude``.
1360-
1361-
.. versionchanged:: 0.11.2
1362-
The ``times` parameter has been renamed ``time``. The deprecated
1363-
``times`` parameter will be removed in ``v0.12.0``.
1364-
13651358
longitude : numeric
13661359
Longitude in degrees
13671360
equation_of_time : numeric
@@ -1389,14 +1382,14 @@ def hour_angle(time, longitude, equation_of_time):
13891382
equation_of_time_pvcdrom
13901383
"""
13911384

1392-
# time must be localized
1393-
if not time.tz:
1394-
raise ValueError('time must be localized')
1385+
# times must be localized
1386+
if not times.tz:
1387+
raise ValueError('times must be localized')
13951388

1396-
# hours - timezone = (time - normalized_time) - (naive_time - time)
1397-
tzs = np.array([ts.utcoffset().total_seconds() for ts in time]) / 3600
1389+
# hours - timezone = (times - normalized_times) - (naive_times - times)
1390+
tzs = np.array([ts.utcoffset().total_seconds() for ts in times]) / 3600
13981391

1399-
hrs_minus_tzs = _times_to_hours_after_local_midnight(time) - tzs
1392+
hrs_minus_tzs = _times_to_hours_after_local_midnight(times) - tzs
14001393

14011394
return 15. * (hrs_minus_tzs - 12.) + longitude + equation_of_time / 4.
14021395

0 commit comments

Comments
 (0)