functions

Power-duration functions 

Power duration profile metrics
pd power profile >
frc, 1 // FRC from a mean max curve 
frc, 2 // Rolling FRC 
frce, 1 // FRC error from a mean max curve
ftp, 1 // FTP from a mean max curve 
ftp, 2 // Rolling FTP
ftpe, 1 // FTP error from a mean max curve
pmax, 1 // pmax from a mean max curve 
pmax, 2 // Rolling Pmax
pmaxe, 1 // pmax from a mean max curve
phenotype, 1 // phenotype from a mean max curve 
pdcurve, 1 // Power-duration curve 
pdcurve, 2 // Power-duration curve
pdprofile, 1 // Power-duration profile

Statistical functions 


Statistical function expressions
avg  >
bin  >
count  >
sum  >

Statiscal function syntax
avg, 1, // Average, weighted if x is present and time series 
bin, 2, // Place data into bins 
count, 1 //Count all values that aren't NaN
sum, 1 // Sum of inputs 
meanmax, 2 // Mean maximal value 
meanmax, 1 // Man maximal curve 

Selection functions 


Selection functions syntax
min, 1 // Smallest value of all the inputs 
max, 1// Largest value of all the inputs. 
first, 2 // Limit to the first n elements
last, 2 // Limit to the last n elements
least, 2 // Limit to the least n elements greatest, 2 // Limit to the greatest n elements 
if, 2 // Conditional selection
if 3, // Conditional selection

Sorting and Reshaping functions

Sorting and reshaping functions
Sorting and reshaping functions syntax
sort, 1 // Sort ascending sortd, 1 // Sort descending 
shift, 2 // Shift data forward or backward 
nozero, 1 // Replace all zero values with NaN

Unit functions 

Units functions
metric  >
date
Unit functions syntax
english, 1 // Convert metric to english if appropriate
metric, 1 // Convert english to metric if appropriate
date, 3 // Date serial number

Training levels functions

Training function expressions
Training levels functions syntax
levelfrom, 2 // Training level from 
levelto, 2 // Training level to 
levelname, 2 // Training level name

Mathematical functions 

Mathematical functions
abs
add
divide
subtract
sqrt
sign
power
multiply

Mathematical functions syntax
abs, 1 // Absolute value of n
add, 2 // Add lhs and rhs
divide, 2 // Divide lhs by rhs
subtract, 2 // Subtract lhs and rhs
sqrt, 1 // Square root of x, where x > 0
sign, 1 // Sign of n, -1 where x < 0, +1 where x > 0, else zero
power, 2 // Take lhs to the rhs power
multiply, 2 // Multiply lhs and rhs

Smoothing functions 


Smoothing function
ewma  >
tl
filter
gaussian
Smoothing function syntax
ewma, 2 // exponentially-weighted moving average
tl, 2 // Training load (ATL, CTL) 
filter, 3 // Convolve
gaussian, 2 // Gaussian filter kernel

Rounding functions


Rounding functions
Rounding functions syntax
ceil, 1 // Smallest integer that is greater than or equal to n
floor, 1 // Largest integer that is less than or equal to n
frac, 1 // Fractional portion of n
trunc, 1 // Integer portion of n
{"round", 1, // Round to the nearest integer
{"round", 2, // Round to the nearest 1x10^n

Boolean operations functions

Boolean functions
logicaland
logicalor
hastag

Boolean functions syntax
logicaland, 2 // Logical and lhs and rhs
logicalor, 2 // Logical or lhs and rhs
hastag, 1 // Has a tag


Ready to get started with WKO4? Click below to purchase or to try free for 14 days.
Share by: