Created
December 29, 2022 21:32
-
-
Save btotr/537e5292ee2f13c82310936be829a5b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Normalized power | |
## | |
import pandas as pd | |
import numpy as np | |
def cycling_np(s): | |
rolling = s.dropna().rolling(30).mean().dropna() | |
NP = round((((rolling**4).mean())**0.25),0) | |
return(NP) | |
watts = pd.Series(np.asarray(GC.series(GC.SERIES_WATTS))) | |
np = cycling_np(watts) | |
print(np) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment