This PR is part of the PIG #1877 (roughly the 2 scenario of the implementation road map).
I send the PR now to maybe discuss it tomorrow in the call, but i am still missing tests, so not ready to merge yet!
In principle this PR already enables us to add a time filter and some event filters to an observation, which will be applied on the fly when accessing the
@dcfidalgo - Thanks!
I had a quick look.
One concern is that there needs to be a strategy concerning the handling of the edges of the intervals.
I'm not sure if we need this for time or phase intervals, it depends on what processing we do for those and what the output should be, but probably what you add here isn't it yet, specifically I see that you do
There's also the issue that the select methods you're adding on
Finally, my usual comment: I think you're doing too much in one PR here. Scenario 2 says "Add an empty filter to an Observation"
You are doing that, plus already implementing scenario 3 "filter an Observation by time" and even filter by phase also. These extra things need some thought and discussion and better docs and added tests, especially the time filtering, but also the phase filtering how it should behave and the edges 0 and 1.
The example in the class docstring of
So @dcfidalgo - overall this is a great addition, thanks! If you have time next week and want to continue in this PR and code review, that's OK I think, as long as it gets merged by the end of next week. This might be the fastest way. The other options are to split something out into a smaller PR, or to just merge this in soon and to open one or two follow-up issues or PRs to discuss the tricky parts concerning the detailed behaviour of time and phase filter and add the tests for that functionality there.
@cdeil Thanks for your comments!
Looking ahead, i think the future of the
The idea was to give a broader overview of the filter implementation, but i could have done it without explicitly implementing the new selection methods! I will replace the implementation with a
So i will add some tests for the
I removed the implementations of the
I also improved a bit the example in the
Two tests were also added: