Skip to content

Commit 1460c3c

Browse files
committed
Fix: wind speed range step in smoothing automatic
1 parent fcdb75a commit 1460c3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

windpowerlib/power_curves.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ def smooth_power_curve(power_curve_wind_speeds, power_curve_values,
134134
maximum_value = power_curve_wind_speeds.values[-1] + wind_speed_range
135135
while power_curve_wind_speeds.values[-1] < maximum_value:
136136
power_curve_wind_speeds = power_curve_wind_speeds.append(
137-
pd.Series(power_curve_wind_speeds.iloc[-1] + 0.5,
137+
pd.Series(power_curve_wind_speeds.iloc[-1] +
138+
(power_curve_wind_speeds[5] -
139+
power_curve_wind_speeds[4]),
138140
index=[power_curve_wind_speeds.index[-1] + 1]))
139141
power_curve_values = power_curve_values.append(
140142
pd.Series(0.0, index=[power_curve_values.index[-1] + 1]))

0 commit comments

Comments
 (0)