@@ -2224,9 +2224,11 @@ def sapm(effective_irradiance, temp_cell, module):
22242224 * v_mp : Voltage at maximum-power point (V)
22252225 * p_mp : Power at maximum-power point (W)
22262226 * i_x : Current at module V = 0.5Voc, defines 4th point on I-V
2227- curve for modeling curve shape
2227+ curve for modeling curve shape. Omitted if ``C4`` and ``C5``
2228+ parameters are not supplied.
22282229 * i_xx : Current at module V = 0.5(Voc+Vmp), defines 5th point on
2229- I-V curve for modeling curve shape
2230+ I-V curve for modeling curve shape. Omitted if ``C6`` and ``C7``
2231+ parameters are not supplied.
22302232
22312233 Notes
22322234 -----
@@ -2334,13 +2336,15 @@ def sapm(effective_irradiance, temp_cell, module):
23342336
23352337 out ['p_mp' ] = out ['i_mp' ] * out ['v_mp' ]
23362338
2337- out ['i_x' ] = (
2338- module ['IXO' ] * (module ['C4' ]* Ee + module ['C5' ]* (Ee ** 2 )) *
2339- (1 + module ['Aisc' ]* (temp_cell - temp_ref )))
2339+ if 'C4' in module and 'C5' in module :
2340+ out ['i_x' ] = (
2341+ module ['IXO' ] * (module ['C4' ]* Ee + module ['C5' ]* (Ee ** 2 )) *
2342+ (1 + module ['Aisc' ]* (temp_cell - temp_ref )))
23402343
2341- out ['i_xx' ] = (
2342- module ['IXXO' ] * (module ['C6' ]* Ee + module ['C7' ]* (Ee ** 2 )) *
2343- (1 + module ['Aimp' ]* (temp_cell - temp_ref )))
2344+ if 'C6' in module and 'C7' in module :
2345+ out ['i_xx' ] = (
2346+ module ['IXXO' ] * (module ['C6' ]* Ee + module ['C7' ]* (Ee ** 2 )) *
2347+ (1 + module ['Aimp' ]* (temp_cell - temp_ref )))
23442348
23452349 if isinstance (out ['i_sc' ], pd .Series ):
23462350 out = pd .DataFrame (out )
0 commit comments