Skip to content

Commit 3c98e44

Browse files
Birgit SchachlerBirgit Schachler
authored andcommitted
Fix examples and missed renamings of P to p
1 parent 3495974 commit 3c98e44

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

windpowerlib/power_output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def cp_curve_density_corr(v_wind, rho_hub, d_rotor, cp_values):
112112
p_values = (1 / 8 * 1.225 * d_rotor ** 2 * np.pi *
113113
np.power(cp_values.index, 3) * cp_values.cp)
114114
p_values = pd.DataFrame(data=np.array(p_values), index=cp_values.index,
115-
columns=['P'])
115+
columns=['p'])
116116
return p_curve_density_corr(v_wind, rho_hub, p_values)
117117

118118

@@ -144,7 +144,7 @@ def p_curve(p_values, v_wind):
144144
wind speed given in the power curve is zero.
145145
146146
"""
147-
power_output = np.interp(v_wind, p_values.index, p_values.P,
147+
power_output = np.interp(v_wind, p_values.index, p_values.p,
148148
left=0, right=0)
149149
# Set index for time series
150150
try:

windpowerlib/tests/modelchain_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def setUpClass(self):
2929
self.test_turbine = {'hub_height': 100,
3030
'd_rotor': 80,
3131
'turbine_name': 'ENERCON E 126 7500',
32-
'fetch_curve': 'P'}
32+
'fetch_curve': 'p'}
3333
self.test_wt = wt.WindTurbine(**self.test_turbine)
3434
self.test_modelchain = {'wind_model': 'hellman',
3535
'rho_model': 'barometric',

windpowerlib/tests/power_output_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def setUpClass(self):
1515
self.d_rotor = 80
1616
self.cp_values = pd.DataFrame(data={'cp': [0.3, 0.4, 0.5]},
1717
index=[4.0, 5.0, 6.0])
18-
self.p_values = pd.DataFrame(data={'P': [300, 400, 500]},
18+
self.p_values = pd.DataFrame(data={'p': [300, 400, 500]},
1919
index=[4.0, 5.0, 6.0])
2020

2121
def test_cp_curve(self):

0 commit comments

Comments
 (0)