Skip to content

Commit 698c39c

Browse files
committed
Merge pull request #22 from wholmgren/docfixes
0.1 documentation improvements
2 parents 4868069 + e61a726 commit 698c39c

File tree

10 files changed

+372
-215
lines changed

10 files changed

+372
-215
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.. _comparison_pvlib_matlab:
2+
3+
****************************
4+
Comparison with PVLIB_MATLAB
5+
****************************
6+
7+
This document is under construction.
8+
Please see our
9+
`PVSC 2014 paper <http://energy.sandia.gov/wp/wp-content/gallery/uploads/PV_LIB_Python_final_SAND2014-18444C.pdf>`_
10+
and
11+
`PVSC 2015 abstract <https://github.com/UARENForecasting/pvlib-pvsc2015/blob/master/pvlib_pvsc_42.pdf?raw=true>`_
12+
for more information.
13+
14+
The pvlib-python license is BSD 3-clause,
15+
the PVLIB\_MATLAB license is ??.
16+
17+
We want to keep developing the core functionality and algorithms
18+
of the Python and MATLAB projects roughly in parallel,
19+
but we're not making any promises at this point.
20+
The PVLIB\_MATLAB and pvlib-python projects are currently developed
21+
by different teams that do not regularly work together.
22+
We hope to grow this collaboration in the future.
23+
Do not expect feature parity between the libaries, only similarity.
24+
25+
Here are some of the major differences between the latest pvlib-python build
26+
and the original Sandia PVLIB\_Python project, but many of these
27+
comments apply to the difference between pvlib-python and PVLIB\_MATLAB.
28+
29+
30+
Library wide changes
31+
~~~~~~~~~~~~~~~~~~~~
32+
33+
* Remove ``pvl_`` from module names.
34+
* Consolidation of similar modules. For example, functions from ``pvl_clearsky_ineichen.py`` and ``pvl_clearsky_haurwitz.py`` have been consolidated into ``clearsky.py``.
35+
* Removed ``Vars=Locals(); Expect...; var=pvl\_tools.Parse(Vars,Expect);`` pattern. Very few tests of input validitity remain. Garbage in, garbage or ``nan`` out.
36+
* Removing unnecssary and sometimes undesired behavior such as setting maximum zenith=90 or airmass=0. Instead, we make extensive use of ``nan`` values.
37+
* Changing function and module names so that they do not conflict.
38+
* Added ``/pvlib/data`` for lookup tables, test, and tutorial data.
39+
40+
41+
More specific changes
42+
~~~~~~~~~~~~~~~~~~~~~
43+
44+
* Add PyEphem option to solar position calculations.
45+
* ``irradiance.py`` has more AOI, projection, and irradiance sum and calculation functions
46+
* Locations are now ``pvlib.location.Location`` objects, not structs.
47+
* Specify time zones using a string from the standard IANA Time Zone Database naming conventions or using a pytz.timezone instead of an integer GMT offset. We may add dateutils support in the future.
48+
* ``clearsky.ineichen`` supports interpolating monthly Linke Turbidities to daily resolution.
49+
50+
Documentation
51+
~~~~~~~~~~~~~
52+
53+
* Using readthedocs for documentation hosting.
54+
* Many typos and formatting errors corrected.
55+
* Documentation source code and tutorials live in ``/`` rather than ``/pvlib/docs``.
56+
* Additional tutorials in ``/docs/tutorials``.
57+
58+
Testing
59+
~~~~~~~
60+
61+
* Tests are cleaner and more thorough. They are still no where near complete.
62+
* Using Coveralls to measure test coverage.
63+
* Using TravisCI for automated testing.
64+
* Using ``nosetests`` for more concise test code.

docs/sphinx/source/conf.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def __getattr__(cls, name):
4747
'sphinx.ext.autodoc',
4848
'sphinx.ext.mathjax',
4949
'sphinx.ext.viewcode',
50+
'sphinx.ext.extlinks',
5051
'numpydoc',
5152
'sphinx.ext.autosummary'
5253
]
@@ -64,8 +65,8 @@ def __getattr__(cls, name):
6465
master_doc = 'index'
6566

6667
# General information about the project.
67-
project = u'PVLIB_Python'
68-
copyright = u'2014, Sandia National Labs, Rob Andrews, University of Arizona, github contributors'
68+
project = u'pvlib-python'
69+
copyright = u'2015, Sandia National Labs, Rob Andrews, University of Arizona, github contributors'
6970

7071
# The version info for the project you're documenting, acts as replacement for
7172
# |version| and |release|, also used in various other places throughout the
@@ -191,7 +192,7 @@ def __getattr__(cls, name):
191192
#html_show_sphinx = True
192193

193194
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
194-
#html_show_copyright = True
195+
html_show_copyright = False
195196

