diff --git a/docs/sphinx/source/whatsnew/v0.11.2.rst b/docs/sphinx/source/whatsnew/v0.11.2.rst index 00ce09a9a4..e94c0f8734 100644 --- a/docs/sphinx/source/whatsnew/v0.11.2.rst +++ b/docs/sphinx/source/whatsnew/v0.11.2.rst @@ -32,6 +32,8 @@ Bug fixes ~~~~~~~~~ * :py:func:`~pvlib.spa.julian_day_dt` now accounts for the 10 day difference between Julian and Gregorian calendars prior to the year 1582. (:issue:`2077`, :pull:`2249`) +* Corrected sign of temperature coefficient ``dEgdT`` in :py:func:`~pvlib.pvsystem.fit_desoto_sandia`. + Results may differ slightly from previous versions. (:issue:`2311`, :pull:`2322`) Documentation ~~~~~~~~~~~~~ diff --git a/pvlib/ivtools/sdm.py b/pvlib/ivtools/sdm.py index 0c2576d519..9c72fbf7e5 100644 --- a/pvlib/ivtools/sdm.py +++ b/pvlib/ivtools/sdm.py @@ -878,7 +878,7 @@ def fun_rsh(x, rshexp, ee, e0, rsh): params['R_sh_exp'] = R_sh_exp elif model == 'desoto': - dEgdT = 0.0002677 + dEgdT = -0.0002677 x_for_io = const['q'] / const['k'] * ( 1. / tok - 1. / tck[u] + dEgdT * (tc[u] - const['T0']) / tck[u]) diff --git a/pvlib/tests/ivtools/test_sdm.py b/pvlib/tests/ivtools/test_sdm.py index 508591f9e9..e0def04621 100644 --- a/pvlib/tests/ivtools/test_sdm.py +++ b/pvlib/tests/ivtools/test_sdm.py @@ -140,6 +140,9 @@ def test_fit_desoto_sandia(cec_params_cansol_cs5p_220p): expected = pd.Series(params) assert np.allclose(modeled[params.keys()].values, expected[params.keys()].values, rtol=5e-2) + assert_allclose(result['dEgdT'], -0.0002677) + assert_allclose(result['EgRef'], 1.3112547292120638) + assert_allclose(result['cells_in_series'], specs['cells_in_series']) def _read_iv_curves_for_test(datafile, npts):