sksports.metrics.normalized_power_score

sksports.metrics.normalized_power_score(activity_power, mpa, window_width=30)[source][source]

Normalized power®.

The normalized power is an average power computing a smoothed power input and rejecting the low power intensities.

Read more in the User Guide.

Parameters:
activity_power : Series

A Series containing the power data from an activity.

mpa : float

Maximum power aerobic. Use metrics.ftp2mpa if you use the functional threshold power metric.

window_width : int, optional

The width of the window used to smooth the power data before to compute the normalized power. The default width is 30 samples.

Returns:
score : float

Normalized power score.

References

[1]Allen, H., and A. Coggan. “Training and racing with a power meter.” VeloPress, 2012.

Examples

>>> from sksports.datasets import load_fit
>>> from sksports.io import bikeread
>>> from sksports.metrics import normalized_power_score
>>> ride = bikeread(load_fit()[0])
>>> mpa = 400
>>> np = normalized_power_score(ride['power'], mpa)
>>> print('Normalized power {:.2f} W'.format(np))
Normalized power 218.49 W

Examples using sksports.metrics.normalized_power_score