-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Gold I-V dataset with benchmarking #426
Closed
Closed
Changes from 51 commits
Commits
Show all changes
57 commits
Select commit
Hold shift + click to select a range
9ab2e95
Add draft i_from_v_alt function with tests
a66abc4
Merge branch 'master' of github.com:pvlib/pvlib-python
a19447b
Better comments and more explicit typing
76616d5
Use transform from shunt resistance to shunt conductance
e35412f
Add v_from_i_alt() with initial tests and use np.where
82217fd
Use test fixtures
135ce4c
Add @requires_scipy to test fixtures
f927aef
More current_sum_at_diode_node() tests and using fixture
741a7f4
Naming, documentation, and formatting
c9129dc
Deprecate replaced functions and flake8
3aa150d
Merge branch 'master' of github.com:pvlib/pvlib-python
85e957d
Add release documentation and flake8 again
fb22171
Replace deprecated function usages and update test_singlediode_series…
275eccc
Merge branch 'master' of github.com:pvlib/pvlib-python
cdd2bd9
Conform to existing API
223275a
Run flake8
6b50ad9
Implement some code quality suggestions
e4e09be
Remove extraneous print statements
37484f1
Better docstrings
f9c4c82
Fix parameter ranges in docstrings
26eabde
Add test that overflows lambertw arg
4d7754d
Add test for mixed solution types logic
03ae51e
Use broadcast_arrays for cleaner code
6c410d2
One more simplification
19af023
Better use of broadcast_arrays
0cbf4bd
Merge branch 'master' of github.com:pvlib/pvlib-python
329450a
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
c96795d
Initial code with example output
8d1ecd9
Initial polishing and comments
59cf37f
Add all features for first gold dataset
markcampanelli d592b0c
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli 0dbf951
Add remaining devices for SDM gold data
markcampanelli 5c19b66
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli 43e2457
Reorg files and address comments
markcampanelli f1c04be
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli 7eccfc8
WIP during OS install
markcampanelli 0c33a71
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli 9d03ac9
Finish unit tests and file structure
markcampanelli 229c86f
Fix comment and tidy .gitignore
markcampanelli 054a537
Add test skip decorator for pyinterval
markcampanelli 05de14c
Add scipy test skips for minimal python 2.7 build
markcampanelli 1bdeb45
Remove scipy dependencies
markcampanelli 599f48b
Add scipy test skip filter
markcampanelli 3b825e2
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli cb01100
Update for new pvsystem.calcparams_desoto API
markcampanelli 0c527e1
Add README documentation and whatsnew
markcampanelli 0ad15d1
Remove constants.py and move constants into sdm.py
markcampanelli 7166194
Simplify large cell device bootstrapping
markcampanelli 39d1d5b
Improve documentation
markcampanelli 5eca66f
Merge upstream master
markcampanelli aee313e
Make requirements consistent for py34
markcampanelli e6e6dc7
Add GH issue
markcampanelli 6ad79ec
Merge branch 'master' of github.com:pvlib/pvlib-python into gold_dataset
markcampanelli f9dc4e7
Merge upstream
markcampanelli 13b6042
Update outputs and fix typos and sticklers
markcampanelli 0041d4e
Remove pvfactors for Python 3.4
markcampanelli d85aac6
Merge branch 'master' of github.com:markcampanelli/pvlib-python into …
markcampanelli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,7 @@ dependencies: | |
- nose | ||
- pip: | ||
- coveralls | ||
- pvfactors==1.0.1 | ||
- pyinterval | ||
- pytest-mock | ||
- pytest-timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Gold Datasets | ||
============ | ||
|
||
This directory contains gold datasets and python modules for gauging various | ||
algorithms, enabling verification and benchmarking. | ||
|
||
## Single-Diode Model (SDM) | ||
|
||
### Gold Dataset Creation | ||
|
||
The I-V curve gold dataset for the SDM is generated by runnning the following | ||
python script in this directory | ||
|
||
```console | ||
$ python sdm.py | ||
``` | ||
|
||
which will overwrite the existing `sdm.json` and `sdm.csv` files. `sdm.json` is | ||
the lossless, machine-interoperable format, and `sdm.csv` is formatted to be | ||
human-readable and to be easily viewed in a spreadsheet program. | ||
|
||
NOTES: | ||
- You will need to `pip install pyinterval` in order to generate gold | ||
datasets, because interval arithmetic is used to ensure computational accuracy. | ||
- I-V curves are generated over a range of device types and operating | ||
conditions. | ||
- See the `sdm.py` and `test_sdm.py` source code for details/examples. | ||
|
||
### Gauging SDM Functions Against a Gold Dataset | ||
|
||
Using an existing `sdm.json` gold dataset, you can guage various `i_from_v()` | ||
and `v_from_i()` implementations for accuracy/performance using a python script | ||
such as | ||
|
||
```python | ||
import os | ||
import pprint | ||
|
||
from pvlib import pvsystem | ||
from pvlib.data.gold import sdm | ||
|
||
json_path = os.path.join(os.path.dirname(sdm.__file__), "sdm.json") | ||
gold_dataset = sdm.load_gold_dataset(json_path=json_path) | ||
pprint.pprint(sdm.gauge_functions(gold_dataset, { | ||
"i_from_v": pvsystem.i_from_v, | ||
"v_from_i": pvsystem.v_from_i, | ||
})) | ||
``` | ||
|
||
NOTES: | ||
- Any functions compatible with the `pvsystem.i_from_v` and `pvsystem.v_from_i` | ||
APIs can be guaged against the gold dataset. | ||
- For each function guaged, the worst computed I-V curve for each device is returned along with performance timing information and statistics for | ||
the ensemble of I-V curve computations for that device (without any | ||
repetitions). | ||
- See the `sdm.py` and `test_sdm.py` source code for details/examples. |
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@anomam Do you know if I'm fixing or breaking something here? (Is pvfactors 1.0.1 really not supported in Python 3.4?)
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.
That's a good point @markcampanelli , starting with version 1.0.0 pvfactors should work with earlier versions of pandas, and therefore be compatible with Python 3.4.
Could you post an issue in pvfactors by any chance? A PR would be very much welcome as well :)
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.
Python 3.4 hit "end of life" a few months ago. I don't plan to support it going forward.
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.
SunPower/pvfactors#49