Skip to content

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

Merged
merged 6 commits into from
Sep 4, 2018
Merged

Conversation

wholmgren
Copy link
Member

@wholmgren wholmgren commented Aug 28, 2018

Adds a top-level documentation page explaining the PVSystem class.

Rendered documentation here:

https://wholmgren-pvlib-python-new.readthedocs.io/en/pvsystemdoc/pvsystem.html

  • Closes create PVSystem documentation page #514. closes pvwatts_dc in PVSystem #319.
  • I am familiar with the contributing guidelines.
  • Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests (usually) must pass on the TravisCI and Appveyor testing services.
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate docs/sphinx/source/whatsnew file for all changes.
  • Code quality and style is sufficient. Passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
  • Pull request is nearly complete and ready for detailed review.

@wholmgren wholmgren added this to the 0.6.0 milestone Aug 28, 2018
@wholmgren
Copy link
Member Author

Please let me know if you think this documentation is missing any critical information or if you see any typos.

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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data and calculations.

Design philosophy
-----------------

The PVSystem class is designed to separate the data that represents a PV
Copy link
Member

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

Copy link
Member Author

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.

-----------------

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
Copy link
Member

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

pdc = system.pvwatts_dc(1000, 30)
print(pdc)

Compare the :py:meth:`~pvlib.pvsystem.PVSystem.pvwatts_dc` method signature
Copy link
Member

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.

system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180)
print(system.surface_tilt, system.surface_azimuth)

# call get_aoi with solar_zenith, solar_zenith
Copy link
Member

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. Theget_aoimethod uses thesurface_tiltandsurface_azimuthattributes in itsPVSystemobject, and so requires onlysolar_zenithandsolar_azimuth as arguments

system = pvsystem.PVSystem(surface_tilt=20, surface_azimuth=180)
print(system.surface_tilt, system.surface_azimuth)

# call get_aoi with solar_zenith, solar_zenith
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

solar_zenith, solar_azimuth

.. ipython:: python

modules = pvsystem.retrieve_sam('cecmod')
module_parameters = modules['Example_Module']
Copy link
Member

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.

Copy link
Member Author

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.

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
Copy link
Member

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

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
Copy link
Member

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

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete adds

Copy link
Member

@cwhanse cwhanse left a 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

@wholmgren
Copy link
Member Author

@cwhanse thanks for the good feedback.

@wholmgren
Copy link
Member Author

Merging. Additional edits are welcome in a new pull request.

@wholmgren wholmgren merged commit 45109de into pvlib:master Sep 4, 2018
@wholmgren wholmgren deleted the pvsystemdoc branch September 4, 2018 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

create PVSystem documentation page pvwatts_dc in PVSystem
2 participants