org.das2.qds.SubsetDataSet

Extracts a subset of the source dataset by using a rank 1 subset of indeces on each index.


applyIndex

applyIndex( int idim, QDataSet idx ) → void

apply the subset indexes to a given dimension. For example, if a=[10,20,30,40] then applyIndex( 0, [1,2] ) would result in [20,30].

Parameters

idim -
idx - the rank 1 index list, for example from where on a rank 1 dataset.

Returns:

void (returns nothing)

search for examples view on GitHub view source


parseIndices

parseIndices( String spec, int dimlen ) → int

parse the string spec into a list of indices. The spec is a comma-delineated list containing any combination of:

If the spec starts with ~, then these indices are removed. For example: Note if invert is present, then the indices cannot be reversed.

Parameters

spec -
dimlen, - the amount added to negative indices.

Returns:

the list of integers.

search for examples view on GitHub view source