Skip to content
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

Soiling algorithm updates #435

Open
wants to merge 53 commits into
base: development
Choose a base branch
from

Conversation

martin-springer
Copy link
Collaborator

@martin-springer martin-springer commented Nov 6, 2024

  • Code changes are covered by tests
  • Code changes have been evaluated for compatibility/integration with TrendAnalysis
  • New functions added to __init__.py
  • API.rst is up to date, along with other sphinx docs pages
  • Example notebooks are rerun and differences in results scrutinized
  • Updated changelog

nmoyer and others added 30 commits June 24, 2024 11:57
…tio and fit multiple soiling rates per soiling interval (piecewise)) as well as CODS algorithm being added
Move SRR and CODS development branch from noromo01 to rdtools repo
@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.03%. Comparing base (596f584) to head (9b1fd4c).

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #435      +/-   ##
===============================================
- Coverage        96.19%   96.03%   -0.17%     
===============================================
  Files               11       11              
  Lines             2209     2370     +161     
===============================================
+ Hits              2125     2276     +151     
- Misses              84       94      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martin-springer
Copy link
Collaborator Author

Seems like the pytest.PytestRemovedIn8Warning: in the degradation_and_soiling_example notebook might be related to nbval < 0.10 computationalmodelling/nbval#180

However, nbval greater than 0.9.6 has a bug with semicolon computationalmodelling/nbval#194

@mdeceglie - I believe you removed most of the semicolons from the notebooks? If so, we could try using a newer version of nbval.

@mdeceglie
Copy link
Collaborator

There are still a few semicolons, I'm fine with attempting to remove them and updating nbval

"max_neg_step": min(run.delta),
"start_loss": 1,
"inferred_start_loss": run.pi_norm.median(), # changed from mean/Matt
"inferred_end_loss": run.pi_norm.median(), # changed from mean/Matt
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mdeceglie - This change from .mean() to .median() seems to cause the RuntimeWarning:Mean of empty slice.
Seems counterintuitive but changing it back to mean get's rid of the warning...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We could add a check whether pi_norm is empty.
Also, I'm not sure why "inferred_start_loss" and "inferred_end_loss" are the same here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm adding the following condition for now. If there's a better way , we can change it:

"inferred_start_loss": np.nan if run.pi_norm.isna().any() else run.pi_norm.median(), # changed from mean/Matt "inferred_end_loss": np.nan if run.pi_norm.isna().any() else run.pi_norm.median(), # changed from mean/Matt

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

Successfully merging this pull request may close these issues.

3 participants