-
Notifications
You must be signed in to change notification settings - Fork 11
Add HC algorithms and product options tests #237
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
base: main
Are you sure you want to change the base?
Conversation
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
disdrodb/l1/classification.py
Outdated
| # Initialize label | ||
| label = xr.ones_like(ds["time"], dtype=float) * -1 # [mm] | ||
|
|
||
| # No precipitation | ||
| label = xr.where(n_particles == 0, 1, label) |
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.
Mark zero-particle timesteps as no precipitation
Inside classify_raw_spectrum the “no precipitation” branch assigns label = xr.where(n_particles == 0, 1, label). Because the literal is 1, every timestep with no counted particles is labelled as drizzle (class 1) before the later hydrometeor_type mapping, so empty spectra are reported as rainfall and downstream flags such as precipitation_type, flag_hail, and flag_graupel are derived from the wrong class. The label for the no-particle case should be 0 to represent no precipitation.
Useful? React with 👍 / 👎.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
==========================================
- Coverage 93.93% 93.75% -0.18%
==========================================
Files 107 115 +8
Lines 9906 10871 +965
==========================================
+ Hits 9305 10192 +887
- Misses 601 679 +78 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Prework
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and communicate accordingly:
The PR fulfills these requirements:
reader-<institute>-<campaign>bugfix-<some_key>-<word>doc-<some_key>-<word>feature-<some_key>-<word>refactor-<some_key>-<word>optimize-<some_key>-<word>fix #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Related GitHub issues and Pull Requests
Summary
Please explain the purpose and scope of your contribution.