Skip to content

Commit 9cf9f6c

Browse files
committed
add a moderate point test sd series
1 parent a6db2b8 commit 9cf9f6c

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

pvlib/test/test_pvsystem.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ def test_singlediode_floats_ivcurve():
453453

454454
@requires_scipy
455455
def test_singlediode_series_ivcurve(cec_module_params):
456-
times = pd.DatetimeIndex(start='2015-01-01', periods=2, freq='12H')
457-
poa_data = pd.Series([0, 800], index=times)
456+
times = pd.DatetimeIndex(start='2015-06-01', periods=3, freq='6H')
457+
poa_data = pd.Series([0, 400, 800], index=times)
458458
IL, I0, Rs, Rsh, nNsVth = pvsystem.calcparams_desoto(
459459
poa_data,
460460
temp_cell=25,
@@ -465,19 +465,21 @@ def test_singlediode_series_ivcurve(cec_module_params):
465465

466466
out = pvsystem.singlediode(IL, I0, Rs, Rsh, nNsVth, ivcurve_pnts=3)
467467

468-
expected = OrderedDict([('i_sc', array([ nan, 6.00675648])),
469-
('i_mp', array([ nan, 5.285947])),
470-
('v_oc', array([ nan, 10.29530483])),
471-
('v_mp', array([ nan, 8.415971])),
472-
('p_mp', array([ nan, 44.486373])),
473-
('i_x', array([ nan, 5.74622046])),
474-
('i_xx', array([ nan, 3.90008])),
475-
('i',
476-
array([[ nan, nan, nan],
477-
[ 6.00726296, 5.74622046, 0. ]])),
468+
expected = OrderedDict([('i_sc', array([ nan, 3.01054475, 6.00675648])),
469+
('v_oc', array([ nan, 9.96886962, 10.29530483])),
470+
('i_mp', array([ nan, 2.65191983, 5.28594672])),
471+
('v_mp', array([ nan, 8.33392491, 8.4159707 ])),
472+
('p_mp', array([ nan, 22.10090078, 44.48637274])),
473+
('i_x', array([ nan, 2.88414114, 5.74622046])),
474+
('i_xx', array([ nan, 2.04340914, 3.90007956])),
478475
('v',
479476
array([[ nan, nan, nan],
480-
[ 0. , 5.14765242, 10.29530483]]))])
477+
[ 0. , 4.98443481, 9.96886962],
478+
[ 0. , 5.14765242, 10.29530483]])),
479+
('i',
480+
array([[ nan, nan, nan],
481+
[ 3.01079860e+00, 2.88414114e+00, 3.10862447e-14],
482+
[ 6.00726296e+00, 5.74622046e+00, 0.00000000e+00]]))])
481483

482484
for k, v in out.items():
483485
assert_allclose(expected[k], v, atol=1e-2)

0 commit comments

Comments
 (0)