org.das2.qds.util.BinAverage

utility class providing methods for bin averaging.


binAverage

binAverage( QDataSet ds, QDataSet newTags0 ) → DDataSet

returns a dataset with tags specified by newTags0. Data from ds are averaged together when they fall into the same bin. Note the result will have the property WEIGHTS.

Parameters

ds - a rank 1 dataset, no fill
newTags0 - a rank 1 tags dataset, that must be MONOTONIC.

Returns:

rank 1 dataset with DEPEND_0 = newTags.

See Also:

rebin(QDataSet, QDataSet, QDataSet)
binAverage(QDataSet, QDataSet )
binAverage(QDataSet, QDataSet, QDataSet )


search for examples view on GitHub view source


binAverageBundle

binAverageBundle( QDataSet ds, QDataSet dep0, QDataSet dep1, QDataSet dep2 ) → DDataSet

takes rank 2 bundle (x,y,z,f) and averages it into rank 3 qube f(x,y,z). This is similar to what happens in the spectrogram routine.

Parameters

ds - rank 2 bundle(x,y,z,f)
dep0 - the rank 1 depend0 for the result, which must be uniformly spaced.
dep1 - the rank 1 depend1 for the result, which must be uniformly spaced.
dep2 - the rank 1 depend2 for the result, which must be uniformly spaced.

Returns:

rank 3 dataset of z averages with depend_0, depend_1, and depend_2. WEIGHTS contains the total weight for each bin.

See Also:

rebinBundle(QDataSet, QDataSet, QDataSet)


search for examples view on GitHub view source


binMeanAverageDeviation

binMeanAverageDeviation( QDataSet ads, QDataSet ds ) → DDataSet

takes rank 2 bundle (x,y,z) and averages in table z(x,y) and computes the mean average deviation in each bin.

Parameters

ads - rank 2 grid of averages
ds - rank 2 bundle(x,y,z)

Returns:

rank 2 dataset of z averages with depend_0 and depend_1. WEIGHTS contains the total weight for each bin.

See Also:

rebin(QDataSet, QDataSet, QDataSet)
rebinBundle(QDataSet, QDataSet, QDataSet, QDataSet)
Ops#meanAverageDeviation(QDataSet)


search for examples view on GitHub view source


boxcar

boxcar( QDataSet ds, int size ) → DDataSet

run boxcar average over the dataset, returning a dataset of same geometry. Points near the edge are simply copied from the source dataset. The result dataset contains a property "weights" that is the weights for each point.

Parameters

ds - a rank 1 dataset of size N
size - the number of adjacent bins to average

Returns:

rank 1 dataset of size N

search for examples view on GitHub view source


rebinBundle

Deprecated: see binAverageBundle

residuals

residuals( QDataSet ds, int boxcarSize ) → QDataSet

returns number of stddev from adjacent data.

Parameters

ds, - rank 1 dataset.
boxcarSize -

Returns:

QDataSet

search for examples view on GitHub view source