Skip to content

Commit

Permalink
Fix: wind speed range step in smoothing automatic
Browse files Browse the repository at this point in the history
  • Loading branch information
SabineHaas committed Aug 16, 2019
1 parent fcdb75a commit 1460c3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion windpowerlib/power_curves.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
maximum_value = power_curve_wind_speeds.values[-1] + wind_speed_range
while power_curve_wind_speeds.values[-1] < maximum_value:
power_curve_wind_speeds = power_curve_wind_speeds.append(
pd.Series(power_curve_wind_speeds.iloc[-1] + 0.5,
pd.Series(power_curve_wind_speeds.iloc[-1] +
(power_curve_wind_speeds[5] -
power_curve_wind_speeds[4]),
index=[power_curve_wind_speeds.index[-1] + 1]))
power_curve_values = power_curve_values.append(
pd.Series(0.0, index=[power_curve_values.index[-1] + 1]))
Expand Down

0 comments on commit 1460c3c

Please sign in to comment.