-
Notifications
You must be signed in to change notification settings - Fork 17
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
ADD: New function - Apply to sweeps #202
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #202 +/- ##
==========================================
+ Coverage 91.95% 91.97% +0.01%
==========================================
Files 23 23
Lines 4562 4573 +11
==========================================
+ Hits 4195 4206 +11
Misses 367 367
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@syedhamidali Great idea! We already have implemented the georeferencing to work over a tree. We might think to generalize that approach using this Pull Request. For the georeferencing we used accessors and the From my perspective it would make sense to implement your approach as accessor, too. The API would be like this: dtree = dtree.xradar.apply(function, *args, **kwargs) Where Does that make sense? |
@kmuehlbauer Thanks! Yeah, I agree that |
@syedhamidali I'll respond with some more details later this weekend. Thanks for being supportive of the overall idea! |
@kmuehlbauer, when you get a chance, could you take a quick look at PR #203? I’d really appreciate your feedback. |
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 like this approach - to @kmuehlbauer 's point, we can follow up with that in another PR, I think this functionality will be useful! Please address the comment related to only including the updates related to this PR
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.
LGTM, let's get this in!
Thanks @syedhamidali! |
history.md
Description:
This PR introduces a new utility function,
apply_to_sweeps
, that allows users to apply a custom function to each sweep within a radar volume stored in aDataTree
object. This is particularly useful for tasks where you need to perform the same operation across multiple sweeps, such as calculating derived quantities like rain rate from radar reflectivity.Example Usage:
Here’s an example of how to use the
apply_to_sweeps
function to calculate rain rates using the Marshall-Palmer power law:Here's another example for example using
filter_radar
function