Skip to content

Commit 9e217ae

Browse files
committed
hush flake8
1 parent 1e55ffe commit 9e217ae

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

pvlib/inverter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ def _fit_sandia_field_a(pac, pdc, vdc, pac0, vdc0):
590590
'Parameter fitting requires statsmodels')
591591
# select data. Avoid very low power, clipping and DC voltage far from
592592
# nominal
593-
u = (pac > 0.05*pac0) & (pac < pac0) & (np.abs(vdc - vdc0)/vdc0 < 0.05)
593+
u = (pac > 0.05*pac0) & (pac < pac0) & (np.abs(vdc - vdc0)/vdc0 < 0.05)
594594
Y = pac[u]
595595
X = np.array([pdc[u]**2, pdc[u]]).T
596596
X = sm.add_constant(X)
@@ -616,10 +616,10 @@ def _f2(params, pac0, vdc0, pdc0, ps0, C0, vdc, pdc, pac):
616616
p['Vdco'] = vdc0 # DC V
617617
p['Pdco'] = pdc0 # DC power
618618
p['Pso'] = ps0 # DC power, small
619-
p['C0'] = C0 # unitless, tiny
620-
p['C1'] = params[0] # 1/V, tiny
619+
p['C0'] = C0 # unitless, tiny
620+
p['C1'] = params[0] # 1/V, tiny
621621
p['C2'] = params[1] # 1/V, tiny
622-
p['C3'] = params[2] # 1/V tiny
622+
p['C3'] = params[2] # 1/V tiny
623623
diff = (_sandia_eff(vdc, pdc, p) - pac)
624624
return np.sqrt(np.dot(diff, diff))
625625

@@ -653,7 +653,7 @@ def _fit_sandia_field_b(resid, pac, pdc, vdc, pac0, vdc0, pdc0, ps0, C0):
653653
Parameters for the Sandia inverter model including C1, C2 and C3.
654654
'''
655655
# select data. Avoid very low power and clipping
656-
u = (pac > 0.05*pac0) & (pac < pac0)
656+
u = (pac > 0.05*pac0) & (pac < pac0)
657657

658658
# initial guess
659659
x0 = np.array([0., 0., 0.])

tests/test_inverter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def test_fit_sandia_lab(infilen, expected):
207207
curves = pd.read_csv(infilen)
208208
dc_power = curves['ac_power'] / curves['efficiency']
209209
result = inverter.fit_sandia_lab(
210-
ac_power=curves['ac_power'], dc_power=dc_power,
210+
ac_power=curves['ac_power'], dc_power=dc_power,
211211
dc_voltage=curves['dc_voltage'],
212212
dc_voltage_level=curves['dc_voltage_level'],
213213
p_ac_0=expected['Paco'], p_nt=expected['Pnt'])
@@ -218,7 +218,7 @@ def test_fit_sandia_lab(infilen, expected):
218218
def test_fit_sandia_field():
219219
pdc = np.arange(start=100., stop=1300., step=100.)
220220
vdc = np.array([550., 600., 650, 550., 600., 650, 550., 600., 650,
221-
550., 600., 650])
221+
550., 600., 650])
222222
params = {'Paco': 1200, 'Pdco': 1300, 'Pso': 10, 'C0': 1e-6, 'C1': 1e-7,
223223
'C2': 1e-7, 'C3': 1e-7, 'Vdco': 600}
224224
# pac was computed with pvlib.inverter._sandia_eff

0 commit comments

Comments
 (0)