-
Notifications
You must be signed in to change notification settings - Fork 38
Breaking: more consistent (dis)aggregation of lookups #914
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?
Breaking: more consistent (dis)aggregation of lookups #914
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #914 +/- ##
==========================================
+ Coverage 82.32% 83.16% +0.83%
==========================================
Files 60 58 -2
Lines 4357 5399 +1042
==========================================
+ Hits 3587 4490 +903
- Misses 770 909 +139 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Okay I gave it a go now with a more proper fix and added some tests to show what my goal is here. Some of the tests fail and I'm not totally sure how to fix them yet, will look more at it later. But it also seems the tests 1) still use some old (deprecated?) syntax (e.g. passing a locus to |
Sorry havent had time to look at this, did you figure it out? |
I figured something out, but if IIRC the thing I figured out would be breaking |
We can bundle it with the DD breaking change |
Now I remember - we need to choose if we still want to allow EDIT: it worked, but this is exactly the thing I broke here :) |
More specifically my idea here is that the clearest case for disaggregating is with interval sampling. We can visualize breaking each grid cell into smaller grid cells, and that's what I implemented here. Before this PR that would depend on the sampling. It's less clear how disaggregation should work for points, which is where this locus argument came in - but again, at the moment that is not documented |
Co-authored-by: Felix Cremer <felix.cremer@dlr.de>
At the moment the PR will just always disaggregate point from the center. If you think that is a reasonable way to go all we need to do is fix the tests and this PR is good to go. I'm away for the weekend but can do it on Monday |
src/methods/aggregate.jl
Outdated
newl = l[start:scale:stop] | ||
sp = aggregate(method, span(l), scale) | ||
return rebuild(newl; span=sp) | ||
if issampled(l) && isordered(l) && isregular(l) |
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.
Isn't aggregating Irregular
ok in some cases?
Like its a bit wrong to do with mean but fine with sum?
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.
This is in lookup aggregation. How should we aggregate irregular lookups?
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.
Just like they were in the past... Start and end locus are especially simple. It's just dropping the other values.
Center is a bit more complicated, I guess the middle of the aggregated range?
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 added an extra check for regular - so for irregular lookups it works basically like it used to.
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.
Actually we might want the old behaviour for point lookups as well - I'm not sure
Would you say breaking change or bugffix? |
I'm not even sure. Some of the changes for point sampling might be actually breaking? But some of that behaviour was already deprecated |
But if there's a breaking release of DD on the way we might as well just add it to the breaking release here? |
Yeah, it makes sense I'm just not sure when it will all happen |
closes #913