org.das2.qds.util.LttbDownsampler

LTTB (Largest Triangle Three Buckets) downsampling for Autoplot QDataSet. Assumes: - yData is rank-1 - xData is taken from DEPEND_0 if present; otherwise x = 0,1,2,... Returns a rank-1 DDataSet with DEPEND_0 set to a rank-1 x dataset.


lttb

lttb( QDataSet yData, int threshold ) → QDataSet

Downsample a 1D QDataSet with LTTB.

Parameters

yData - rank-1 QDataSet of y-values
threshold - desired number of points (including first and last)

Returns:

downsampled QDataSet (rank-1) with DEPEND_0 set

[search for examples] [view on GitHub] [view on old javadoc] [view source]