-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Is your feature request related to a problem? Please describe.
My current understanding of the make_step_table()-method is that the mean values are simple, arithmetic means. This is fine when all datapoints are equally spaced, but since cyclers typically record data at either a
This will have an impact on the standard deviation calculations as well.
Describe the solution you'd like
The current implementation is:
by = [shdr.cycle, shdr.step, shdr.sub_step]
gf = df.groupby(by=by)
df_steps = gf.agg(["mean", "std", "min", "max", "first", "last", delta]).rename(
columns={"amin": "min", "amax": "max", "mean": "avr"}
)Here "mean" should either be replaced with, or there should be added a couple of custom functions (like delta in the above example) that calculates the time-weighted and the capacity-weighted means.
"std" would also need to be modified.