-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Create ivtools #718
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
Create ivtools #718
Changes from 60 commits
Commits
Show all changes
77 commits
Select commit
Hold shift + click to select a range
f475120
initial commit fit_cec_using_sam
cwhanse 7454e4d
outline ivcurves
cwhanse 9c5e1a9
use nrel-pysam
cwhanse 593f355
remove sam_dir
cwhanse 4ab1fed
add Sandia single curve fit
cwhanse 8a8890f
complete function
cwhanse b72b0b4
add test, move code to ivtools.py
cwhanse 921aea8
remove single files
cwhanse 4f4ad0f
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
cwhanse eaee814
change PySCC usage to wrapper
d65067b
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
4744bde
add nrel-pysam to ci/requirements
aae2731
stickler, add pysam version in ci/requirements
e1697b0
does case matter?
e779c7a
remove pysam for py27, move import pysam to try/except
b0f0a9d
add requires_scipy
df33113
rename variables for style guide
bec1915
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
b64cf57
add test for fit_cec_with_sam
c8004ff
fix conflict in requirements
586a134
fix typo, raise syntax
6d6733d
remove ivtools dir
98af4ff
fix pytest fixture usage
cwhanse 26c8f38
linter, fix np.allclose
cwhanse 1deb148
relax test condition
cwhanse 3c66a1d
resolve merge conflict
cwhanse 8308635
remove try/except, add to docstring, use helper functions
cwhanse 2601dc5
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
cwhanse 632234e
add requires_pysam
cwhanse d975f32
fix import
cwhanse 37a362d
fix infinite loop
cwhanse c956486
update whatsnew, api.rst
cwhanse bbd5720
fix lint errors
cwhanse 01f0dba
lint
cwhanse a32bb35
resolve comments
cwhanse 5779b1e
comment response
0f45925
fix function name in test
58070da
more comment responses
9bf7566
add nan output to fit_cec_sam, comment responses
cwhanse 723b454
lint
cwhanse ad9bc2d
consistent return nan, v_oc arg etc. defaults to None, edit description
cwhanse 6d5ff04
initialize failed
cwhanse d506140
lint
cwhanse 2517b33
implement exception for failed fitting
cwhanse 320ebf9
remove requirement for sorted i
cwhanse d66701c
update internal variable name for consistency
cwhanse fe4bdfe
Merge branch 'ivtools' of https://github.com/cwhanse/pvlib-python int…
cwhanse 6879b36
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
cwhanse 0328755
add to __init__.py
cwhanse cff625b
code style changes
cwhanse f8a4860
lint
cwhanse e8be716
adjust error messaging in _calculate_sde_parameters
cwhanse 9af20f7
edits to units in docstring
cwhanse ee19ed1
change error handling in fit_sde_sandia, docstring reformat
cwhanse aa47f48
fix tests, docstring edits
cwhanse e55330f
test math formatting
cwhanse fb3be8c
more edits to docstring
cwhanse efe1cfb
multiline raw string
cwhanse 8d68c8c
try another approach
cwhanse ec6fee5
move r
cwhanse 0270633
change function name, docstring edits
cwhanse 6a3735e
update function name
cwhanse 227d8b5
add math delimiters
cwhanse 16ab69f
remove delimiter, use indent
cwhanse 11b8dda
fix alignment in docstring
cwhanse f84000d
some edits to docstring format
cwhanse 6cd1095
change name back to sde
cwhanse dde20b5
add bad IV curves for coverage test
cwhanse 4c39e2a
separate bad IV test, fix test
cwhanse eab687a
lint
cwhanse c02a1ab
update api.rst and whatsnew
cwhanse d6e21b7
Merge branch 'master' of https://github.com/pvlib/pvlib-python into i…
cwhanse 012ef50
merge conflicts
cwhanse b8a713b
hardwire test output rather than read from old CEC file
cwhanse 3aae45a
test fix
cwhanse 35b90e5
really fix it this time
cwhanse fe89a87
fix raise statement
cwhanse 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 hidden or 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 |
---|---|---|
|
@@ -24,4 +24,5 @@ dependencies: | |
- shapely # pvfactors dependency | ||
- siphon # conda-forge | ||
- pip: | ||
- nrel-pysam | ||
- pvfactors==1.0.1 |
This file contains hidden or 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 |
---|---|---|
|
@@ -24,4 +24,5 @@ dependencies: | |
- shapely # pvfactors dependency | ||
- siphon # conda-forge | ||
- pip: | ||
- nrel-pysam | ||
- pvfactors==1.0.1 |
This file contains hidden or 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 |
---|---|---|
|
@@ -24,4 +24,5 @@ dependencies: | |
- shapely # pvfactors dependency | ||
- siphon # conda-forge | ||
- pip: | ||
- nrel-pysam | ||
- pvfactors==1.0.1 |
This file contains hidden or 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 hidden or 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 |
---|---|---|
|
@@ -19,9 +19,31 @@ Testing | |
~~~~~~~ | ||
* Added 30 minutes to timestamps in `test_psm3.csv` to match change in NSRDB (:issue:`733`) | ||
|
||
API Changes | ||
~~~~~~~~~~~ | ||
|
||
|
||
Enhancements | ||
~~~~~~~~~~~~ | ||
* Add `ivtools` module to contain functions for IV model fitting. | ||
* Add :py:func:`~pvlib.ivtools.fit_sde_sandia`, a simple method to fit the | ||
single diode equation to an IV curve. | ||
* Add :py:func:`~pvlib.ivtools.fit_cec_sam`, a wrapper to access the | ||
model fitting function '6parsolve' from NREL's System Advisor Model. | ||
|
||
|
||
Bug fixes | ||
~~~~~~~~~ | ||
|
||
|
||
Testing | ||
~~~~~~~ | ||
|
||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
* Mark Campanellli (:ghuser:`markcampanelli`) | ||
* Will Holmgren (:ghuser:`wholmgren`) | ||
* Cliff Hansen (:ghuser:`cwhanse`) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line |
||
* Oscar Dowson (:ghuser:`odow`) |
This file contains hidden or 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
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.
Maybe
fit_single_diode_cec_sam
to more closely mimic the sandia function?Uh oh!
There was an error while loading. Please reload this page.
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.
I kinda like the single-diode equation (SDE) vs. single-diode model (SDM) distinction, and I don’t mind the abbreviations if they are expanded in the docstring. This leads to something succinct and descriptive like:
fit_sde_sandia
fit_sdm_cec_sam
action_thing[_variant]_source
I don’t know if you want to add a variant to the SDE (to cover potential variants, such as with a reverse breakdown component). Also, the variant and source could repeat in some cases, leading to some stuttering.
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.
@markcampanelli good suggestion for naming patterns. There are two different applications here: fitting the SD equation to an IV curve, and fitting a SD model (a set of equations) to some data (in the case of the CEC model and the SAM method, datasheet information). I changed
sde
tosingle_diode
in one function name, but I don't care forsingle_diode_equation
andsingle_diode_model
in the names.I'm going to open a new issue to extend the single diode documentation to lay out the terminology: single diode equation, single diode model, 5 parameters vs. model parameters.
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.
Works for me.