org.das2.dataset.VectorUtil

VectorUtil( )


closestXTag

closestXTag( org.das2.dataset.DataSet ds, Datum datum ) → int

Parameters

ds - a DataSet
datum - a Datum

Returns:

int

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

closestXTag( org.das2.dataset.DataSet ds, double x, Units units ) → int

dumpToAsciiStream

dumpToAsciiStream( org.das2.dataset.VectorDataSet vds, Datum xmin, Datum xmax, java.io.OutputStream out ) → void

Parameters

vds - a VectorDataSet
xmin - a Datum
xmax - a Datum
out - an OutputStream

Returns:

void (returns nothing)

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

dumpToAsciiStream( org.das2.dataset.VectorDataSet vds, java.io.OutputStream out ) → void
dumpToAsciiStream( org.das2.dataset.VectorDataSet vds, java.nio.channels.WritableByteChannel out ) → void

dumpToBinaryStream

dumpToBinaryStream( org.das2.dataset.VectorDataSet vds, java.io.OutputStream out ) → void

Parameters

vds - a VectorDataSet
out - an OutputStream

Returns:

void (returns nothing)

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


dumpToDas2Stream

dumpToDas2Stream( org.das2.dataset.VectorDataSet vds, java.nio.channels.WritableByteChannel out, boolean asciiTransferTypes, boolean sendStreamDescriptor ) → void

write the data to a das2Stream

Parameters

vds - a VectorDataSet
out - a WritableByteChannel
asciiTransferTypes - a boolean
sendStreamDescriptor - if false, then don't send the stream and don't close

Returns:

void (returns nothing)

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


finiteDerivative

finiteDerivative( org.das2.dataset.VectorDataSet ds, int n ) → org.das2.dataset.VectorDataSet

Return the finite difference derivative of the dataset, between elements that are n steps apart. Because we don't have a general-purpose way to divide units, the units returned are dimensionless.

Parameters

ds - a VectorDataSet
n - an int

Returns:

org.das2.dataset.VectorDataSet

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


getXTagArrayDouble

getXTagArrayDouble( org.das2.dataset.DataSet vds, Units units ) → double[]

Parameters

vds - a DataSet
units - an Units

Returns:

double[]

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


median

median( org.das2.dataset.VectorDataSet ds ) → Datum

Parameters

ds - a VectorDataSet

Returns:

org.das2.datum.Datum

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


reduce2D

reduce2D( QDataSet xds, QDataSet ds, int start, int finish, Datum xLimit, Datum yLimit ) → QDataSet

produce a simpler version of the dataset by averaging adjacent data. code taken from org.das2.graph.GraphUtil.reducePath. Adjacent points are averaged together until a point is found that is not in the bin, and then a new bin is started. The bin's lower bounds are integer multiples of xLimit and yLimit. If yLimit is null, then averaging is done for all points in the x bin, regardless of how close they are in Y. This is similarly true when xLimit is null. xLimit and yLimit are rank 0 datasets, so that they can indicate that binning should be done in log space rather than linear. In this case, a SCALE_TYPE for the dataset should be "log" and its unit should be convertible to Units.logERatio (for example, Units.log10Ratio or Units.percentIncrease). Note when either is log, then averaging is done in the log space.

Parameters

xds - the x tags
ds - the y tags
start - first index.
finish - last (non-inclusive) index.
xLimit - the size of the bins or null to indicate no limit.
yLimit - the size of the bins or null to indicate no limit.

Returns:

a QDataSet

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


toString

toString( org.das2.dataset.VectorDataSet ds ) → String

Parameters

ds - a VectorDataSet

Returns:

java.lang.String

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