196197
# If true, an OpenSearch description file will be output, and all pages will
197198
# contain a <link> tag referring to it. The value of this option must be the
@@ -246,6 +247,11 @@ def __getattr__(cls, name):
246247
# If false, no module index is generated.
247248
#latex_domain_indices = True
248249

250+
# extlinks alias
251+
extlinks = {'issue': ('https://github.com/pvlib/pvlib-python/issues/%s',
252+
'GH'),
253+
'wiki': ('https://github.com/pvlib/pvlib-python/wiki/%s',
254+
'wiki ')}
249255

250256
# -- Options for manual page output ---------------------------------------
251257

docs/sphinx/source/index.rst

+46-11
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,60 @@
1-
.. PVLIB_Python documentation master file, created by
2-
sphinx-quickstart on Fri Nov 7 15:56:33 2014.
3-
You can adapt this file completely to your liking, but it should at least
4-
contain the root `toctree` directive.
5-
6-
Welcome to pvlib/pvlib-python's documentation!
1+
Welcome to pvlib-python's documentation!
72
========================================
83

9-
This is the documentation for the pvlib-python project hosted at
10-
https://github.com/pvlib/pvlib-python
4+
pvlib-python provides a set of documented functions for simulating
5+
the performance of photovoltaic energy systems.
6+
The toolbox was originally developed in MATLAB at
7+
Sandia National Laboratories and it implements many of the
8+
models and methods developed at the Labs.
9+
More information on Sandia Labs PV performance modeling programs
10+
can be found at https://pvpmc.sandia.gov/.
11+
12+
The source code for pvlib-python is hosted on
13+
`github <https://github.com/pvlib/pvlib-python>`_.
14+
15+
The github page also contains a valuable
16+
`wiki <https://github.com/pvlib/pvlib-python/wiki>`_
17+
with information on how you can contribute to pvlib-python development!
18+
19+
Please see the links above for details on the status of the pvlib-python
20+
project. We are at an early stage in the development of this project,
21+
so expect to see significant API changes in the next few releases.
22+
23+
This documenation focuses on providing a reference for all of
24+
the modules and functions available in pvlib-python.
25+
For examples of how to use pvlib-python, please see the
26+
`tutorials <http://nbviewer.ipython.org/github/pvlib/pvlib-python/tree/master/docs/tutorials/>`_.
27+
28+
.. note::
29+
30+
This documentation assumes general familiarity with
31+
Python, NumPy, and Pandas. Google searches will yield many
32+
excellent tutorials for these packages.
33+
34+
Please see our
35+
`PVSC 2014 paper <http://energy.sandia.gov/wp/wp-content/gallery/uploads/PV_LIB_Python_final_SAND2014-18444C.pdf>`_
36+
and
37+
`PVSC 2015 abstract <https://github.com/UARENForecasting/pvlib-pvsc2015/blob/master/pvlib_pvsc_42.pdf?raw=true>`_
38+
for more information.
1139

12-
You may also want to browser the tutorials using nbviewer at
13-
http://nbviewer.ipython.org/github/pvlib/pvlib-python/tree/master/docs/tutorials/
40+
Installation
41+
============
1442

43+
1. Follow Pandas'
44+
`instructions <http://pandas.pydata.org/pandas-docs/stable/install.html>`_
45+
for installing the scientific python stack, including ``pip``.
46+
#. ``pip install pvlib-python``
1547

1648

17-
Contents:
49+
Contents
50+
========
1851

1952
.. toctree::
2053
:maxdepth: 2
2154

2255
self
56+
whatsnew
57+
comparison_pvlib_matlab
2358
pvlib
2459

2560

