@@ -453,8 +453,8 @@ def test_singlediode_floats_ivcurve():
453
453
454
454
@requires_scipy
455
455
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 )
458
458
IL , I0 , Rs , Rsh , nNsVth = pvsystem .calcparams_desoto (
459
459
poa_data ,
460
460
temp_cell = 25 ,
@@ -465,19 +465,21 @@ def test_singlediode_series_ivcurve(cec_module_params):
465
465
466
466
out = pvsystem .singlediode (IL , I0 , Rs , Rsh , nNsVth , ivcurve_pnts = 3 )
467
467
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 ])),
478
475
('v' ,
479
476
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 ]]))])
481
483
482
484
for k , v in out .items ():
483
485
assert_allclose (expected [k ], v , atol = 1e-2 )
0 commit comments