Skip to content

update spectral_factor_firstsolar #2100

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 25 commits into from
Jul 17, 2024
Merged

Conversation

RDaxini
Copy link
Contributor

@RDaxini RDaxini commented Jun 21, 2024

Main change: update data screens in spectrum.spectral_factor_firstsolar

Summary of changes:

  • Added parameters for min/max AMa
  • Changed handling of values exceeding max pw
  • Replaced subjective phrasing of warnings
  • Added warning for low AMa
  • Revised docs, e.g. comments on model divergence moved to notes

Feedback on #2086 and recommendations for alternative/additional updates more than welcome.

Added parameters to enable user to set min/max airmass

Changed handling of values exceeding max pw to default to max pw rather than np.nan

Replaced subjective phrasing such as "exceptionally high" with "high" and removed references to "divergence" in the warnings in order to align with the fact that the user can now determine their own limits, which may or may not be "exceptionally" high/low or cause model divergence

Added tests for new AMa limit parameters, modified warnings and expected values in existing tests
@RDaxini
Copy link
Contributor Author

RDaxini commented Jun 21, 2024

@kandersolar is the failed test the one that you mentioned before fails randomly sometimes?

@AdamRJensen
Copy link
Member

@kandersolar is the failed test the one that you mentioned before fails randomly sometimes?

@RDaxini Yes it's unrelated to your contribution.

@cwhanse
Copy link
Member

cwhanse commented Jun 21, 2024

removed references to "divergence" in the warnings

I would rather see this information moved to a Notes section, than deleted. The reason for the bounds should be retained. For PW, the bounds ensure that the model doesn't "diverge" from physically reasonable values, e.g., if pw=0.01 then the last term involving $\frac{1}{\sqrt{pw}}$ could cause the modifier to fall outside of [0, 1].

@kandersolar kandersolar added this to the v0.11.1 milestone Jun 27, 2024
@kandersolar kandersolar added enhancement GSoC Contributions related to Google Summer of Code. labels Jun 27, 2024
@RDaxini
Copy link
Contributor Author

RDaxini commented Jul 3, 2024

 Based on the PVLIB Matlab function ``pvl_FSspeccorr`` (...)

Is this statement referring to the matlab function really necessary?

@cwhanse
Copy link
Member

cwhanse commented Jul 3, 2024

 Based on the PVLIB Matlab function ``pvl_FSspeccorr`` (...)

Is this statement referring to the matlab function really necessary?

Not any longer, this reference can be removed.

Copy link
Member

@AdamRJensen AdamRJensen left a comment

Choose a reason for hiding this comment

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

I'm surprised that a minimum airmass is added. Where does the default value come from (a quote or screen-shot from the paper perhaps)?

adriesse + AdamRJensen review

Co-authored-by: Anton Driesse <[email protected]>
Co-authored-by: Adam R. Jensen <[email protected]>
RDaxini added 3 commits July 10, 2024 13:14
plus removed a few commas, capitalised a letter
@RDaxini
Copy link
Contributor Author

RDaxini commented Jul 10, 2024

All good from my side now save for this one comment --- is the whatsnew entry for this PR okay?

Copy link
Member

@AdamRJensen AdamRJensen left a comment

Choose a reason for hiding this comment

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

A few nitpicky things:

  • Could you write out precipitable water in the warnings (minor, feel free to ignore if you disagree)
  • Add a sentence in the Notes section, stating that the min/max values are from the original pvlib implementation to the author (consider adding a link to the PR). I think this is important info as most users aren't going to find this discussion.

@RDaxini
Copy link
Contributor Author

RDaxini commented Jul 12, 2024

@AdamRJensen thanks for the comments. Those suggestions are fine, I have implemented them.
+I will fix tests shortly

pw -> precipitable water
@RDaxini RDaxini closed this Jul 15, 2024
@RDaxini RDaxini reopened this Jul 15, 2024
@AdamRJensen AdamRJensen merged commit 2e9c2c0 into pvlib:main Jul 17, 2024
30 checks passed
@AdamRJensen
Copy link
Member

Thank you @RDaxini for some great GSoC contributions!

@RDaxini RDaxini deleted the update_firstsolar_scf branch July 17, 2024 16:51
@echedey-ls echedey-ls mentioned this pull request Jul 18, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement GSoC Contributions related to Google Summer of Code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spectral_factor_firstsolar changes user input data
6 participants