rand
Deprecated: use randu instead
rand
Deprecated: use randu instead. This is used in many test programs and Jython codes, and will not be removed.
rand
Deprecated: use randu instead
rand
Deprecated: use randu instead
randn
randn( ) → QDataSet
return a rank 0 dataset of random numbers of a Gaussian (normal) distribution.
Returns:
a rank 0 dataset of random numbers of a Gaussian (normal) distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randn
randn( int len0 ) → QDataSet
return a rank 1 dataset of random numbers of a Gaussian (normal) distribution.
Parameters
len0 - the number of elements in the first index.
Returns:
a rank 1 dataset of random numbers of a Gaussian (normal) distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randn
randn( int len0, int len1 ) → QDataSet
return a rank 2 dataset of random numbers of a Gaussian (normal) distribution.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
Returns:
a rank 2 dataset of random numbers of a Gaussian (normal) distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randn
randn( int len0, int len1, int len2 ) → QDataSet
return a rank 3 dataset of random numbers of a Gaussian (normal) distribution.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
len2 - the number of elements in the third index.
Returns:
a rank 3 dataset of random numbers of a Gaussian (normal) distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randn
randn( int len0, int len1, int len2, int len3 ) → QDataSet
return a rank 4 dataset of random numbers of a Gaussian (normal) distribution.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
len2 - the number of elements in the third index.
len3 - the number of elements in the fourth index.
Returns:
a rank 4 dataset of random numbers of a Gaussian (normal) distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomSeed
randomSeed( ) → long
restart the random sequence used by randu and randn. Note if there
if there are multiple threads using random functions, this becomes
unpredictable.
Returns:
the seed is returned.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomSeed
randomSeed( long seed ) → long
reset the random sequence used by randu and randn to the given seed.
Parameters
seed - the new seed for the sequence.
Returns:
the seed (which will be the same as the input).
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomn
randomn( long seed ) → QDataSet
returns a rank 0 dataset of random numbers of a Gaussian (normal) distribution.
System.currentTimeMillis() may be used for the seed. Note this is unlike
the IDL randomn function because the seed is not modified. (Any long parameter in Jython
and Java is read-only.)
System.currentTimeMillis() may be used for the seed.
Parameters
seed - basis for the random number (which will not be modified).
Returns:
rank 0 dataset
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomn
randomn( long seed, int len0 ) → QDataSet
returns a rank 1 dataset of random numbers of a Gaussian (normal) distribution.
System.currentTimeMillis() may be used for the seed.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
Returns:
rank 1 dataset of normal distribution
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomn
randomn( long seed, int len0, int len1 ) → QDataSet
returns a rank 2 dataset of random numbers of a Gaussian (normal) distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
Returns:
rank 2 dataset of normal distribution
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomn
randomn( long seed, int len0, int len1, int len2 ) → QDataSet
returns a rank 3 dataset of random numbers of a gaussian (normal) distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
Returns:
rank 3 dataset of normal distribution
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomn
randomn( long seed, int len0, int len1, int len2, int len3 ) → QDataSet
returns a rank 3 dataset of random numbers of a gaussian (normal) distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
len3 - number of elements in the fourth index
Returns:
rank 4 dataset of normal distribution
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomu
randomu( long seed ) → QDataSet
returns a rank 0 dataset of random numbers of a uniform distribution.
System.currentTimeMillis() may be used for the seed. Note this is unlike
the IDL randomn function because the seed is not modified. (Any long parameter in Jython
and Java is read-only.)
Parameters
seed - basis for the random number (which will not be modified).
Returns:
a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomu
randomu( long seed, int len0 ) → QDataSet
returns a rank 1 dataset of random numbers of a uniform distribution.
System.currentTimeMillis() may be used for the seed.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
Returns:
a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomu
randomu( long seed, int len0, int len1 ) → QDataSet
returns a rank 2 dataset of random numbers of a uniform distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
Returns:
a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomu
randomu( long seed, int len0, int len1, int len2 ) → QDataSet
returns a rank 3 dataset of random numbers of a uniform distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
Returns:
a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randomu
randomu( long seed, int len0, int len1, int len2, int len3 ) → QDataSet
returns a rank 3 dataset of random numbers of a uniform distribution.
Parameters
seed - basis for the random number (which will not be modified).
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
len3 - number of elements in the fourth index
Returns:
rank 4 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randu
randu( ) → QDataSet
returns a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
Returns:
a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randu
randu( int len0 ) → QDataSet
returns a rank 1 dataset of random uniform numbers from 0 to 1 but not including 1.
Parameters
len0 - the number of elements in the result.
Returns:
a rank 1 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randu
randu( int len0, int len1 ) → QDataSet
returns a rank 2 dataset of random uniform numbers from 0 to 1 but not including 1.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
Returns:
a rank 2 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randu
randu( int len0, int len1, int len2 ) → QDataSet
returns a rank 3 dataset of random uniform numbers from 0 to 1 but not including 1.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
len2 - the number of elements in the third index.
Returns:
a rank 3 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
randu
randu( int len0, int len1, int len2, int len3 ) → QDataSet
return a rank 4 dataset of random uniform numbers from 0 to 1 but not including 1.
Parameters
len0 - the number of elements in the first index.
len1 - the number of elements in the second index.
len2 - the number of elements in the third index.
len3 - the number of elements in the fourth index.
Returns:
a rank 4 dataset of random uniform numbers from 0 to 1 but not including 1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
rebundle
rebundle( QDataSet bundle1, String[] names ) → QDataSet
unbundle the names from the bundle, and rebundle them in the order
specified.
Parameters
bundle1 - a bundle of datasets
names - the bundled dataset names
Returns:
the new bundle
See Also:
unbundle(QDataSet, java.lang.String)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
rebundle
rebundle( QDataSet bundle1, int[] ii ) → QDataSet
unbundle datasets by index from the bundle, and rebundle them in the order
specified.
Parameters
bundle1 - a bundle of datasets
ii - the index of each dataset
Returns:
the new bundle
See Also:
unbundle(QDataSet, java.lang.String)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceBins
reduceBins( QDataSet dep1 ) → QDataSet
reduce each bin to its center. If the spacing is
log, then geometric centers are used.
Parameters
dep1 - rank 2 [N,2] bins dataset, where bins are min,max boundaries.
Returns:
rank 1 N element dataset
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMax
reduceMax( QDataSet ds, int dim ) → QDataSet
reduce the dataset's rank by reporting the max of all the elements along a dimension.
Only QUBEs are supported presently.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
Returns:
rank N-1 dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMax
reduceMax( QDataSet ds, int dim, ProgressMonitor mon ) → QDataSet
reduce the dataset's rank by reporting the max of all the elements along a dimension.
Only QUBEs are supported presently.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
mon - progress monitor
Returns:
rank N-1 dataset.
See Also:
reduceMin(QDataSet, int, org.das2.util.monitor.ProgressMonitor)
reduceMean(QDataSet, int, org.das2.util.monitor.ProgressMonitor)
extent(QDataSet)
extent(QDataSet, QDataSet)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMean
reduceMean( QDataSet ds, int dim ) → QDataSet
reduce the dataset's rank by reporting the mean of all the elements along a dimension.
Only QUBEs are supported presently. Note this does not contain code that would remove
large offsets from zero when making the average, so the number of points is limited.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
Returns:
rank N-1 qube dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMean
reduceMean( QDataSet ds, int dim, ProgressMonitor mon ) → QDataSet
reduce the dataset's rank by reporting the mean of all the elements along a dimension.
Only QUBEs are supported presently. Note this does not contain code that would remove
large offsets from zero when making the average, so the number of points is limited.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
mon - progress monitor.
Returns:
rank N-1 qube dataset
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMedian
reduceMedian( QDataSet ds, int dim, ProgressMonitor mon ) → QDataSet
reduce the dataset's rank by reporting the median of all the elements along a dimension.
Only QUBEs are supported presently. Note the weights reported are the totals of the data going in to each
median, typically the number of measurements compared (when all weights are 0 or 1).
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
mon - progress monitor.
Returns:
rank N-1 qube dataset
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMin
reduceMin( QDataSet ds, int dim ) → QDataSet
reduce the dataset's rank by reporting the min of all the elements along a dimension.
Only QUBEs are supported presently.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
Returns:
rank N-1 dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceMin
reduceMin( QDataSet ds, int dim, ProgressMonitor mon ) → QDataSet
reduce the dataset's rank by reporting the min of all the elements along a dimension.
Only QUBEs are supported presently.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
mon - progress monitor
Returns:
rank N-1 dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reduceSum
reduceSum( QDataSet ds, int dim ) → QDataSet
reduce the dataset's rank by reporting the sum of all the valid elements along a dimension. The property
"WEIGHTS" will contain the sum of the weights.
Only QUBEs are supported presently. This is like the function "total," but skips invalid values.
Parameters
ds - rank N qube dataset.
dim - zero-based index number.
Returns:
rank N-1 dataset.
See Also:
total(QDataSet, int)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reform
reform( QDataSet ds ) → QDataSet
Reshape the dataset to remove the first dimension with length 1, reducing
its rank by 1. Dependencies are also preserved. If no indices are found, then the dataset is returned.
Parameters
ds - rank N dataset
Returns:
the dataset, or rank N-1 dataset with the first 1-element dimension removed.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reform
reform( QDataSet ds, int nrec, int[] qube ) → QDataSet
allow reform record-by-record, which comes up often.
Parameters
ds - rank 2 or greater dataset of length nrec.
nrec - number of records in ds
qube - length nn array with the new geometry of each record.
Returns:
ds of rank nn+1.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reform
reform( QDataSet ds, int[] qube ) → QDataSet
change the dimensionality of the elements of the QUBE dataset. For example,
convert [1,2,3,4,5,6] to [[1,2],[3,4],[5,6]].
Parameters
ds - dataset
qube - the dimensions of the result dataset.
Returns:
a new dataset with the specified dimensions, and the properties (e.g. UNITS) of the input dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reform( Object ds, int[] qube ) → QDataSet [view source]
removeFill
removeFill( QDataSet ds ) → org.das2.qds.WritableDataSet
remove the fill values from the rank 1 dataset, returning a smaller dataset.
This was introduced to support the mash-up dialog.
Parameters
ds - the dataset, with VALID_MIN, VALID_MAX, or FILL_VALUE indicating the invalid data points.
Returns:
dataset with the values removed.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removeIndeces
removeIndeces( QDataSet vv, QDataSet indices ) → QDataSet
remove the data at the indices from the rank 1 dataset. This can be
used for example like so:
ds= ripples(20)
ds= removeIndeces( ds, where( valid(ds).eq(0) ) )
print ds.length()
Parameters
vv - a rank 1 dataset
indices - the indices to remove.
Returns:
a dataset with the values removed.
See Also:
https://github.com/autoplot/dev/blob/master/rfe/20190208/demoRemoveIndeces.jy
removeValues(QDataSet, QDataSet) which inserts fill.
where(QDataSet)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removeValues
removeValues( QDataSet ds, QDataSet indices ) → org.das2.qds.WritableDataSet
put fill data for these indices
Parameters
ds - the rank 1 or greater dataset
indices - rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.
Returns:
the dataset with the data at the indices made invalid.
See Also:
putValues(QDataSet, QDataSet, QDataSet)
where(QDataSet)
removeIndeces(QDataSet, QDataSet) which copies the data to remove the indices.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removeValues( Object ds, Object indices ) → org.das2.qds.WritableDataSet [view source]
removeValuesGreaterThan
removeValuesGreaterThan( QDataSet ds, QDataSet v ) → org.das2.qds.WritableDataSet
remove values in the dataset which are greater than the value.
This is a convenient method for the common case where we want to
filter data by values within the data, introduced to support
the data mash up dialog.
Parameters
ds - rank N dataset
v - the value, a rank 0 scalar or dataset with compatible geometry
Returns:
the dataset with these
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removeValuesGreaterThan( Object ds, Object v ) → org.das2.qds.WritableDataSet [view source]
removeValuesLessThan
removeValuesLessThan( QDataSet ds, QDataSet v ) → org.das2.qds.WritableDataSet
remove values in the dataset which are less than the value.
This is a convenient method for the common case where we want to
filter data by values within the data, introduced to support
the data mash up dialog. Note that this inserts fill where data is
to be removed.
Parameters
ds - rank N dataset
v - the value, a rank 0 scalar or dataset with compatible geometry
Returns:
the dataset with these
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
removeValuesLessThan( Object ds, Object v ) → org.das2.qds.WritableDataSet [view source]
replicate
replicate( short val, int len0 ) → org.das2.qds.WritableDataSet
returns rank 1 dataset with value
Parameters
val - fill the dataset with this value.
len0 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( short val, int len0, int len1 ) → org.das2.qds.WritableDataSet
returns rank 2 dataset filled with value
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( short val, int len0, int len1, int len2 ) → org.das2.qds.WritableDataSet
returns rank 3 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( int val, int len0 ) → org.das2.qds.WritableDataSet
returns rank 1 dataset with value
Parameters
val - fill the dataset with this value.
len0 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( int val, int len0, int len1 ) → org.das2.qds.WritableDataSet
returns rank 2 dataset filled with value
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( int val, int len0, int len1, int len2 ) → org.das2.qds.WritableDataSet
returns rank 3 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( long val, int len0 ) → org.das2.qds.WritableDataSet
returns rank 1 dataset with value
Parameters
val - fill the dataset with this value.
len0 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( long val, int len0, int len1 ) → org.das2.qds.WritableDataSet
returns rank 2 dataset filled with value
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( long val, int len0, int len1, int len2 ) → org.das2.qds.WritableDataSet
returns rank 3 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( double val, int len0 ) → org.das2.qds.WritableDataSet
returns rank 1 dataset with value
Parameters
val - fill the dataset with this value.
len0 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( double val, int len0, int len1 ) → org.das2.qds.WritableDataSet
returns rank 2 dataset filled with value
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( double val, int len0, int len1, int len2 ) → org.das2.qds.WritableDataSet
returns rank 3 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( double val, int len0, int len1, int len2, int len3 ) → org.das2.qds.WritableDataSet
returns rank 4 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
len3 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( float val, int len0 ) → org.das2.qds.WritableDataSet
returns rank 1 dataset with value
Parameters
val - fill the dataset with this value.
len0 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( float val, int len0, int len1 ) → org.das2.qds.WritableDataSet
returns rank 2 dataset filled with value
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( float val, int len0, int len1, int len2 ) → org.das2.qds.WritableDataSet
returns rank 3 dataset with filled with value.
Parameters
val - fill the dataset with this value.
len0 - an int
len1 - an int
len2 - an int
Returns:
an org.das2.qds.WritableDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( QDataSet val, int len0 ) → org.das2.qds.MutablePropertyDataSet
returns a rank N+1 dataset by repeating the rank N dataset, so
all records will have the same value. E.g. result.value(i,j)= val.value(j)
Parameters
val - the rank N dataset
len0 - the number of times to repeat
Returns:
rank N+1 dataset.
TODO: support rank N
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
replicate
replicate( QDataSet val, int len0, int len1 ) → org.das2.qds.MutablePropertyDataSet
returns a rank N+2 dataset by repeating the rank N dataset, so
all records will have the same value. E.g. result.value(i,j)= val.value()
Parameters
val - the rank N dataset
len0 - the number of times to repeat
len1 - the length of the second index.
Returns:
rank N+2 dataset.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
rescale
rescale( QDataSet data, QDataSet min, QDataSet max ) → QDataSet
calculate the range of data, then rescale it so that the smallest
values becomes min and the largest values becomes max.
Parameters
data - rank N dataset
min - rank 0 min
max - rank 0 max
Returns:
rescaled data.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
rescaleRange
rescaleRange( QDataSet dr, double min, double max ) → QDataSet
returns rank 1 QDataSet range relative to range "dr", where 0. is the minimum, and 1. is the maximum.
For example rescaleRange(ds,1,2) is scanNext, rescaleRange(ds,0.5,1.5) is zoomOut. This is similar
to the DatumRange rescale functions.
Parameters
dr - a QDataSet with bins and with nonzero width.
min - the new min normalized with respect to this range. 0. is this range's min, 1 is this range's max, -1 is
min-width.
max - the new max normalized with respect to this range. 0. is this range's min, 1 is this range's max, -1 is
min-width.
Returns:
new rank 1 QDataSet range.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
rescaleRangeLogLin
rescaleRangeLogLin( QDataSet dr, double min, double max ) → QDataSet
like rescaleRange, but look at log/lin flag.
Parameters
dr - a QDataSet
min - a double
max - a double
Returns:
two-element rank 1 QDataSet
See Also:
QDataSet#SCALE_TYPE
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reverse
reverse( QDataSet ds ) → QDataSet
returns the reverse of the rank 1 dataset.
Parameters
ds - a QDataSet
Returns:
a QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
reverse( Object ds ) → QDataSet [view source]
rgbColorDataset
rgbColorDataset( QDataSet red, QDataSet green, QDataSet blue ) → QDataSet
create a dataset of RGB colors. The output is
int(red)*256*256 + int(green)*256 + int(blue)
with the units of Units.rgbColor
Parameters
red - the red component, from 0 to 255
green - the green component, from 0 to 255
blue - the blue component, from 0 to 255
Returns:
the rgb encoded colors.
See Also:
toTimeDataSet(QDataSet, QDataSet, QDataSet, QDataSet, QDataSet, QDataSet, QDataSet)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripples
ripples( int len0 ) → QDataSet
rank 1 dataset for demos and testing.
Parameters
len0 - number of elements in the first index
Returns:
rank 1 dataset for demos and testing.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripples
ripples( int len0, int len1 ) → QDataSet
rank 2 dataset for demos and testing.
Parameters
len0 - number of elements in the first index
len1 - number of elements in the second index
Returns:
rank 2 dataset for demos and testing.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripples
ripples( int len0, int len1, int len2 ) → QDataSet
rank 3 dataset for demos and testing.
Parameters
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
Returns:
rank 3 dataset for demos and testing.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripples
ripples( int len0, int len1, int len2, int len3 ) → QDataSet
rank 4 dataset for demos and testing.
Parameters
len0 - number of elements in the first index
len1 - number of elements in the second index
len2 - number of elements in the third index
len3 - number of elements in the fourth index
Returns:
rank 4 dataset for demos and testing.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesJoinSpectrogramTimeSeries
ripplesJoinSpectrogramTimeSeries( int len ) → QDataSet
return fake position data for testing
result is rank 3 bundle [3,len/3,27*]
Parameters
len - the total number of records.
Returns:
an example join spectrogram time series.
See Also:
Schemes#irregularJoin()
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesPitchAngleDistribution
ripplesPitchAngleDistribution( ) → QDataSet
return an example of a QDataSet containing a pitch angle distribution. This is
a rank 2 dataset with angle in radians for DEPEND_0 and radius for DEPEND_1.
Returns:
an example pitch angle distribution.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesSpectrogramTimeSeries
ripplesSpectrogramTimeSeries( int len ) → QDataSet
return fake position data for testing
result is rank 2 bundle [len,27]
Parameters
len - the number of records
Returns:
fake position data for testing
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesTimeSeries
ripplesTimeSeries( int len ) → QDataSet
return fake rank 1 data timeseries for testing
Parameters
len - number of records
Returns:
fake rank 1 data timeseries for testing
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesVectorTimeSeries
ripplesVectorTimeSeries( int len ) → QDataSet
return fake position data for testing.
result is rank 2 bundle [len,3]
Parameters
len - number of records
Returns:
vector time series.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
ripplesWaveformTimeSeries
ripplesWaveformTimeSeries( int len ) → QDataSet
return fake waveform data for testing
result is rank 2 bundle [len,512]
Parameters
len - number of 512-element waveforms.
Returns:
rank 2 waveform
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
round
round( QDataSet ds1 ) → QDataSet
element-wise round function. 0.5 is round up.
Parameters
ds1 - a QDataSet
Returns:
a QDataSet
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
round
round( double x ) → double
for Jython, we handle this because the double isn't coerced.
Parameters
x - a double
Returns:
a double
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
round( Object x ) → QDataSet [view source]
round
round( QDataSet ds1, int ndigits ) → QDataSet
element-wise round function, which rounds to i decimal places.
0.5 is round up.
Parameters
ds1 - the dataset.
ndigits - round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)
Returns:
dataset with the same geometry with each value rounded.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
round
round( double x, int ndigits ) → double
for Jython, we handle this because the double isn't coerced.
Parameters
x - the double
ndigits - round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)
Returns:
the rounded double.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
round
round( Object ds1, int ndigits ) → QDataSet
element-wise round function, which rounds to i decimal places.
0.5 is round up.
Parameters
ds1 - the dataset.
ndigits - round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)
Returns:
dataset with the same geometry with each value rounded.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]