Skip to content

Clarify which SAPM parameters are required by module in pvsystem.sapm #2435

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

RDaxini
Copy link
Contributor

@RDaxini RDaxini commented Apr 10, 2025

  • Closes pvsystem.sapm documentation: clarification of coefficients used #2392
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries in docs/sphinx/source/reference for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels (including remote-data) and Milestone are assigned to the Pull Request and linked Issue.

@RDaxini RDaxini added this to the v0.12.1 milestone Apr 10, 2025
@RDaxini RDaxini changed the title Clarify which SAPM parameters are required in module argument of pvsystem.sapm Clarify which SAPM parameters are required by module in pvsystem.sapm Apr 10, 2025
@RDaxini RDaxini marked this pull request as ready for review April 10, 2025 22:50
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Copy link
Contributor

@echedey-ls echedey-ls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The following module keys are being used in pvlib.pvsystem.sapm, module parameter (do not match with current text):

Ordering by when they appear in code

Bvmpo
Mbvmp
Bvoco
Mbvoc
N
Cells_in_Series
Isco
Aisc
Impo
C0
C1
Aimp
Voco
Vmpo
C2
C3
IXO
C4
C5
Aisc
IXXO
C6
C7
Aimp

Ordering same as table

C0-C7
Isco
Impo
Voco
Vmpo
Aisc
Aimp
Bvoco
Mbvoc
Bvmpo
Mbvmp
N
Cells_in_Series
IXO
IXXO

Two points:

  1. It's usually better to speak/reflect statements in positive, so no ambiguities are left and in this case you also save time to the end user by not getting the full list, then excluding the list of unused parameters.
  2. While this PR does address the linked issue, I find the optimal solution would also be to document in the effective_irradiance parameter, that the effective irradiance is calculated by using the other sapm function(s) (which right now are not listed in the See Also section, adding them too would be a nice improvement)

EDIT: I see this review does not partially apply due to PR #2433, I did not see it earlier.

Comment on lines +2235 to +2238
Both databases can be accessed using :py:func:`retrieve_sam`. The full list
of SAPM parameters is presented in the table below. All but ``A0`` to
``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IXO``, and ``IXXO`` are
required in the ``module`` parameter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Both databases can be accessed using :py:func:`retrieve_sam`. The full list
of SAPM parameters is presented in the table below. All but ``A0`` to
``A4``, ``B0`` to ``B5``, ``C4`` to ``C7``, ``IXO``, and ``IXXO`` are
required in the ``module`` parameter.
Both databases can be accessed using :py:func:`retrieve_sam`. The full list
of SAPM parameters is presented in the table below.
The following subset of the SAPM module parameters is required to run this
model:
* ``C0-C7``
* ``Isco``
* ``Impo``
* ``Voco``
* ``Vmpo``
* ``Aisc``
* ``Aimp``
* ``Bvoco``
* ``Mbvoc``
* ``Bvmpo``
* ``Mbvmp``
* ``N``
* ``Cells_in_Series``
* ``IXO``
* ``IXXO``

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reword as you wish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pvsystem.sapm documentation: clarification of coefficients used
3 participants