Skip to content

Commit 7d431ab

Browse files
committed
lint
1 parent 1e61d09 commit 7d431ab

4 files changed

Lines changed: 6 additions & 12 deletions

File tree

pvlib/ivtools/sdm/desoto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def fit_desoto_batzelis(isc0, voc0, imp0, vmp0, alpha_sc, beta_voc):
422422
alpha_sc : float
423423
Short-circuit current temperature coefficient at STC. [1/K]
424424
beta_voc : float
425-
Open-circuit voltage temperature coefficient at STC. [1/K]
425+
Open-circuit voltage temperature coefficient at STC. [1/K]
426426
427427
Returns
428428
-------

pvlib/singlediode.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -876,16 +876,12 @@ def batzelis_keypoints(photocurrent, saturation_current, resistance_series,
876876
----------
877877
photocurrent : numeric
878878
Light-generated current. [A]
879-
880879
saturation_current : numeric
881880
Diode saturation current. [A]
882-
883881
resistance_series : numeric
884882
Series resistance. [Ohm]
885-
886883
resistance_shunt : numeric
887884
Shunt resistance. [Ohm]
888-
889885
nNsVth : numeric
890886
The product of the usual diode ideality factor (n, unitless),
891887
number of cells in series (Ns), and cell thermal voltage at
@@ -922,7 +918,7 @@ def batzelis_keypoints(photocurrent, saturation_current, resistance_series,
922918

923919
# Eqs 5-8
924920
w = np.real(lambertw(np.e * Iph / Is))
925-
#vmp = (1 + Rs/Rsh) * a * (w - 1) - Rs * Iph * (1 - 1/w) # not needed
921+
# vmp = (1 + Rs/Rsh) * a * (w - 1) - Rs * Iph * (1 - 1/w) # not needed
926922
with np.errstate(divide='ignore', invalid='ignore'): # zero Iph -> zero w
927923
imp = Iph * (1 - 1/w) - a * (w - 1) / Rsh
928924

tests/ivtools/sdm/test_desoto.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,3 @@ def test_fit_desoto_batzelis():
116116
assert iv['i_mp'] == pytest.approx(params['imp0'], rel=3e-3)
117117
assert iv['v_oc'] == pytest.approx(params['voc0'], rel=3e-4)
118118
assert iv['v_mp'] == pytest.approx(params['vmp0'], rel=4e-3)
119-

tests/test_pvarray.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ def test_batzelis():
124124
t = np.array([25, 20, 20, 50, 50, 25, 0, nan])
125125
expected = { # these values were computed using the function itself
126126
'p_mp': [650.044, 328.599, 789.136, 300.079, 723.401, 0, nan, nan],
127-
'i_mp': [ 15.270, 7.626, 18.302, 7.680, 18.433, 0, nan, nan],
128-
'v_mp': [ 42.570, 43.090, 43.117, 39.071, 39.246, 0, nan, nan],
129-
'i_sc': [ 15.980, 7.972, 19.132, 8.082, 19.397, 0, nan, nan],
130-
'v_oc': [ 50.260, 49.687, 51.172, 45.948, 47.585, 0, nan, nan],
127+
'i_mp': [ 15.270, 7.626, 18.302, 7.680, 18.433, 0, nan, nan],
128+
'v_mp': [ 42.570, 43.090, 43.117, 39.071, 39.246, 0, nan, nan],
129+
'i_sc': [ 15.980, 7.972, 19.132, 8.082, 19.397, 0, nan, nan],
130+
'v_oc': [ 50.260, 49.687, 51.172, 45.948, 47.585, 0, nan, nan],
131131
}
132132

133133
# numpy array
@@ -153,4 +153,3 @@ def test_batzelis_negative_voltage():
153153
actual = pvarray.batzelis(1e-10, 25, **params)
154154
assert actual['v_mp'] == 0
155155
assert actual['v_oc'] == 0
156-

0 commit comments

Comments
 (0)