added option to change History.squeeze behavior
We currently squeeze multiple History
columns into one by choosing the last column. This makes sense in many cases, but, as I got a request for alternative aggregation schemes from the IAGOS-project, obviously not in all. This MR implements the option to select from several squeezing options, currently "last"
(out current implementation), "min"
(select the smallest flag per row), "max"
(select the highest flag per row).
As I didn't really find a good place, where this rather special behavior, that furthermore requires quite some insight into the saqc-machinery, should be controlled, it is now/currently set by a module global variable.
Merge request reports
Activity
requested review from @luenensc
assigned to @schaefed
- Resolved by David Schäfer
I like the further customisation capabilities that adds.
Only thing i would handle otherwise (also regarding to your question, on where to put the access to the mechanic), is, imo it seems more intuitively to control the "
squeezing
" behavior with thesqueeze
keyword in the function call itself. So instead of having it boolean, having it being of typeLiteral["last", "min", "max"]="last"
.
- Resolved by David Schäfer
- Resolved by Bert Palm
Shouldn't this be done in the Translators, than in the History?
The History represents our internal state of a history. Since we dropped every relation between the columns/flags (remember we once had only write worst flags etc), there should be no need for another aggregation. Moreover the current implementation
x.ffill(axis=1).iloc[:, -1]
just return the last value ornan
as or policies (i know this again) dictates.The squeeze already has a
raw
option to implement custom stuff like for example aggregations and i think within the translators is the right place for that.i currently dont see the need for this MR, but i'm open to listen.
Edited by Bert Palm
- Resolved by David Schäfer
- Resolved by Bert Palm
added 3 commits
-
c91652f4...0671a6a7 - 2 commits from branch
develop
- a5ab4192 - Merge branch 'develop' into 'flag-aggregation'
-
c91652f4...0671a6a7 - 2 commits from branch
mentioned in commit f861f59f