8000 Add mismatch.py and function to combine curves by ajonesr · Pull Request #1781 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Add mismatch.py and function to combine curves #1781

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

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
06abfaa
Added mismatch.py
ajonesr Jun 20, 2023
3159bc1
Make method in bishop functions explicit
ajonesr Jun 21, 2023
76efbac
Move clipping to prepare_curves
ajonesr Jun 21, 2023
586de8f
Change assert to ValueError
ajonesr Jun 21, 2023
3038f86
Added docstrings
ajonesr Jun 22, 2023
c0e57da
Fixed missing parenthesis
ajonesr Jun 22, 2023
0670a6f
Updated comments, fixed typo
ajonesr Jun 22, 2023
a3a135b
Updated imports
ajonesr Jun 22, 2023
c27f558
Updated .rst file
ajonesr Jun 22, 2023
5dfda15
Updated docstrings
ajonesr Jun 22, 2023
2f11a16
Update docstring of prepare_curves
ajonesr Jun 23, 2023
3effafe
Update docstring of combine_curves
ajonesr Jun 23, 2023
b969581
Fixed spacing and clipped_voltage typo
ajonesr Jun 23, 2023
7ab461c
Reverse order of currents array
ajonesr Jun 23, 2023
d87f9df
Add tests
ajonesr Jun 23, 2023
cf955a3
Fixed types, updated tests
ajonesr Jun 23, 2023
a014b2a
Updated whatsnew
ajonesr Jun 23, 2023
1f5914a
Added contributor
ajonesr Jun 23, 2023
94e923c
Update prepare_curves docstring
ajonesr Jun 26, 2023
31d1188
Update prepare_curves docstring
ajonesr Jun 26, 2023
0880f24
Update prepare_curves docstring
ajonesr Jun 26, 2023
e87b4aa
Update spacing
ajonesr Jun 26, 2023
057cada
Update spacing
ajonesr Jun 26, 2023
606de91
Add tests for ValueErrors
ajonesr Jun 26, 2023
baeac3f
Merge branch 'main' into mismatch
ajonesr Jun 26, 2023
ded4548
Update init
ajonesr Jun 26, 2023
52b7455
Added example
ajonesr Jul 10, 2023
2ca0cb0
Merge remote-tracking branch 'upstream/main' into mismatch
ajonesr Jul 13, 2023
8cca7b7
Update whatsnew, example
ajonesr Jul 14, 2023
17d738c
Merge branch 'main' of https://github.com/pvlib/pvlib-python into mis…
cwhanse Aug 11, 2023
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
Prev Previous commit
Next Next commit
Fixed types, updated tests
  • Loading branch information
ajonesr committed Jun 23, 2023
commit cf955a30706ed652e4ee49606fa53d0da167c8ae
3 changes: 2 additions & 1 deletion pvlib/ivtools/mismatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ def prepare_curves(params, num_pts, breakdown_voltage=-0.5):

"""

params = np.asarray(params)
# in case params is a list containing scalars, add a dimension
if len(np.shape(params)) == 1:
if params.ndim == 1:
params = params[np.newaxis,:]

# get range of currents from 0 to max_isc
Expand Down
38 changes: 19 additions & 19 deletions pvlib/tests/ivtools/test_mismatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,27 @@ def test_combine(currents, voltages, expected):
),

# pandas input
# (
# 3, -0.5,
# pd.DataFrame([[1, 3e-08, 1., 300, 1.868364353685363],
# [5, 1e-09, 0.1, 3000, 2.404825405733636]]),
# (
# np.array([4.99983334, 2.49991667, 0.]),
# np.array([[-0.5, -0.5, 3.21521313e+01],
# [-2.52464716e-13, 5.17727056e+01, 5.36976290e+01]])
# )
# )
(
3, -0.5,
pd.DataFrame([[1, 3e-08, 1., 300, 1.868364353685363],
[5, 1e-09, 0.1, 3000, 2.404825405733636]]),
(
np.array([4.99983334, 2.49991667, 0.]),
np.array([[-0.5, -0.5, 3.21521313e+01],
[-2.52464716e-13, 5.17727056e+01, 5.36976290e+01]])
)
),

# params is just a list (no dimension)
# (
# 5, -0.5,
# [1, 3e-08, 1., 300, 1.868364353685363],
# (
# np.array([0.99667772, 0.74750829, 0.49833886, 0.24916943, 0.]),
# np.array([2.42028619e-14, 2.81472975e+01, 3.01512748e+01,
# 3.12974337e+01, 3.21521313e+01])
# )
# )
(
5, -0.5,
[1, 3e-08, 1., 300, 1.868364353685363],
(
np.array([0.99667772, 0.74750829, 0.49833886, 0.24916943, 0.]),
np.array([2.42028619e-14, 2.81472975e+01, 3.01512748e+01,
3.12974337e+01, 3.21521313e+01])
)
)
])


Expand Down
0