Skip to content

Commit bdf331d

Browse files
committed
added some comments
1 parent 1e3d413 commit bdf331d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pvlib/pvsystem.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2961,7 +2961,7 @@ def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.,
29612961
pdc = (effective_irradiance * 0.001 * pdc0 *
29622962
(1 + gamma_pdc * (temp_cell - temp_ref)))
29632963

2964-
# apply Marion's correction if k is anything but zero
2964+
# apply Marion's correction if k is provided
29652965
if k is not None:
29662966

29672967
# preserve input types
@@ -2972,14 +2972,18 @@ def pvwatts_dc(effective_irradiance, temp_cell, pdc0, gamma_pdc, temp_ref=25.,
29722972
err_1 = k * (1 - (1 - effective_irradiance / 200)**4)
29732973
err_2 = k * (1000 - effective_irradiance) / (1000 - 200)
29742974
err = np.where(effective_irradiance <= 200, err_1, err_2)
2975+
2976+
# cap adjustment, if needed
29752977
if cap_adjustment:
29762978
err = np.where(effective_irradiance >= 1000, 0, err)
29772979

2980+
# make error adjustment
29782981
pdc = pdc - pdc0 * err
29792982

29802983
# set negative power to zero
29812984
pdc = np.where(pdc < 0, 0, pdc)
29822985

2986+
# preserve input types
29832987
if index is not None:
29842988
pdc = pd.Series(pdc, index=index)
29852989
elif is_scalar:

0 commit comments

Comments
 (0)