Skip to content

Commit 1d1bc0b

Browse files
committed
update comparison with matlab
1 parent e623d82 commit 1d1bc0b

File tree

2 files changed

+64
-48
lines changed

2 files changed

+64
-48
lines changed
Lines changed: 62 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,80 @@
11
.. _comparison_pvlib_matlab:
22

33
****************************
4-
Comparison with PVLIB_MATLAB
4+
Comparison with PVLIB MATLAB
55
****************************
66

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.
7+
PVLIB was originally developed as a library for MATLAB at Sandia
8+
National Lab, and Sandia remains the official maintainer of the MATLAB
9+
library. Sandia supported the initial Python port and
10+
then released further project maintenance and development to the
11+
`pvlib-python maintainers <https://github.com/orgs/pvlib/people>`_.
1312

14-
The pvlib-python license is BSD 3-clause,
15-
the PVLIB\_MATLAB license is ??.
13+
The pvlib-python maintainers collaborate with the PVLIB MATLAB
14+
maintainers but operate independently. We'd all like to keep the core
15+
functionality of the Python and MATLAB projects synchronized, but this
16+
will require the efforts of the larger pvlib-python community, not just
17+
the maintainers. Therefore, do not expect feature parity between the
18+
libaries, only similarity.
1619

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.
20+
Major differences
21+
~~~~~~~~~~~~~~~~~
2422

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.
23+
* pvlib-python uses git version control to track all changes
24+
to the code. A summary of changes is included in the whatsnew file
25+
for each release. PVLIB MATLAB documents changes in Changelog.docx
26+
* pvlib-python has a comprehensive test suite, whereas PVLIB MATLAB does
27+
not have a test suite at all. Specifically, pvlib-python
2828

29+
* Uses TravisCI for automated testing on Linux.
30+
* Uses Appveyor for automated testing on Windows.
31+
* Uses Coveralls to measure test coverage.
2932

30-
Library wide changes
31-
~~~~~~~~~~~~~~~~~~~~
33+
* Using readthedocs for automated documentation building and hosting.
34+
* Removed ``pvl_`` from module/function names.
35+
* Consolidated similar functions into topical modules.
36+
For example, functions from ``pvl_clearsky_ineichen.m`` and
37+
``pvl_clearsky_haurwitz.m`` have been consolidated into ``clearsky.py``.
38+
* PVLIB MATLAB uses ``location`` structs as the input to some functions.
39+
pvlib-python just uses the lat, lon, etc. as inputs to the functions.
40+
Furthermore, pvlib-python replaces the structs with classes, and these classes
41+
have methods, such as :py:func:`~pvlib.location.Location.get_solarposition`,
42+
that automatically reference the appropriate data.
43+
See :ref:`modeling-paradigms` for more information.
44+
* pvlib-python implements a handful of class designed to simplify the
45+
PV modeling process. These include :py:class:`~pvlib.location.Location`,
46+
:py:class:`~pvlib.pvsystem.PVSystem`,
47+
:py:class:`~pvlib.pvsystem.LocalizedPVSystem`,
48+
:py:class:`~pvlib.tracking.SingleAxisTracker`,
49+
and
50+
:py:class:`~pvlib.modelchain.ModelChain`.
3251

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.
52+
Other differences
53+
~~~~~~~~~~~~~~~~~
3954

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.
55+
* Very few tests of input validitity exist in the Python code.
56+
We believe that the vast majority of these tests were not necessary.
57+
We also make use of Python's robust support for raising and catching
58+
exceptions.
59+
* Removed unnecessary and sometimes undesired behavior such as setting
60+
maximum zenith=90 or airmass=0. Instead, we make extensive use of
61+
``nan`` values in returned arrays.
62+
* Implemented the NREL solar position calculation algorithm.
63+
Also added a PyEphem option to solar position calculations.
64+
* Specify time zones using a string from the standard IANA Time Zone
65+
Database naming conventions or using a pytz.timezone instead of an
66+
integer GMT offset.
67+
* ``clearsky.ineichen`` supports interpolating monthly
68+
Linke Turbidities to daily resolution.
4969
* Instead of requiring effective irradiance as an input, ``pvsystem.sapm``
5070
calculates and returns it based on input POA irradiance, AM, and AOI.
71+
* pvlib-python does not come with as much example data.
72+
* pvlib-python does not currently implement as many algorithms as
73+
PVLIB MATLAB.
5174

5275
Documentation
5376
~~~~~~~~~~~~~
5477

55-
* Using readthedocs for documentation hosting.
56-
* Many typos and formatting errors corrected.
57-
* Documentation source code and tutorials live in ``/`` rather than ``/pvlib/docs``.
58-
* Additional tutorials in ``/docs/tutorials``.
59-
60-
Testing
61-
~~~~~~~
62-
63-
* Tests are cleaner and more thorough. They are still no where near complete.
64-
* Using Coveralls to measure test coverage.
65-
* Using TravisCI for automated testing.
66-
* Using ``nosetests`` for more concise test code.
78+
* Using Sphinx to build the documentation,
79+
including dynamically created inline examples.
80+
* Additional Jupyter tutorials in ``/docs/tutorials``.

docs/sphinx/source/package_overview.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ there are modelers of PV systems, so
1414
pvlib-python provides several modeling paradigms.
1515

1616

17+
.. _modeling-paradigms:
18+
1719
Modeling paradigms
1820
------------------
1921

0 commit comments

Comments
 (0)