Loading

reducer.percentile


reducer
Since v1.0.11
Available on all platforms
See also

Pushes onto the stack an AGGREGATOR which returns the N^th^ percentile of the values for each tick.

For this reducer, GTS must be aligned and must have a value for each tick of each GTS.

The returned location and elevation are those of the chosen value.

Signature

Examples

//each GTS has a value for each tick. [ NEWGTS "GTS1" RENAME 10 42.0 42.0 42.0 1.0 ADDVALUE 20 NaN NaN NaN 5.0 ADDVALUE NEWGTS "GTS2" RENAME 10 NaN NaN NaN 4.0 ADDVALUE 20 44.0 44.0 44.0 3.0 ADDVALUE NEWGTS "GTS3" RENAME 10 NaN NaN NaN 3.0 ADDVALUE 20 NaN NaN NaN 8.0 ADDVALUE NEWGTS "GTS4" RENAME 10 NaN NaN NaN 3.0 ADDVALUE 20 NaN NaN NaN 2.0 ADDVALUE ] 'GTSlist' STORE [ $GTSlist [] 70.0 reducer.percentile ] REDUCE