MMP

Utilities to manipulate power duration curves, fit them and do what-if analysis

The power_curve function will be fitted to its parameters, with reasonable bounds


source

MMP

 MMP (x, y)

A Mean Max Power curve

Details
x Time
y Power

Load a mean maximal curve, with time in seconds and corresponding watts

df = pd.read_csv("../data/mmpcurve.csv")
mmp = MMP(df['Secs'], df['Watts'])
@patch
def newBest(self:MMP, secs, watts):
    newbest = (self.x<=secs) & (self.y<watts)
    self.y.loc[newbest] = watts
plt.figure(figsize=(10,6))
plt.plot(mmp.x, mmp.y)
plt.xscale('log')
plt.show()

mmp.newBest(100, 400)
plt.figure(figsize=(10,6))
plt.plot(mmp.x, mmp.y)
plt.xscale('log')
plt.show()