Skip to content

minor documentation updates #312

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 5 commits into from
Feb 17, 2017
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
10 changes: 5 additions & 5 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ channels:
- conda-forge
- defaults
dependencies:
- python=2.7
- python=3.5
- mock # needed for local python 2.7 builds
- numpy=1.11.2
- scipy
- pandas=0.19.1
- pytz
- ephem
- numba
- ipython=4.0.1
- ipython=5.2.2
- ipywidgets
- numpydoc
- matplotlib=1.5.3
- matplotlib=2.0.0
- seaborn=0.7.1
- siphon=0.4.0
- sphinx=1.4.8
- netCDF4=1.2.4
- sphinx=1.5
- netCDF4=1.2.5
- hdf4=4.2.12
- sphinx_rtd_theme
- docutils
5 changes: 5 additions & 0 deletions docs/sphinx/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ Solar Position

Functions and methods for calculating solar position.

The :py:meth:`location.Location.get_solarposition` method and the
:py:func:`solarposition.get_solarposition` function with default
parameters are fast and accurate. We recommend using these functions
unless you know that you need a different function.

.. autosummary::
:toctree: generated/

Expand Down
5 changes: 4 additions & 1 deletion docs/sphinx/source/clearsky.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ time series of clear sky data for a location. The :ref:`ineichen` and
input data. The :ref:`detect_clearsky` subsection demonstrates the use
of the clear sky detection algorithm.

The :py:func:`~pvlib.atmosphere.bird_hulstrom80_aod_bb`, and
:py:func:`~pvlib.atmosphere.kasten96_lt` functions are useful for
calculating inputs to the clear sky functions.

We'll need these imports for the examples below.

.. ipython::
Expand Down Expand Up @@ -498,7 +502,6 @@ See [Ine16]_.
We encourage users to compare the pvlib implementation to Ineichen's
`Excel tool <http://www.unige.ch/energie/fr/equipe/ineichen/solis-tool/>`_.


.. _detect_clearsky:

Detect Clearsky
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Contents
========

.. toctree::
:maxdepth: 5
:maxdepth: 1

package_overview
whatsnew
Expand Down
12 changes: 11 additions & 1 deletion docs/sphinx/source/package_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,17 @@ community via issues and pull requests.

Getting support
---------------
The best way to get support is to make an issue on our

pvlib usage questions can be asked on
`Stack Overflow <http://stackoverflow.com>`_ and tagged with
the `pvlib <http://stackoverflow.com/questions/tagged/pvlib>`_ tag.

The `pvlib-python google group <https://groups.google.com/forum/#!forum/pvlib-python>`_
is used for discussing various topics of interest to the pvlib-python
community. We also make new version announcements on the google group.

If you suspect that you may have discovered a bug or if you'd like to
change something about pvlib, then please make an issue on our
`GitHub issues page <https://github.com/pvlib/pvlib-python/issues>`_ .


Expand Down
29 changes: 19 additions & 10 deletions pvlib/solarposition.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,33 @@ def get_solarposition(time, latitude, longitude,
Parameters
----------
time : pandas.DatetimeIndex

Copy link
Member

Choose a reason for hiding this comment

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

@wholmgren did you really mean to add all of these extra newlines? Should I merge them, or was it a typo? I can't find the rationale in your comments, and it's inconsistent with docstrings everywhere else. Please let me know. Thanks!

latitude : float

longitude : float

altitude : None or float
If None, computed from pressure. Assumed to be 0 m
if pressure is also None.

pressure : None or float
If None, computed from altitude. Assumed to be 101325 Pa
if altitude is also None.
method : string
'pyephem' uses the PyEphem package: :func:`pyephem`

'nrel_c' uses the NREL SPA C code [3]: :func:`spa_c`

method : string
'nrel_numpy' uses an implementation of the NREL SPA algorithm
described in [1] (default): :func:`spa_python`
described in [1] (default, recommended): :py:func:`spa_python`

'nrel_numba' uses an implementation of the NREL SPA algorithm
described in [1], but also compiles the code first: :func:`spa_python`
described in [1], but also compiles the code first:
:py:func:`spa_python`

'pyephem' uses the PyEphem package: :py:func:`pyephem`

'ephemeris' uses the pvlib ephemeris code: :py:func:`ephemeris`

'nrel_c' uses the NREL SPA C code [3]: :py:func:`spa_c`

'ephemeris' uses the pvlib ephemeris code: :func:`ephemeris`
temperature : float
Degrees C.

Expand Down Expand Up @@ -114,13 +121,15 @@ def spa_c(time, latitude, longitude, pressure=101325, altitude=0,
raw_spa_output=False):
"""
Calculate the solar position using the C implementation of the NREL
SPA code
SPA code.

The source files for this code are located in './spa_c_files/', along with
a README file which describes how the C code is wrapped in Python.
Due to license restrictions, the C code must be downloaded seperately
and used in accordance with it's license.

This function is slower and no more accurate than :py:func:`spa_python`.

Parameters
----------
time : pandas.DatetimeIndex
Expand Down Expand Up @@ -266,7 +275,7 @@ def spa_python(time, latitude, longitude,
For most simulations specifing delta_t is sufficient.
Difference between terrestrial time and UT1.
*Note: delta_t = None will break code using nrel_numba,
this will be fixed in a future version.
this will be fixed in a future version.*
The USNO has historical and forecasted delta_t [3].
atmos_refrac : float, optional
The approximate atmospheric refraction (in degrees)
Expand Down Expand Up @@ -807,7 +816,7 @@ def nrel_earthsun_distance(time, how='numpy', delta_t=67.0, numthreads=4):
For most simulations specifing delta_t is sufficient.
Difference between terrestrial time and UT1.
*Note: delta_t = None will break code using nrel_numba,
this will be fixed in a future version.
this will be fixed in a future version.*
By default, use USNO historical data and predictions

numthreads : int, optional
Expand Down