Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/sphinx/source/whatsnew/v0.7.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ API Breaking Changes
of W/m2 rather than suns.
* Calling :py:func:`pvlib.pvsystem.retrieve_sam` with no parameters will raise
an exception instead of displaying a dialog.
* The `modelchain.ModelChain.diode_params` attribute is now formatted in
a pandas.DataFrame with `DatetimeIndex`, rather than in a tuple.

API Changes with Deprecations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
14 changes: 8 additions & 6 deletions pvlib/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from functools import partial
import warnings
import pandas as pd

from pvlib import (atmosphere, clearsky, pvsystem, solarposition, temperature,
tools)
Expand Down Expand Up @@ -453,9 +454,11 @@ def _singlediode(self, calcparams_model_function):
calcparams_model_function(self.effective_irradiance,
self.cell_temperature))

self.diode_params = (photocurrent, saturation_current,
resistance_series,
resistance_shunt, nNsVth)
self.diode_params = pd.DataFrame({'I_L': photocurrent,
'I_o': saturation_current,
'R_s': resistance_series,
'R_sh': resistance_shunt,
'nNsVth': nNsVth})

self.dc = self.system.singlediode(
photocurrent, saturation_current, resistance_series,
Expand Down Expand Up @@ -926,12 +929,11 @@ def run_model(self, weather, times=None):
-------
self

Notes
-----
Assigns attributes: ``solar_position``, ``airmass``, ``irradiance``,
``total_irrad``, ``effective_irradiance``, ``weather``,
``cell_temperature``, ``aoi``, ``aoi_modifier``, ``spectral_modifier``,
``dc``, ``ac``, ``losses``.
``dc``, ``ac``, ``losses``,
``diode_params`` (if dc_model is a single diode model)
"""
if times is not None:
warnings.warn('times keyword argument is deprecated and will be '
Expand Down