Skip to content

Commit b73d4a2

Browse files
authored
Minor edits to introtutorial.rst and pvsystem.rst for Mount (#1267)
* simple edits * whatsnew
1 parent 7766bc6 commit b73d4a2

File tree

3 files changed

+30
-24
lines changed

3 files changed

+30
-24
lines changed

docs/sphinx/source/introtutorial.rst

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,25 @@ to accomplish our system modeling goal:
154154
155155
.. _object-oriented:
156156

157-
Object oriented (Location, PVSystem, ModelChain)
158-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159-
160-
The first object oriented paradigm uses a model where a
161-
:py:class:`~pvlib.pvsystem.PVSystem` object represents an assembled
162-
collection of modules, inverters, etc., a
163-
:py:class:`~pvlib.location.Location` object represents a particular
164-
place on the planet, and a :py:class:`~pvlib.modelchain.ModelChain`
165-
object describes the modeling chain used to calculate PV output at that
166-
Location. This can be a useful paradigm if you prefer to think about the
157+
Object oriented (Location, Mount, Array, PVSystem, ModelChain)
158+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
159+
160+
The object oriented paradigm uses a model with three main concepts:
161+
162+
1. System design (modules, inverters etc.) is represented by
163+
:py:class:`~pvlib.pvsystem.PVSystem`, :py:class:`~pvlib.pvsystem.Array`,
164+
and :py:class:`~pvlib.pvsystem.FixedMount`
165+
/:py:class:`~pvlib.pvsystem.SingleAxisTrackerMount` objects.
166+
2. A particular place on the planet is represented by a
167+
:py:class:`~pvlib.location.Location` object.
168+
3. The modeling chain used to calculate power output for a particular
169+
system and location is represented by a
170+
:py:class:`~pvlib.modelchain.ModelChain` object.
171+
172+
This can be a useful paradigm if you prefer to think about the
167173
PV system and its location as separate concepts or if you develop your
168174
own ModelChain subclasses. It can also be helpful if you make extensive
169-
use of Location-specific methods for other calculations. pvlib-python
170-
also includes a :py:class:`~pvlib.tracking.SingleAxisTracker` class that
171-
is a subclass of :py:class:`~pvlib.pvsystem.PVSystem`.
175+
use of Location-specific methods for other calculations.
172176

173177
The following code demonstrates how to use
174178
:py:class:`~pvlib.location.Location`,
@@ -179,14 +183,14 @@ that can provide default selections for models and can also fill
179183
necessary input with modeled data. For example, no air temperature
180184
or wind speed data is provided in the input *weather* DataFrame,
181185
so the ModelChain object defaults to 20 C and 0 m/s. Also, no irradiance
182-
transposition model is specified (keyword argument `transposition` for
186+
transposition model is specified (keyword argument `transposition_model` for
183187
ModelChain) so the ModelChain defaults to the `haydavies` model. In this
184188
example, ModelChain infers the DC power model from the module provided
185189
by examining the parameters defined for the module.
186190

187191
.. ipython:: python
188192
189-
from pvlib.pvsystem import PVSystem
193+
from pvlib.pvsystem import PVSystem, Array, FixedMount
190194
from pvlib.location import Location
191195
from pvlib.modelchain import ModelChain
192196
@@ -200,14 +204,13 @@ by examining the parameters defined for the module.
200204
altitude=altitude,
201205
tz=timezone,
202206
)
203-
system = PVSystem(
204-
surface_tilt=latitude,
205-
surface_azimuth=180,
207+
mount = FixedMount(surface_tilt=latitude, surface_azimuth=180)
208+
array = Array(
209+
mount=mount,
206210
module_parameters=module,
207-
inverter_parameters=inverter,
208211
temperature_model_parameters=temperature_model_parameters,
209212
)
210-
213+
system = PVSystem(arrays=[array], inverter_parameters=inverter)
211214
mc = ModelChain(system, location)
212215
mc.run_model(weather)
213216
annual_energy = mc.results.ac.sum()

docs/sphinx/source/pvsystem.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ PV modules in the :py:class:`~pvlib.pvsystem.PVSystem`. An instance of
1919
multiple instances of :py:class:`~pvlib.pvsystem.Array`. An instance of the
2020
Array class represents a group of modules with the same orientation and
2121
module type. Different instances of Array can have different tilt, orientation,
22-
and number or type of modules.
22+
and number or type of modules, where the orientation is defined by the
23+
Array's mount (a :py:class:`~pvlib.pvsystem.FixedMount`,
24+
:py:class:`~pvlib.pvsystem.SingleAxisTrackerMount`, or other).
2325

2426
The :py:class:`~pvlib.pvsystem.PVSystem` class methods wrap many of the
25-
functions in the :py:mod:`~pvlib.pvsystem` module. Similarly,
26-
:py:class:`~pvlib.pvsystem.Array` wraps several functions with its class
27+
functions in the :py:mod:`~pvlib.pvsystem` module. Similarly, the Mount classes
28+
and :py:class:`~pvlib.pvsystem.Array` wrap several functions with their class
2729
methods. Methods that wrap functions have similar names as the wrapped functions.
2830
This practice simplifies the API for :py:class:`~pvlib.pvsystem.PVSystem`
2931
and :py:class:`~pvlib.pvsystem.Array` methods by eliminating the need to specify

docs/sphinx/source/whatsnew/v0.9.0.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ Documentation
202202
and to make the procedural and OO results match exactly. (:issue:`1116`, :pull:`1144`)
203203
* Add a gallery example showing how to appropriately use interval-averaged
204204
weather data for modeling. (:pull:`1152`)
205-
* Update documentation links in :py:func:`pvlib.iotools.get_psm3`
205+
* Update documentation links in :py:func:`pvlib.iotools.get_psm3` (:pull:`1169`)
206+
* Use ``Mount`` classes in ``introtutorial`` and ``pvsystem`` docs pages (:pull:`1267`)
206207
* Clarified how statistics are calculated for :py:func:`pvlib.clearsky.detect_clearsky`
207208
(:issue:`1070`, :pull:`1243`)
208209

0 commit comments

Comments
 (0)