.. can refit to see affect of adjusting parameters.
.. doesn't "remember" them, need to think about what
that should mean (config in chart, season or athlete?)
.. also made t1/t2 fixed in the fit process so we have
fewer parameters and need less data to fit.
.. added a banister helper like on the CP plot
.. you can't adjust T1 and T2 yet, thats coming
in the next commit
.. also a few fixups related to submax filtering
of performances and some wip regarding how
the model fit works (windows, t1+t2 fixed etc).
.. Banister implementation is still under some
development, testing and validation but is in
good enough shape to try with your data.
.. we only have banister curves where there is data
so if there are gaps between seasons we should not
plot any data.
.. as a result also fixed bug that the qwt gapped
curve would always plot first zero in a curve.
.. Banister model fitting using LM
.. can plot Banister curves on trends plots;
- Performance curve (NTE+PTE)
- Predicted CP curve (Performance curve scaled)
- Negative Training Effect
- Positive Training Effect
.. the code is sub-optimal and needs to be refactored
to cache and refresh less frequently (using the same
pattern as PMC most likely).
.. the model fitting can fail and needs to be made a
lot more robust, along with ensuring the samples
we fit to are appropriate.
.. filter out submax performances
.. plot performances on LTMplot;
* tests - marked as TTEs by user
* weekly performances - found by algorithm
* submaximal performances - filtered out by algorithm
.. we now have the neccessary data to introduce the
Banister NTE/PTE and Performance curves in the next commit.
.. show weekly best performances (ready for banister curves)
.. show performance tests (also used by banister if present)
.. can toggle which ones to show.
.. use powerIndex to select points when t > 120s. This has resulted
in a much higher hit rate at finding performance tests in MMP
data (almost 99% of the time).
.. As part of a series of commits to add Banister IR modeling
this first one introduces a Power Index metric that can be
used to normalise TTEs of a different duration to a single
score.
.. This is so we can use performance tests of differing durations
when fitting Banister model curves to estimate k1 and k2.
.. The average power for an interval/ride is compared directly
with a power estimate for the same duration using the Morton
3-parameter model and mean values derived using opendata (where
CP=261, W'=15.5kJ and Pmax=1100w)
.. For the equivalence to be valid test must be in the 2-20 minute
range when used in banister modeling, but the index value is
valid as a comparison to the average athlete for all durations.
.. add option to apply a decay factor to CP and W' when plotting
the model curve in CP Plot.
.. since we always fit to observations <20mins the mostly submax
points at longer durations in the general population do not
impact the fit at all.
.. the decay factors for w' and cp have been fit to the results of:
Effects of Two Hours of Heavy-Intensity Exercise on the Power-
Duration Relationship
Clark IE, Vanhatalo A, Bailey SJ, Wylie LJ, Kirby BS, Wilkins BW,
Jones AM.
https://europepmc.org/abstract/med/29521722