-
Notifications
You must be signed in to change notification settings - Fork 54
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
Adding ability to track on one dataset, segment on another #242
Adding ability to track on one dataset, segment on another #242
Conversation
…nd segment on another
# Conflicts: # tobac/segmentation.py # tobac/utils/general.py # tobac/utils/internal.py
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## RC_v1.5.0 #242 +/- ##
=============================================
+ Coverage 54.60% 55.90% +1.29%
=============================================
Files 15 15
Lines 3170 3279 +109
=============================================
+ Hits 1731 1833 +102
- Misses 1439 1446 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
Looks good at first glance, my main concerns are regarding unexpected behaviour in transform_feature_points
. Otherwise most of my comments are things that are probably best left for when we refactor everything for xarray in version 2.
I'll check out the branch and try it with some different data later and let you know if any issues arise
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.
Great addition @freemansw1 ! Looks overall good..just a couple of small comments and one issue where I am not sure if we have to address this in this PR (see comment about standard_name
used in iris conversion)
# Conflicts: # tobac/utils/general.py
@JuliaKukulies @w-k-jones this is ready for re-review. @lettlini how can I/we add an additional few dependencies for the notebooks? The tutorial I include here requires PyArt and a few others. |
@freemansw1 I think it would be a good idea to add a separate step for installing packages that are not tobac dependencies. We should move To do this you would have to add a
Alternatively, you could just add the packages required by the notebook to the existing Let me know if you need any further help! |
@freemansw1 @lettlini I don't think including pyart as a dependency is a good idea. When I try installing a clean environment with the tobac requirements + pyart it falls back to python Would it be possible to create a file of the gridded radar output from pyart, upload this to zenodo and have the example notebook download and use this in the same manner as the original examples? We could also include the pyart code used to create the gridded dataset in a comment/markdown text to demonstrate how it was done |
I am happy to switch to that, but I think the downside there is that the user can't just download and run the code (which I see as a pretty big downside). @lettlini is there a way to make it notebook-specific, as a compromise? To be clear- just talking about adding pyart as a dependency for notebooks, not for the project. |
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.
Looking good. I have still have a few concerns regarding the user understanding what's going on beneath the hood. This can be left to a later refactor if it's too much work to change quickly.
Question: What happens in segmentation if two features are assigned to the same point in the new dataset?
@w-k-jones may I ask in what order you installed Python and the other dependencies? Could you try the following:
Edit |
Tested on two systems (OSX and linux), in both cases creating a new environment including |
Even more complexity, on it's own |
OK, I think I've resolved all of the review comments again. Ready for re-review @JuliaKukulies @w-k-jones . |
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.
The changes look good to me @freemansw1, thanks for your hard work on this!
The only thing that is not entirely clear for me yet is our dependency solution. So we use example_requirements.txt
for the notebooks now? Somehow this seems to cause a fail in the notebook check workflow, but related to s3fs?
Yes, it appears that it may be an issue with the pyart (?) dependencies not installing s3fs and fsspec versions that are compatible with each other. I've resolved this, but an actual bug was found, so I will need to resolve that next. |
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.
Everything looks good, thanks for making the changes! Happy for this to be merged
This is new functionality that I first mentioned in #98 to transform feature points into a new grid to allow for segmenting on a different grid from the one you are tracking on.
Note the change to the time comparisons in the segmentation code; iris times gave me a pretty good headache, but I think the solution is universal until we switch over to xarray.