org.das2.dataset.DataSetUtil

DataSetUtil( )


append

append( org.das2.dataset.DataSet ds1, org.das2.dataset.DataSet ds2, org.das2.datum.CacheTag ct ) → DataSet

provides convenient method for appending datasets together. The first dataset may be null, in which case the second is trivially returned. Presently a builder is used to create the new dataset, but in the future more efficient methods will be used. If both ds1 and ds2 are null, then null is returned.

Parameters

ds1 - the first data set. May be null.
ds2 - the second data set. This data set should be after ds1, and may be null.
ct - the cache tag for the second dataset. May be null, in which case guessCacheTag is used to identify the dataset cache tag.

Returns:

org.das2.dataset.DataSet

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

append( org.das2.dataset.DataSet ds1, org.das2.dataset.DataSet ds2 ) → DataSet

closestColumn

closestColumn( org.das2.dataset.DataSet table, Datum datum ) → int

Parameters

table - a DataSet
datum - a Datum

Returns:

int

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

closestColumn( org.das2.dataset.DataSet table, double x, Units units ) → int
closestColumn( org.das2.dataset.DataSet table, Datum xdatum, int guessIndex ) → int

getAllPlaneIds

getAllPlaneIds( org.das2.dataset.DataSet ds ) → String

returns all planes, including the default plane "". This is to take care of inconsistent behavior of the ds.getPlaneIds() implementations.

Parameters

ds - a DataSet

Returns:

java.lang.String[]

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


getNextColumn

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

returns the first column that is after the given datum. Note the if the datum identifies (==) an xtag, then the previous column is returned.

Parameters

ds - a DataSet
datum - a Datum

Returns:

int

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


getPreviousColumn

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

returns the first column that is before the given datum. Note the if the datum identifies (==) an xtag, then the previous column is returned.

Parameters

ds - a DataSet
datum - a Datum

Returns:

int

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


getWeightsDataSet

getWeightsDataSet( org.das2.dataset.DataSet ds ) → DataSet

Parameters

ds - a DataSet

Returns:

org.das2.dataset.DataSet

[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]


getXTags

getXTags( org.das2.dataset.DataSet ds ) → DatumVector

Parameters

ds - a DataSet

Returns:

org.das2.datum.DatumVector

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


guessCacheTag

guessCacheTag( org.das2.dataset.DataSet ds ) → CacheTag

Parameters

ds - a DataSet

Returns:

org.das2.datum.CacheTag

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


guessSizeBytes

guessSizeBytes( org.das2.dataset.DataSet ds ) → long

Give an estimate of the size of the data set, or PROPERTY_SIZE_BYTES if available. Generally this would be used as a penalty against the dataset, and it's probably better to overestimate the dataset size.

Parameters

ds - a DataSet

Returns:

long

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


guessXTagWidth

guessXTagWidth( org.das2.dataset.DataSet table ) → Datum

Provide a reasonable xTagWidth either by returning the specified xTagWidth property, or by statistically looking at the X tags.

Parameters

table - a DataSet

Returns:

org.das2.datum.Datum

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


log10

log10( org.das2.dataset.VectorDataSet ds ) → VectorDataSet

Parameters

ds - a VectorDataSet

Returns:

org.das2.dataset.VectorDataSet

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


xRange

xRange( org.das2.dataset.DataSet ds ) → DatumRange

returns the xrange of the dataset. This assumes that the xtags are monotonic.

Parameters

ds - a DataSet

Returns:

a DatumRange

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


xTagBinarySearch

xTagBinarySearch( org.das2.dataset.DataSet ds, Datum datum, int low, int high ) → int

returns the index of a tag, or the (-(insertion point) - 1). (See Arrays.binarySearch)

Parameters

ds - a DataSet
datum - a Datum
low - an int
high - an int

Returns:

int

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


yRange

yRange( org.das2.dataset.DataSet ds ) → DatumRange

Parameters

ds - a DataSet

Returns:

org.das2.datum.DatumRange

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


zRange

zRange( org.das2.dataset.DataSet ds ) → DatumRange

guess a range that characterizes the data. The DataSet property name DataSet.PROPERTY_Z_RANGE can be used by the dataset to explicitly set this.

Parameters

ds - a DataSet

Returns:

a DatumRange useful for setting axis range.

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