-
Notifications
You must be signed in to change notification settings - Fork 67
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
base: development
Are you sure you want to change the base?
Conversation
…tio and fit multiple soiling rates per soiling interval (piecewise)) as well as CODS algorithm being added
…rials' into development
Signed-off-by: nmoyer <[email protected]>
Move SRR and CODS development branch from noromo01 to rdtools repo
…nto bare_except_error
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
…rror' into qnguyen345-bare_except_error
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. |
There are still a few semicolons, I'm fine with attempting to remove them and updating nbval |
rdtools/soiling.py
Outdated
"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 |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
__init__.py