Skip to content

Commit b50b56f

Browse files
echedey-lscwhansekandersolar
authored
Add minus sign in front of dEgdT, sdm.py (#2322)
* Add - in front of dEgdT Co-Authored-By: Cliff Hansen <[email protected]> Co-Authored-By: Kevin Anderson <[email protected]> * assert np.allclose -> assert_allclose * test scalar values * rtol unnecessary * revert back assert_allclose changes * document returned value `dEgdT` * whatsnew * Revert "document returned value `dEgdT`" This reverts commit 40451a1. --------- Co-authored-by: Cliff Hansen <[email protected]> Co-authored-by: Kevin Anderson <[email protected]>
1 parent cb37129 commit b50b56f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/sphinx/source/whatsnew/v0.11.2.rst

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Bug fixes
3232
~~~~~~~~~
3333
* :py:func:`~pvlib.spa.julian_day_dt` now accounts for the 10 day difference
3434
between Julian and Gregorian calendars prior to the year 1582. (:issue:`2077`, :pull:`2249`)
35+
* Corrected sign of temperature coefficient ``dEgdT`` in :py:func:`~pvlib.pvsystem.fit_desoto_sandia`.
36+
Results may differ slightly from previous versions. (:issue:`2311`, :pull:`2322`)
3537

3638
Documentation
3739
~~~~~~~~~~~~~

pvlib/ivtools/sdm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def fun_rsh(x, rshexp, ee, e0, rsh):
878878
params['R_sh_exp'] = R_sh_exp
879879

880880
elif model == 'desoto':
881-
dEgdT = 0.0002677
881+
dEgdT = -0.0002677
882882
x_for_io = const['q'] / const['k'] * (
883883
1. / tok - 1. / tck[u] + dEgdT * (tc[u] - const['T0']) / tck[u])
884884

pvlib/tests/ivtools/test_sdm.py

+3
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,9 @@ def test_fit_desoto_sandia(cec_params_cansol_cs5p_220p):
140140
expected = pd.Series(params)
141141
assert np.allclose(modeled[params.keys()].values,
142142
expected[params.keys()].values, rtol=5e-2)
143+
assert_allclose(result['dEgdT'], -0.0002677)
144+
assert_allclose(result['EgRef'], 1.3112547292120638)
145+
assert_allclose(result['cells_in_series'], specs['cells_in_series'])
143146

144147

145148
def _read_iv_curves_for_test(datafile, npts):

0 commit comments

Comments
 (0)