-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add PVSystem documentation page #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Please let me know if you think this documentation is missing any critical information or if you see any typos. |
docs/sphinx/source/pvsystem.rst
Outdated
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data and calculations.
docs/sphinx/source/pvsystem.rst
Outdated
Design philosophy | ||
----------------- | ||
|
||
The PVSystem class is designed to separate the data that represents a PV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is designed to include the data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand why you wanted to change this. I went with a different revision here so let me know if I've missed the intention.
docs/sphinx/source/pvsystem.rst
Outdated
----------------- | ||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but not the data that
docs/sphinx/source/pvsystem.rst
Outdated
pdc = system.pvwatts_dc(1000, 30) | ||
print(pdc) | ||
|
||
Compare the :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add text at the beginning: Methods attached to a PVSystem object wrap corresponding functions in pvsystem.py. The methods simplify the argument list by using data stored in the PVSystem attributes.
docs/sphinx/source/pvsystem.rst
Outdated
system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180) | ||
print(system.surface_tilt, system.surface_azimuth) | ||
|
||
# call get_aoi with solar_zenith, solar_zenith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add : Angle of incidence (AOI) calculations require
surface_tilt,
surface_azimuthand also the sun position. The
get_aoimethod uses the
surface_tiltand
surface_azimuthattributes in its
PVSystemobject, and so requires only
solar_zenithand
solar_azimuth as arguments
docs/sphinx/source/pvsystem.rst
Outdated
system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180) | ||
print(system.surface_tilt, system.surface_azimuth) | ||
|
||
# call get_aoi with solar_zenith, solar_zenith |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solar_zenith, solar_azimuth
docs/sphinx/source/pvsystem.rst
Outdated
.. ipython:: python | ||
|
||
modules = pvsystem.retrieve_sam('cecmod') | ||
module_parameters = modules['Example_Module'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pvsystem.retrieve_sam
returns a dict
with a key being a module name, and its value being a dict
of model parameters for the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically a dataframe, but it walks like a dict and quacks like a dict, so let's call it a dict here for simplicity. And because I think we might change it in the future.
docs/sphinx/source/pvsystem.rst
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module and/or inverter parameters can also
docs/sphinx/source/pvsystem.rst
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At present, these methods include only
docs/sphinx/source/pvsystem.rst
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete adds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an important addition to the documentation. Comments are suggestions I don't think any are required changes, except for changing solar_zenith
to solar_azimuth
@cwhanse thanks for the good feedback. |
Merging. Additional edits are welcome in a new pull request. |
Adds a top-level documentation page explaining the
PVSystem
class.Rendered documentation here:
https://wholmgren-pvlib-python-new.readthedocs.io/en/pvsystemdoc/pvsystem.html
docs/sphinx/source/api.rst
for API changes.docs/sphinx/source/whatsnew
file for all changes.git diff upstream/master -u -- "*.py" | flake8 --diff