docs/sphinx/source/whatsnew.rst

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.. _whatsnew:
2+
3+
**********
4+
What's New
5+
**********
6+
7+
These are new features and improvements of note in each release.
8+
9+
.. include:: whatsnew/v0.1.0.txt
+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
.. _whatsnew_0100:
2+
3+
v0.1.0 (March 17, 2015)
4+
-----------------------
5+
6+
This is the first official release of the pvlib-python project.
7+
As such, a "What's new" document is a little hard to write.
8+
There will be significant overlap with the to-be-written document
9+
that describes the differences between pvlib-python and PVLIB\_Matlab.
10+
11+
12+
API changes
13+
~~~~~~~~~~~
14+
15+
* Remove ``pvl_`` from module names.
16+
* Consolidation of similar modules. For example, functions from ``pvl_clearsky_ineichen.py`` and ``pvl_clearsky_haurwitz.py`` have been consolidated into ``clearsky.py``.
17+
* Return one DataFrame instead of a tuple of DataFrames.
18+
* Change function and module names so that they do not conflict.
19+
20+
21+
New features
22+
~~~~~~~~~~~~
23+
24+
* Library is Python 3.3 and 3.4 compatible
25+
* Add What's New section to docs (:issue:`10`)
26+
* Add PyEphem option to solar position calculations.
27+
* ``irradiance.py`` has more AOI, projection, and irradiance sum and calculation functions
28+
* TMY data import has a ``coerce_year`` option
29+
* TMY data can be loaded from a url (:issue:`5`)
30+
* Locations are now ``pvlib.location.Location`` objects, not "structs".
31+
* Specify time zones using a string from the standard IANA Time Zone Database naming conventions or using a pytz.timezone instead of an integer GMT offset. We may add dateutils support in the future.
32+
* ``clearsky.ineichen`` supports interpolating monthly Linke Turbidities to daily resolution.
33+
34+
35+
Other changes
36+
~~~~~~~~~~~~~
37+
38+
* Removed ``Vars=Locals(); Expect...; var=pvl\_tools.Parse(Vars,Expect);`` pattern. Very few tests of input validitity remain. Garbage in, garbage or ``nan`` out.
39+
* Removing unnecssary and sometimes undesired behavior such as setting maximum zenith=90 or airmass=0. Instead, we make extensive use of ``nan`` values.
40+
* Adding logging calls, removing print calls.
41+
* Improved PEP8 compliance.
42+
* Added ``/pvlib/data`` for lookup tables, test, and tutorial data.
43+
44+
45+
Documentation
46+
~~~~~~~~~~~~~
47+
48+
* Using readthedocs for documentation hosting.
49+
* Many typos and formatting errors corrected (:issue:`16`)
50+
* Documentation source code and tutorials live in ``/`` rather than ``/pvlib/docs``.
51+
* Additional tutorials in ``/docs/tutorials``.
52+
* Clarify ``pvsystem.systemdef`` input (:issue:`17`)
53+
54+
55+
Testing
56+
~~~~~~~
57+
58+
* Tests are cleaner and more thorough. They are still no where near complete.
59+
* Using Coveralls to measure test coverage.
60+
* Using TravisCI for automated testing.
61+
* Using ``nosetests`` for more concise test code.
62+
63+
64+
Bug fixes
65+
~~~~~~~~~
66+
67+
* Fixed DISC algorithm bugs concerning
68+
modifying input zenith Series (:issue:`24`),
69+
the ``Kt`` conditional evaluation (:issue:`6`),
70+
and ignoring the input pressure (:issue:`25`).
71+
* Many more bug fixes were made, but you'll have to look at the detailed commit history.
72+
73+
74+
Contributors
75+
~~~~~~~~~~~~
76+
77+
This list includes all (I hope) contributors to
78+
`pvlib/pvlib-python <https://github.com/pvlib/pvlib-python>`_,
79+
`Sandia-Labs/PVLIB_Python <https://github.com/Sandia-Labs/PVLIB_Python>`_,
80+
and
81+
`UARENForecasting/PVLIB_Python <https://github.com/UARENForecasting/PVLIB_Python>`_.
82+
83+
* Rob Andrews
84+
* Will Holmgren
85+
* bmu
86+
* Tony Lorenzo
87+
* jforbess
88+
* Jorissup
89+
* dacoex
90+
* alexisph

pvlib/atmosphere.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
The atmosphere module contains methods to calculate
2+
The ``atmosphere`` module contains methods to calculate
33
relative and absolute airmass and to determine
44
pressure from altitude or vice versa.
55
"""
@@ -18,7 +18,7 @@
1818

1919
def pres2alt(pressure):
2020
'''
21-
Determine altitude from site pressure
21+
Determine altitude from site pressure.
2222
2323
Parameters
2424
----------
@@ -42,7 +42,7 @@ def pres2alt(pressure):
4242
Gravitational acceleration 9.80665 m/s^2
4343
Lapse rate -6.5E-3 K/m
4444
Gas constant for air 287.053 J/(kgK)
45-
Relative Humidity 0%
45+
Relative Humidity 0%
4646
============================ ================
4747
4848
References
@@ -60,7 +60,7 @@ def pres2alt(pressure):
6060

6161
def alt2pres(altitude):
6262
'''
63-
Determine site pressure from altitude
63+
Determine site pressure from altitude.
6464
6565
Parameters
6666
----------
@@ -84,7 +84,7 @@ def alt2pres(altitude):
8484
Gravitational acceleration 9.80665 m/s^2
8585
Lapse rate -6.5E-3 K/m
8686
Gas constant for air 287.053 J/(kgK)
87-
Relative Humidity 0%
87+
Relative Humidity 0%
8888
============================ ================
8989
9090
References
@@ -130,15 +130,10 @@ def absoluteairmass(AMrelative, pressure=101325.):
130130
131131
References
132132
----------
133-
134133
[1] C. Gueymard, "Critical analysis and performance assessment of
135134
clear sky solar irradiance models using theoretical and measured data,"
136135
Solar Energy, vol. 51, pp. 121-138, 1993.
137136
138-
See also
139-
---------
140-
relativeairmass
141-
142137
'''
143138

144139
AMa = AMrelative * pressure / 101325.

0 commit comments

Comments
 (0)