Skip to content

Remove out-of-range warnings from pvlib.spectrum.spectral_factor_firstsolar #2512

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 5 commits into from
Jul 30, 2025

Conversation

kandersolar
Copy link
Member

@kandersolar kandersolar commented Jul 28, 2025

  • [ ] Closes #xxxx
  • 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.

The warnings emitted from spectral_factor_firstsolar were taken from the MATLAB version: https://github.com/sandialabs/MATLAB_PV_LIB/blob/master/pvl_FSspeccorr.m#L113

Such warnings are not present elsewhere in pvlib-python. I've felt for a long time that they are out of place (see e.g. #1296 (comment) and #2072 (comment)). This PR proposes to remove the warnings.

@kandersolar kandersolar added this to the v0.13.1 milestone Jul 28, 2025
Copy link
Member

@RDaxini RDaxini left a comment

Choose a reason for hiding this comment

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

Somewhat (maybe) related discussion in #2086 on the limits (more so than the warnings) for further context in case anyone is interested.

Anyway LGTM, thanks for making this overdue change @kandersolar

@kandersolar kandersolar merged commit ded2867 into pvlib:main Jul 30, 2025
23 of 25 checks passed
@kandersolar kandersolar deleted the firstsolar-warnings branch July 30, 2025 18:34
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.

3 participants