Skip to content

DOC: clarify hsu soiling ratio minimum value in docstring#2743

Open
Omesh37 wants to merge 11 commits intopvlib:mainfrom
Omesh37:doc/hsu-soiling-ratio-minimum-value
Open

DOC: clarify hsu soiling ratio minimum value in docstring#2743
Omesh37 wants to merge 11 commits intopvlib:mainfrom
Omesh37:doc/hsu-soiling-ratio-minimum-value

Conversation

@Omesh37
Copy link
Copy Markdown

@Omesh37 Omesh37 commented Apr 26, 2026

  • Closes Possible improvement to pvlib.soiling.hsu documentation #2534
  • I am familiar with the contributing guidelines
  • I attest that all AI-generated material has been vetted for accuracy and is in compliance with the pvlib license
  • 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.

Summary

Closes #2534

Improved the pvlib.soiling.hsu docstring to clarify that the HSU model
has a minimum soiling ratio of approximately 0.6563, due to the mathematical
limit of the error function in the model equation:
SR = 1 - 0.3437 * erf(0.17 * ω^0.8473)

As erf approaches 1.0 at large inputs, SR cannot drop below 1 - 0.3437 = 0.6563.
Detailed explanation has been moved to a Notes section as suggested in review.

Changes

  • Updated Returns docstring in pvlib/soiling.py
  • Updated function summary paragraph
  • Added whatsnew entry under v0.15.2

Copy link
Copy Markdown
Member

@cwhanse cwhanse left a comment

Choose a reason for hiding this comment

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

Thanks Omesh37, this is useful additions to the documentation.

Comment thread pvlib/soiling.py Outdated
Comment thread pvlib/soiling.py Outdated
@Omesh37
Copy link
Copy Markdown
Author

Omesh37 commented Apr 27, 2026

Thanks for the review @cwhanse
I've gone through the changes and accepted your suggestion for line 22-23.
Also:

  • Moved the detailed content to a Notes section
  • Rephrased the valid range sentence as suggested
    Please let me know if ant further changes are needed.

Comment thread pvlib/soiling.py Outdated
Comment thread pvlib/soiling.py Outdated
Comment thread docs/sphinx/source/whatsnew/v0.15.2.rst Outdated
Omesh37 and others added 4 commits April 27, 2026 23:01
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
@Omesh37
Copy link
Copy Markdown
Author

Omesh37 commented Apr 27, 2026

Thanks for the review @cwhanse
I have changed and accepted the changes.
I new so please consider it as I made such a silly mistake.
Please let me know if ant further changes are needed.

@cwhanse cwhanse added this to the v0.15.2 milestone Apr 27, 2026
@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Apr 27, 2026

@Omesh37 I copied the pull request template into the first comment. Please answer the two open items.

In the future please include the template in pull requests.

@cwhanse
Copy link
Copy Markdown
Member

cwhanse commented Apr 27, 2026

And welcome to contributors to pvlib :)

Comment thread pvlib/soiling.py Outdated
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
@Omesh37
Copy link
Copy Markdown
Author

Omesh37 commented Apr 28, 2026

Sorry about missing the template @cwhanse! I have now filled out all
the checklist items. This is a documentation-only change so Tests added
and API reference update are not applicable. I will make sure to include
the template from the start in future pull requests.

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.

Possible improvement to pvlib.soiling.hsu documentation

2 participants