From 66dcb886aee2d09ad5920bf1faa0d7227b0d5414 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 7 Aug 2018 08:29:57 -0700 Subject: [PATCH 1/5] add stub pvsystem.ipynb doc --- docs/sphinx/source/index.rst | 1 + docs/sphinx/source/pvsystem.ipynb | 49 +++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 docs/sphinx/source/pvsystem.ipynb diff --git a/docs/sphinx/source/index.rst b/docs/sphinx/source/index.rst index a5ad0d3e4e..12ab115500 100644 --- a/docs/sphinx/source/index.rst +++ b/docs/sphinx/source/index.rst @@ -74,6 +74,7 @@ Contents whatsnew installation contributing + pvsystem modelchain timetimezones clearsky diff --git a/docs/sphinx/source/pvsystem.ipynb b/docs/sphinx/source/pvsystem.ipynb new file mode 100644 index 0000000000..073b1c0d6d --- /dev/null +++ b/docs/sphinx/source/pvsystem.ipynb @@ -0,0 +1,49 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# PVSystem" + ] + }, + { + "cell_type": "raw", + "metadata": { + "raw_mimetype": "text/restructuredtext" + }, + "source": [ + "The :py:class:`~.pvsystem.PVSystem` class is a wrapper for many of the functions in the :py:mod:`~.pvsystem` module. The class separates the intrinsic attributes of a PV system from the extrinsic environment that it is subject to. This guide aims to build users' understanding of the PVSystem class. It assumes some familiarity with object-oriented code in Python, but most information should be understandable even without a solid understanding of classes. See the ModelChain documentation for a similar guide focused on using PVSystem objects in time series modeling applications." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "celltoolbar": "Raw Cell Format", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.6" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} From 971f6d7c93a53910a40ffea94dc76bed22cb2c41 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 28 Aug 2018 12:14:28 -0700 Subject: [PATCH 2/5] use rst instead of ipynb --- docs/sphinx/source/pvsystem.ipynb | 49 ------------ docs/sphinx/source/pvsystem.rst | 122 ++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 49 deletions(-) delete mode 100644 docs/sphinx/source/pvsystem.ipynb create mode 100644 docs/sphinx/source/pvsystem.rst diff --git a/docs/sphinx/source/pvsystem.ipynb b/docs/sphinx/source/pvsystem.ipynb deleted file mode 100644 index 073b1c0d6d..0000000000 --- a/docs/sphinx/source/pvsystem.ipynb +++ /dev/null @@ -1,49 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# PVSystem" - ] - }, - { - "cell_type": "raw", - "metadata": { - "raw_mimetype": "text/restructuredtext" - }, - "source": [ - "The :py:class:`~.pvsystem.PVSystem` class is a wrapper for many of the functions in the :py:mod:`~.pvsystem` module. The class separates the intrinsic attributes of a PV system from the extrinsic environment that it is subject to. This guide aims to build users' understanding of the PVSystem class. It assumes some familiarity with object-oriented code in Python, but most information should be understandable even without a solid understanding of classes. See the ModelChain documentation for a similar guide focused on using PVSystem objects in time series modeling applications." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "celltoolbar": "Raw Cell Format", - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.6.6" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/docs/sphinx/source/pvsystem.rst b/docs/sphinx/source/pvsystem.rst new file mode 100644 index 0000000000..a6c45fa1e2 --- /dev/null +++ b/docs/sphinx/source/pvsystem.rst @@ -0,0 +1,122 @@ +.. _pvsystem: + +PVSystem +======== + +The :py:class:`~.pvsystem.PVSystem` class wraps many of the functions in +the :py:mod:`~.pvsystem` module. This simplifies the API by eliminating +the need for a user to specify arguments such as module and +inverter properties when calling PVSystem methods. + +This guide aims to build understanding of the PVSystem class. It assumes +basic familiarity with object-oriented code in Python, but most +information should be understandable without a solid understanding of +classes. Keep in mind that `functions` are independent of objects, +while `methods` are attached to objects. + +See the :ref:`modelchain` documentation for a similar guide +focused on using PVSystem objects in time series modeling applications. + + +.. _designphilosophy: + +Design philosophy +----------------- + +The PVSystem class is designed to separate the data that represents a PV +system (e.g. tilt angle or module parameters) from the data that +influences the PV system (e.g. the weather). + +The data that represents the PV system is *intrinsic*. The +data that influences the PV system is *extrinsic*. + +Intrinsic data is stored in object attributes. For example, the data +that describes a PV system's module parameters is stored in +`PVSystem.module_parameters`. + +.. ipython:: + + module_parameters = {'pdc0': 10, 'gamma_pdc': -0.004} + system = pvsystem.PVSystem(module_parameters=module_parameters) + print(system.module_parameters) + +Extrinsic data is passed to a PVSystem as method arguments. For example, +the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method accepts extrinsic +data irradiance and temperature. + +.. ipython:: + + pdc = system.pvwatts_dc(1000, 30) + print(pdc) + +Compare the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method signature +to the :py:func:`~pvsystem.pvwatts_dc` function signature. + +:py:meth:`~pvsystem.PVSystem.pvwatts_dc`: ``pvwatts_dc(g_poa_effective, temp_cell)`` +:py:func:`~pvsystem.pvwatts_dc`: ``pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.)`` + +How does this work? The :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method +looks in `PVSystem.module_parameters` for the `pdc0`, `gamma_pdc` +arguments. Then the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` calls the +:py:func:`~pvsystem.pvwatts_dc` function with all of the arguments and +returns the result to the user. Note that the function includes a +default value for the parameter `temp_ref`. This default value may be +overridden by specifying the `temp_ref` key in the +`PVSystem.module_parameters` dictionary. + +.. ipython:: + + system.module_parameters['temp_ref'] = 0 + pdc = system.pvwatts_dc(1000, 30) + print(pdc) + +Multiple methods may pull data from the same attribute. For example, the +`PVSystem.module_parameters` attribute is used by the DC model methods +as well as the incidence angle modifier methods. + + +.. _pvsystemattributes: + +PVSystem attributes +------------------- + +Here we review the most commonly used PVSystem attributes. +Please see the :py:class:`~.pvsystem.PVSystem` class documentation for a +comprehensive list. + +`module_parameters` and `inverter_parameters` contain the data +necessary for computing DC and AC power using one of the available +PVSystem methods. These are typically specified using data from +the :py:func:`~pvsystem.retreive_sam` function: + +.. ipython:: + + modules = pvsystem.retrieve_sam('cecmod') + module_parameters = modules['Example_Module'] + inverters = pvsystem.retrieve_sam('cecinverter') + inverter_parameters = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'] + system = pvsystem.PVSystem(module_parameters=module_parameters, inverter_parameters=inverter_parameters) + +As shown above, the parameters can also be specified manually. +This is useful for specifying modules and inverters that are not +included in the supplied databases. It is also useful for specifying +systems for use with the PVWatts models, as demonstrated in +:ref:`designphilosophy`. + +The `losses_parameters` attribute contains data that may be used with +methods that calculate system losses. At present, this is only incudes +:py:meth:`~PVSystem.pvwatts_losses` and +:py:func:`~pvsystem.pvwatts_losses`, but we hope to add more functions +and methods in the future. + +modules_per_string and strings_per_inverter + +miscellaneous attributes + + +.. _sat: + +SingleAxisTracker +----------------- + +SingleAxisTracker is a subclass of PVSystem \ No newline at end of file From b09a4dcbeca5ea937bd6dfac7ed2b76846a8b3bf Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Tue, 28 Aug 2018 14:18:43 -0700 Subject: [PATCH 3/5] updates, add whatsnew --- docs/sphinx/source/pvsystem.rst | 96 +++++++++++++++++--------- docs/sphinx/source/whatsnew/v0.6.0.rst | 1 + 2 files changed, 65 insertions(+), 32 deletions(-) diff --git a/docs/sphinx/source/pvsystem.rst b/docs/sphinx/source/pvsystem.rst index a6c45fa1e2..a70f61771b 100644 --- a/docs/sphinx/source/pvsystem.rst +++ b/docs/sphinx/source/pvsystem.rst @@ -1,12 +1,20 @@ -.. _pvsystem: +.. _pvsystemdoc: PVSystem ======== -The :py:class:`~.pvsystem.PVSystem` class wraps many of the functions in -the :py:mod:`~.pvsystem` module. This simplifies the API by eliminating -the need for a user to specify arguments such as module and -inverter properties when calling PVSystem methods. +.. ipython:: python + :suppress: + + from pvlib import pvsystem + +The :py:class:`~pvlib.pvsystem.PVSystem` class wraps many of the +functions in the :py:mod:`~pvlib.pvsystem` module. This simplifies the +API by eliminating the need for a user to specify arguments such as +module and inverter properties when calling PVSystem methods. +:py:class:`~pvlib.pvsystem.PVSystem` is not better or worse than the +functions it wraps -- it is simply an alternative way of organizing +your data. This guide aims to build understanding of the PVSystem class. It assumes basic familiarity with object-oriented code in Python, but most @@ -14,8 +22,8 @@ information should be understandable without a solid understanding of classes. Keep in mind that `functions` are independent of objects, while `methods` are attached to objects. -See the :ref:`modelchain` documentation for a similar guide -focused on using PVSystem objects in time series modeling applications. +See :py:class:`~pvlib.modelchain.ModelChain` for an application of +PVSystem to time series modeling. .. _designphilosophy: @@ -34,39 +42,41 @@ Intrinsic data is stored in object attributes. For example, the data that describes a PV system's module parameters is stored in `PVSystem.module_parameters`. -.. ipython:: +.. ipython:: python module_parameters = {'pdc0': 10, 'gamma_pdc': -0.004} system = pvsystem.PVSystem(module_parameters=module_parameters) print(system.module_parameters) Extrinsic data is passed to a PVSystem as method arguments. For example, -the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method accepts extrinsic +the :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method accepts extrinsic data irradiance and temperature. -.. ipython:: +.. ipython:: python pdc = system.pvwatts_dc(1000, 30) print(pdc) -Compare the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method signature -to the :py:func:`~pvsystem.pvwatts_dc` function signature. +Compare the :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature +to the :py:func:`~pvlib.pvsystem.pvwatts_dc` function signature: -:py:meth:`~pvsystem.PVSystem.pvwatts_dc`: ``pvwatts_dc(g_poa_effective, temp_cell)`` -:py:func:`~pvsystem.pvwatts_dc`: ``pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.)`` + * :py:meth:`PVSystem.pvwatts_dc(g_poa_effective, temp_cell) ` + * :py:func:`pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.) ` -How does this work? The :py:meth:`~pvsystem.PVSystem.pvwatts_dc` method -looks in `PVSystem.module_parameters` for the `pdc0`, `gamma_pdc` -arguments. Then the :py:meth:`~pvsystem.PVSystem.pvwatts_dc` calls the -:py:func:`~pvsystem.pvwatts_dc` function with all of the arguments and -returns the result to the user. Note that the function includes a -default value for the parameter `temp_ref`. This default value may be -overridden by specifying the `temp_ref` key in the +How does this work? The :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` +method looks in `PVSystem.module_parameters` for the `pdc0`, and +`gamma_pdc` arguments. Then the :py:meth:`PVSystem.pvwatts_dc +` method calls the +:py:func:`pvsystem.pvwatts_dc ` function with +all of the arguments and returns the result to the user. Note that the +function includes a default value for the parameter `temp_ref`. This +default value may be overridden by specifying the `temp_ref` key in the `PVSystem.module_parameters` dictionary. -.. ipython:: +.. ipython:: python system.module_parameters['temp_ref'] = 0 + # lower temp_ref should to lower DC power than calculated above pdc = system.pvwatts_dc(1000, 30) print(pdc) @@ -81,15 +91,30 @@ PVSystem attributes ------------------- Here we review the most commonly used PVSystem attributes. -Please see the :py:class:`~.pvsystem.PVSystem` class documentation for a +Please see the :py:class:`~pvlib.pvsystem.PVSystem` class documentation for a comprehensive list. +The first PVSystem parameters are `surface_tilt` and `surface_azimuth`. +These parameters are used in PVSystem methods such as +:py:meth:`~pvlib.pvsystem.PVSystem.get_aoi` and +:py:meth:`~pvlib.pvsystem.PVSystem.get_irradiance`. + +.. ipython:: python + + # 20 deg tilt, south-facing + system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180) + print(system.surface_tilt, system.surface_azimuth) + + # call get_aoi with solar_zenith, solar_zenith + aoi = system.get_aoi(30, 180) + print(aoi) + `module_parameters` and `inverter_parameters` contain the data necessary for computing DC and AC power using one of the available PVSystem methods. These are typically specified using data from -the :py:func:`~pvsystem.retreive_sam` function: +the :py:func:`~pvlib.pvsystem.retrieve_sam` function: -.. ipython:: +.. ipython:: python modules = pvsystem.retrieve_sam('cecmod') module_parameters = modules['Example_Module'] @@ -105,13 +130,15 @@ systems for use with the PVWatts models, as demonstrated in The `losses_parameters` attribute contains data that may be used with methods that calculate system losses. At present, this is only incudes -:py:meth:`~PVSystem.pvwatts_losses` and -:py:func:`~pvsystem.pvwatts_losses`, but we hope to add more functions -and methods in the future. - -modules_per_string and strings_per_inverter +:py:meth:`PVSystem.pvwatts_losses +` and +:py:func:`pvsystem.pvwatts_losses `, but +we hope to add more functions and methods in the future. -miscellaneous attributes +The attributes `modules_per_string` and `strings_per_inverter` are used +by some DC power models in :py:class:`~pvlib.modelchain.ModelChain`. +They are also used in the +:py:meth:`~pvlib.pvsystem.PVSystem.scale_voltage_current_power` method. .. _sat: @@ -119,4 +146,9 @@ miscellaneous attributes SingleAxisTracker ----------------- -SingleAxisTracker is a subclass of PVSystem \ No newline at end of file +The :py:class:`~pvlib.tracking.SingleAxisTracker` is a subclass of +:py:class:`~pvlib.pvsystem.PVSystem`. The SingleAxisTracker class +includes a few more keyword arguments and attributes that are specific +to trackers, plus adds the +:py:meth:`~pvlib.tracking.SingleAxisTracker.singleaxis` method. It also +overrides the `get_aoi` and `get_irradiance` methods. \ No newline at end of file diff --git a/docs/sphinx/source/whatsnew/v0.6.0.rst b/docs/sphinx/source/whatsnew/v0.6.0.rst index 9dc9a13313..4667d95d24 100644 --- a/docs/sphinx/source/whatsnew/v0.6.0.rst +++ b/docs/sphinx/source/whatsnew/v0.6.0.rst @@ -143,6 +143,7 @@ Documentation * Move the "Getting Started"/"Modeling Paradigms" section to a new top-level "Intro Examples" page. * Copy pvlib documentation's "Getting support" section to README.md. +* Add PVSystem documentation page. (:issue:`514`, :issue:`319`) Testing From 0036df5007c374be15a5a8ed58195acc92f376f5 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Thu, 30 Aug 2018 15:16:47 -0700 Subject: [PATCH 4/5] add scale section. other edits --- docs/sphinx/source/pvsystem.rst | 35 ++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/docs/sphinx/source/pvsystem.rst b/docs/sphinx/source/pvsystem.rst index a70f61771b..b8f8ef353c 100644 --- a/docs/sphinx/source/pvsystem.rst +++ b/docs/sphinx/source/pvsystem.rst @@ -6,6 +6,7 @@ PVSystem .. ipython:: python :suppress: + import pandas as pd from pvlib import pvsystem The :py:class:`~pvlib.pvsystem.PVSystem` class wraps many of the @@ -76,7 +77,7 @@ default value may be overridden by specifying the `temp_ref` key in the .. ipython:: python system.module_parameters['temp_ref'] = 0 - # lower temp_ref should to lower DC power than calculated above + # lower temp_ref should lead to lower DC power than calculated above pdc = system.pvwatts_dc(1000, 30) print(pdc) @@ -90,8 +91,8 @@ as well as the incidence angle modifier methods. PVSystem attributes ------------------- -Here we review the most commonly used PVSystem attributes. -Please see the :py:class:`~pvlib.pvsystem.PVSystem` class documentation for a +Here we review the most commonly used PVSystem attributes. Please see +the :py:class:`~pvlib.pvsystem.PVSystem` class documentation for a comprehensive list. The first PVSystem parameters are `surface_tilt` and `surface_azimuth`. @@ -122,23 +123,33 @@ the :py:func:`~pvlib.pvsystem.retrieve_sam` function: inverter_parameters = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'] system = pvsystem.PVSystem(module_parameters=module_parameters, inverter_parameters=inverter_parameters) -As shown above, the parameters can also be specified manually. -This is useful for specifying modules and inverters that are not -included in the supplied databases. It is also useful for specifying -systems for use with the PVWatts models, as demonstrated in -:ref:`designphilosophy`. +The parameters can also be specified manually. This is useful for +specifying modules and inverters that are not included in the supplied +databases. It is also useful for specifying systems for use with the +PVWatts models, as demonstrated in :ref:`designphilosophy`. The `losses_parameters` attribute contains data that may be used with methods that calculate system losses. At present, this is only incudes :py:meth:`PVSystem.pvwatts_losses ` and :py:func:`pvsystem.pvwatts_losses `, but -we hope to add more functions and methods in the future. +we hope to add more related functions and methods in the future. The attributes `modules_per_string` and `strings_per_inverter` are used -by some DC power models in :py:class:`~pvlib.modelchain.ModelChain`. -They are also used in the -:py:meth:`~pvlib.pvsystem.PVSystem.scale_voltage_current_power` method. +in the :py:meth:`~pvlib.pvsystem.PVSystem.scale_voltage_current_power` +method. Some DC power models in :py:class:`~pvlib.modelchain.ModelChain` +automatically call this method and make use of these attributes. As an +example, consider a system with 35 modules arranged into 5 strings of 7 +modules each. + +.. ipython:: python + + system = pvsystem.PVSystem(modules_per_string=7, strings_per_inverter=5) + # crude numbers from a single module + data = pd.DataFrame({'v_mp': 8, 'v_oc': 10, 'i_mp': 5, 'i_x': 6, + 'i_xx': 4, 'i_sc': 7, 'p_mp': 40}, index=[0]) + data_scaled = system.scale_voltage_current_power(data) + print(data_scaled) .. _sat: From 9c452396a1e604f652eca9355f12556287a58fa0 Mon Sep 17 00:00:00 2001 From: Will Holmgren Date: Fri, 31 Aug 2018 11:14:35 -0700 Subject: [PATCH 5/5] incorporate review feedback --- docs/sphinx/source/pvsystem.rst | 41 +++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/docs/sphinx/source/pvsystem.rst b/docs/sphinx/source/pvsystem.rst index b8f8ef353c..d3c6871819 100644 --- a/docs/sphinx/source/pvsystem.rst +++ b/docs/sphinx/source/pvsystem.rst @@ -15,7 +15,7 @@ API by eliminating the need for a user to specify arguments such as module and inverter properties when calling PVSystem methods. :py:class:`~pvlib.pvsystem.PVSystem` is not better or worse than the functions it wraps -- it is simply an alternative way of organizing -your data. +your data and calculations. This guide aims to build understanding of the PVSystem class. It assumes basic familiarity with object-oriented code in Python, but most @@ -32,9 +32,9 @@ PVSystem to time series modeling. Design philosophy ----------------- -The PVSystem class is designed to separate the data that represents a PV -system (e.g. tilt angle or module parameters) from the data that -influences the PV system (e.g. the weather). +The PVSystem class allows modelers to easily separate the data that +represents a PV system (e.g. tilt angle or module parameters) from the +data that influences the PV system (e.g. the weather). The data that represents the PV system is *intrinsic*. The data that influences the PV system is *extrinsic*. @@ -58,8 +58,11 @@ data irradiance and temperature. pdc = system.pvwatts_dc(1000, 30) print(pdc) -Compare the :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature -to the :py:func:`~pvlib.pvsystem.pvwatts_dc` function signature: +Methods attached to a PVSystem object wrap corresponding functions in +:py:mod:`~pvlib.pvsystem`. The methods simplify the argument list by +using data stored in the PVSystem attributes. Compare the +:py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature to the +:py:func:`~pvlib.pvsystem.pvwatts_dc` function signature: * :py:meth:`PVSystem.pvwatts_dc(g_poa_effective, temp_cell) ` * :py:func:`pvwatts_dc(g_poa_effective, temp_cell, pdc0, gamma_pdc, temp_ref=25.) ` @@ -98,7 +101,12 @@ comprehensive list. The first PVSystem parameters are `surface_tilt` and `surface_azimuth`. These parameters are used in PVSystem methods such as :py:meth:`~pvlib.pvsystem.PVSystem.get_aoi` and -:py:meth:`~pvlib.pvsystem.PVSystem.get_irradiance`. +:py:meth:`~pvlib.pvsystem.PVSystem.get_irradiance`. Angle of incidence +(AOI) calculations require `surface_tilt`, `surface_azimuth` and also +the sun position. The :py:meth:`~pvlib.pvsystem.PVSystem.get_aoi` method +uses the `surface_tilt` and `surface_azimuth` attributes in its PVSystem +object, and so requires only `solar_zenith` and `solar_azimuth` as +arguments. .. ipython:: python @@ -106,7 +114,7 @@ These parameters are used in PVSystem methods such as system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180) print(system.surface_tilt, system.surface_azimuth) - # call get_aoi with solar_zenith, solar_zenith + # call get_aoi with solar_zenith, solar_azimuth aoi = system.get_aoi(30, 180) print(aoi) @@ -117,20 +125,23 @@ the :py:func:`~pvlib.pvsystem.retrieve_sam` function: .. ipython:: python + # retrieve_sam returns a dict. the dict keys are module names, + # and the values are model parameters for that module modules = pvsystem.retrieve_sam('cecmod') module_parameters = modules['Example_Module'] inverters = pvsystem.retrieve_sam('cecinverter') inverter_parameters = inverters['ABB__MICRO_0_25_I_OUTD_US_208_208V__CEC_2014_'] system = pvsystem.PVSystem(module_parameters=module_parameters, inverter_parameters=inverter_parameters) -The parameters can also be specified manually. This is useful for -specifying modules and inverters that are not included in the supplied -databases. It is also useful for specifying systems for use with the -PVWatts models, as demonstrated in :ref:`designphilosophy`. +The module and/or inverter parameters can also be specified manually. +This is useful for specifying modules and inverters that are not +included in the supplied databases. It is also useful for specifying +systems for use with the PVWatts models, as demonstrated in +:ref:`designphilosophy`. The `losses_parameters` attribute contains data that may be used with -methods that calculate system losses. At present, this is only incudes -:py:meth:`PVSystem.pvwatts_losses +methods that calculate system losses. At present, these methods include +only :py:meth:`PVSystem.pvwatts_losses ` and :py:func:`pvsystem.pvwatts_losses `, but we hope to add more related functions and methods in the future. @@ -160,6 +171,6 @@ SingleAxisTracker The :py:class:`~pvlib.tracking.SingleAxisTracker` is a subclass of :py:class:`~pvlib.pvsystem.PVSystem`. The SingleAxisTracker class includes a few more keyword arguments and attributes that are specific -to trackers, plus adds the +to trackers, plus the :py:meth:`~pvlib.tracking.SingleAxisTracker.singleaxis` method. It also overrides the `get_aoi` and `get_irradiance` methods. \ No newline at end of file