public final class Ops
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
Ops.BinaryOp
BinaryOps are operations such as add, pow, atan2
|
static class |
Ops.FFTFilterType
Enumeration identifying windows applied to data before doing FFTs.
|
static interface |
Ops.LongBinaryOp
Like BinaryOp, but operands and result are long.
|
static interface |
Ops.UnaryOp
UnaryOps are one-argument operations, such as sin, abs, and sqrt
|
Modifier and Type | Field and Description |
---|---|
static double |
E
the closest double to e, the base of natural logarithms.
|
static double |
PI
closest double to π or TAU/2
|
static double |
TAU
closest double to τ or 2*PI
|
Modifier and Type | Method and Description |
---|---|
static double |
abs(double v)
return the abs of the double, to support Jython properly.
|
static long |
abs(long x)
return the abs of the long, to support Jython properly.
|
static QDataSet |
abs(java.lang.Object ds1)
promote the list, double, array etc to QDataSet before taking abs.
|
static QDataSet |
abs(QDataSet ds1)
element-wise abs.
|
static QDataSet |
accum(java.lang.Object ds) |
static QDataSet |
accum(java.lang.Object accumDs,
java.lang.Object ds) |
static QDataSet |
accum(QDataSet ds)
return an array that is the running sum of each element in the array,
starting with the value accum.
|
static QDataSet |
accum(QDataSet accumDs,
QDataSet ds)
return an array that is the running sum of each element in the array,
starting with the value accum.
|
static double |
acos(double ds)
return the acos of the real number in radians.
|
static QDataSet |
acos(java.lang.Object ds) |
static QDataSet |
acos(QDataSet ds)
element-wise arccos, the inverse of the cos function.
|
static QDataSet |
add(java.lang.Object ds1,
java.lang.Object ds2)
add the two datasets which have the compatible geometry and units.
|
static QDataSet |
add(QDataSet ds1,
QDataSet ds2)
add the two datasets which have the compatible geometry and units.
|
static QDataSet |
add(QDataSet ds1,
QDataSet ds2,
QDataSet ds3)
three-argument add is provided as a convenience for environments (like Java
and the Mash-up tool in Autoplot) where add is not an in-fix operator.
|
static QDataSet |
and(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
and(QDataSet ds1,
QDataSet ds2)
element-wise logical and function.
|
static QDataSet |
append(QDataSet ds1,
QDataSet ds2)
append two datasets that are QUBEs.
|
static QDataSet |
appendEvents(QDataSet ev1,
QDataSet ev2)
Deprecated.
since append works with events datasets.
|
static MutablePropertyDataSet |
applyBinaryOp(java.lang.Object ds1,
java.lang.Object ds2,
Ops.BinaryOp op)
As with applyBinaryOp, but promote compatible objects to QDataSet first.
|
static MutablePropertyDataSet |
applyBinaryOp(QDataSet ds1,
QDataSet ds2,
Ops.BinaryOp op)
apply the binary operator element-for-element of the two datasets, minding
dataset geometry, fill values, etc.
|
static WritableDataSet |
applyIndex(java.lang.Object dso,
QDataSet r)
apply the indices
|
static MutablePropertyDataSet |
applyIndex(QDataSet ds,
int dimension,
QDataSet indices)
apply the indices to the given dimension.
|
static WritableDataSet |
applyIndex(QDataSet ds,
QDataSet r)
apply the indices to the dataset, resorting the 0th dimension using the indices of r.
|
static WritableDataSet |
applyIndex(QDataSet vv,
QDataSet ds,
java.lang.Number fillValue)
apply the indices, checking for out-of-bounds values.
|
static MutablePropertyDataSet |
applyUnaryOp(java.lang.Object ds1,
Ops.UnaryOp op)
apply the unary operation (such as "cos") to the dataset, propagating
DEPEND_0 through DEPEND_3 and other appropriate metadata.
|
static MutablePropertyDataSet |
applyUnaryOp(QDataSet ds1,
Ops.UnaryOp op)
apply the unary operation (such as "cos") to the dataset, propagating
DEPEND_0 through DEPEND_3 and other appropriate metadata.
|
static QDataSet |
arange(int len0)
returns rank 1 dataset with values [0.,1.,2.,...]
|
static double |
asin(double ds)
return the asin of the real number in radians.
|
static QDataSet |
asin(java.lang.Object ds) |
static QDataSet |
asin(QDataSet ds)
element-wise arcsin, the inverse of the sin function.
|
static double |
atan(double ds)
arc tangent function
|
static QDataSet |
atan(java.lang.Object ds) |
static QDataSet |
atan(QDataSet ds)
element-wise arc tangent function
|
static double |
atan2(double y,
double x)
4-quadrant arc tangent.
|
static QDataSet |
atan2(java.lang.Object dsy,
java.lang.Object dsx) |
static QDataSet |
atan2(QDataSet y,
QDataSet x)
element-wise atan2, 4-quadrant atan.
|
static QDataSet |
autoHistogram(QDataSet ds)
AutoHistogram is a one-pass self-scaling histogram, useful in autoranging data.
|
static QDataSet |
binData(QDataSet ds,
DatumRange bin)
increase the rank 1 data into rank 2 data by binning data.
|
static QDataSet |
binsWithin(QDataSet ds,
QDataSet bounds)
return non-zero where the bins of ds are within the bounds.
|
static QDataSet |
binsWithout(QDataSet ds,
QDataSet bounds)
return non-zero where the bins of ds are outside of the bounds.
|
static QDataSet |
bitwiseAnd(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
bitwiseAnd(QDataSet ds1,
QDataSet ds2)
bitwise AND operator treats the data as (32-bit) integers, and
returns the bit-wise AND.
|
static QDataSet |
bitwiseOr(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
bitwiseOr(QDataSet ds1,
QDataSet ds2)
bitwise OR operator treats the data as (32-bit) integers, and
returns the bit-wise OR.
|
static QDataSet |
bitwiseXor(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
bitwiseXor(QDataSet ds1,
QDataSet ds2)
bitwise XOR (exclusive or) operator treats the data as (32-bit) integers, and
returns the bit-wise XOR.
|
static QDataSet |
boundsDataset(java.lang.String s)
This returns one of a bounds dataset:
rank 1 bounds (a datumRange)
rank 2 bounding box
rank 2 bounding qube (three or more dimensions)
2002-03-02/2002-03-03
2002-03-02 orbit:crres:6 5 to 50rank 1 bounds (a datumRange) 2002-03-02/2002-03-03;5 to 50rank 2 bounding box 2002-03-02T01:01/2002-03-02T01:02;5 to 50 eV;90 to 180 degrank 2 bounding qube Note dataset("5 to 50") presently parses to a rank 0 nominal dataset, not a rank 1 range. |
static QDataSet |
buckshotInterpolate(QDataSet xy,
QDataSet data,
QDataSet xinterp,
QDataSet yinterp)
2-D interpolation performed by tessellating the space (with 3-point
triangles) and doing interpolation.
|
static QDataSet |
buckshotInterpolate(QDataSet xyz,
QDataSet data,
QDataSet xinterp,
QDataSet yinterp,
QDataSet zinterp)
3-D interpolation performed by tesselating the space (with 4-point
tetrahedra) and doing interpolation.
|
static QDataSet |
bundle(QDataSet ds)
bundle the dataset, making an initial bundle, adding a bundle dimension.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2)
bundle the two datasets, adding if necessary a bundle dimension.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2,
QDataSet ds3)
bundle three datasets, giving them a common zeroth index, typically time,
unlike join.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2,
QDataSet ds3,
QDataSet ds4)
bundle four datasets, making them share their zeroth index, typically time,
unlike join.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2,
QDataSet ds3,
QDataSet ds4,
QDataSet ds5)
bundle five datasets, making them share their zeroth index, typically time,
unlike join.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2,
QDataSet ds3,
QDataSet ds4,
QDataSet ds5,
QDataSet ds6)
bundle six datasets, making them share their zeroth index, typically time,
unlike join.
|
static QDataSet |
bundle(QDataSet ds1,
QDataSet ds2,
QDataSet ds3,
QDataSet ds4,
QDataSet ds5,
QDataSet ds6,
QDataSet ds7)
bundle seven datasets, making them share their zeroth index, typically time,
unlike join.
|
static QDataSet |
butterworth(QDataSet in,
int order,
Datum f,
boolean lowp)
Perform Butterworth filter for high pass or low pass.
|
static QDataSet |
butterworth(QDataSet in,
int order,
Datum flow,
Datum fhigh,
boolean pass)
Perform Butterworth filter for notch or band pass or band reject.
|
static QDataSet |
bytarr(int len0)
create a dataset filled with zeros, stored in unsigned bytes.
|
static QDataSet |
bytarr(int len0,
int len1)
create a rank 2 dataset filled with zeros, stored in unsigned bytes.
|
static QDataSet |
bytarr(int len0,
int len1,
int len2)
create a rank 3 dataset filled with zeros, stored in unsigned bytes.
|
static double |
ceil(double x) |
static QDataSet |
ceil(java.lang.Object x) |
static QDataSet |
ceil(QDataSet ds1)
element-wise ceil function.
|
static QDataSet |
chirp(QDataSet t,
Datum df0,
Datum dt1,
Datum df1)
SciPy chirp function, used for testing.
|
static QDataSet |
circle(double dradius)
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
|
static QDataSet |
circle(double radius,
double x,
double y)
return a dataset with X and Y forming a circle, introduced as a
convenient way to indicate planet location.
|
static QDataSet |
circle(QDataSet radius)
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
|
static QDataSet |
circle(QDataSet radius,
QDataSet x,
QDataSet y)
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
|
static QDataSet |
circle(java.lang.String sradius)
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
|
static QDataSet |
cleanData(QDataSet ds)
remove the data which is 3 sigmas from the mean of the data.
|
static QDataSet |
cleanData(QDataSet ds,
double nsigma,
int size)
remove the data which is N sigmas (stddev) from the mean.
|
static QDataSet |
cleanData(QDataSet ds,
int size)
remove the data which is N sigmas (stddev) from the mean.
|
static void |
clearWritable(WritableDataSet ds)
assign zeros to all the values of the dataset.
|
static QDataSet |
collapse0(QDataSet fillDs)
this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the zeroth dimension.
|
static QDataSet |
collapse0(QDataSet fillDs,
int st,
int en)
this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the zeroth dimension.
|
static QDataSet |
collapse0R4(QDataSet ds,
ProgressMonitor mon)
Collapse the rank 4 dataset on the zeroth index.
|
static QDataSet |
collapse1(QDataSet ds)
this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the first dimension
collapse1( ds[30,20] ) → ds[30]
|
static QDataSet |
collapse1R4(QDataSet ds,
ProgressMonitor mon)
Collapse the rank 4 dataset on the first index.
|
static QDataSet |
collapse2(QDataSet fillDs)
this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the first dimension
collapse2( ds[30,20,10,5] ) → ds[30,20,5]
|
static QDataSet |
collapse2R4(QDataSet ds,
ProgressMonitor mon)
Collapse the rank 4 dataset on the second index.
|
static QDataSet |
collapse3(QDataSet fillDs)
this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the first dimension
collapse3( ds[30,20,10,5] ) → ds[30,20,10]
|
static QDataSet |
collapse3R4(QDataSet ds,
ProgressMonitor mon)
Collapse the rank 4 dataset on the third index.
|
static java.awt.Color |
colorFromString(java.lang.String sval)
return the color encoded as one of:
"red" or "RED" or X11 color names like "LightPink"
#FF0000
255,0,0 or 1.0,0,0
|
static QDataSet |
complexConj(QDataSet ds)
return the complex conjugate of the rank 1 or rank 2 QDataSet.
|
static QDataSet |
complexDataset(QDataSet realPart,
QDataSet imaginaryPart)
create a complex dataset.
|
static QDataSet |
complexMultiply(QDataSet ds1,
QDataSet ds2)
perform complex multiplication, where the two datasets must have the same
rank and must both end with a complex dimension.
|
static QDataSet |
concatenate(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
concatenate(QDataSet ds1,
QDataSet ds2)
Deprecated.
use append instead.
|
static QDataSet |
contour(java.lang.Object tds,
java.lang.Object vv) |
static QDataSet |
contour(QDataSet tds,
QDataSet vv)
contour the data in rank 2 table tds at rank 0 vv.
|
static java.lang.Object |
convertPropertyValue(QDataSet context,
java.lang.String name,
java.lang.Object value)
convert the object into the type needed for the property.
|
static java.lang.String |
convertToString(QDataSet bytes)
convert the bytes (or unicode up to 2**16) to a string.
|
static DatumRange |
convertUnitsTo(DatumRange dr,
Units u)
convert the datumRange to the given units, which must be convertible.
|
static Datum |
convertUnitsTo(Datum d,
Units u)
convert the datum to the given units, which must be convertible.
|
static QDataSet |
convertUnitsTo(QDataSet ds,
Units u)
convert the dataset to the target units.
|
static WritableDataSet |
copy(QDataSet src)
copy the dataset to make a new one that is writable.
|
static void |
copyIndexedProperties(QDataSet srcds,
MutablePropertyDataSet mds)
copy over all the indexed properties into the mutable property dataset.
|
static java.util.Map<java.lang.String,java.lang.Object> |
copyProperties(QDataSet ds)
copies the properties, copying depend datasets as well.
|
static double |
copysign(double x,
double y) |
static QDataSet |
copysign(java.lang.Object x,
java.lang.Object y) |
static QDataSet |
copysign(QDataSet magnitude,
QDataSet sign)
Returns the first floating-point argument with the sign of the
second floating-point argument.
|
static double |
cos(double ds)
return the cos of the real number, which is to be in radians.
|
static QDataSet |
cos(java.lang.Object ds) |
static QDataSet |
cos(QDataSet ds)
element-wise cos.
|
static double |
cosh(double ds) |
static QDataSet |
cosh(java.lang.Object ds) |
static QDataSet |
cosh(QDataSet ds)
element-wise hyperbolic cosine
|
static QDataSet |
createEvent(DatumRange dr,
int rgbcolor,
java.lang.String annotation)
tool for creating ad-hoc events datasets.
|
static QDataSet |
createEvent(QDataSet append,
DatumRange dr,
int rgbcolor,
java.lang.String annotation)
tool for creating ad-hoc events datasets.
|
static QDataSet |
createEvent(QDataSet append,
java.lang.String timeRange,
int rgbcolor,
java.lang.String annotation)
tool for creating ad-hoc events datasets.
|
static QDataSet |
createEvent(java.lang.String timeRange,
int rgbcolor,
java.lang.String annotation)
tool for creating ad-hoc events datasets.
|
static QDataSet |
createEvents(QDataSet vds)
make canonical rank 2 bundle dataset of min,max,color,text
This was originally part of EventsRenderer, but it became
clear that this was generally useful.
|
static QDataSet |
createEvents(QDataSet vds,
java.awt.Color deftColor)
make canonical rank 2 bundle dataset of min,max,color,text
This was originally part of EventsRenderer, but it became
clear that this was generally useful.
|
static QDataSet |
createPolyMesh(QDataSet append,
QDataSet xy)
create or append to a polyMesh, adding the points from rank 2 bundle xy.
|
static QDataSet |
crossProduct(QDataSet a,
QDataSet b)
apply the cross product of a and b, where a or b may be rank 1, three-element vector,
or both can be vector arrays of the same length.
|
static double[] |
cubicRoot(double a,
double b,
double c,
double d)
Enter the coefficients for a cubic of the form:
a*x^3 + b*x^2 + c*x + d = 0.
|
static QDataSet |
cubicRoot(QDataSet coefficients)
Solves each of a set of cubic equations of the form:
a*x^3 + b*x^2 + c*x + d = 0.
|
static QDataSet |
cumulativeMax(QDataSet ds)
for each element i of ds, set the result[i] to the maximum of ds[0:(i+1)]
|
static QDataSet |
cumulativeMin(QDataSet ds)
for each element i of ds, set the result[i] to the minimum of ds[0:(i+1)]
|
static int[] |
dataIntersection(int[] itE,
int[] itB)
return the values which occur in both rank 1 datasets.
|
static QDataSet |
dataIntersection(QDataSet tE,
QDataSet tB)
return the values which occur in both rank 1 datasets.
|
static QDataSet |
dataset(java.lang.Object arg0)
coerce Java objects like arrays Lists and scalars into a QDataSet.
|
static QDataSet |
dataset(java.lang.Object arg0,
Units u)
coerce Java objects like arrays Lists and scalars into a QDataSet.
|
static Datum |
datum(java.lang.Object arg0)
coerce Java objects like numbers and strings into a Datum.
|
static DatumRange |
datumRange(java.lang.Object arg0)
coerce Java objects like arrays and strings into a DatumRange.
|
static QDataSet |
dblarr(int len0)
create a rank 1 dataset filled with zeros, stored in 8-byte doubles.
|
static QDataSet |
dblarr(int len0,
int len1)
create a rank 2 dataset filled with zeros, stored in 8-byte doubles.
|
static QDataSet |
dblarr(int len0,
int len1,
int len2)
create a rank 3 dataset filled with zeros, stored in 8-byte doubles.
|
static QDataSet |
decimate(QDataSet ds)
reduce the size of the data by keeping every 10th measurement.
|
static QDataSet |
decimate(QDataSet ds,
int m)
reduce the size of the data by keeping every nth measurement (subsample), starting
at the 0th measurement.
|
static QDataSet |
decimate(QDataSet ds,
int m,
int n)
reduce the size of the data by keeping every nth measurement (subsample).
|
static MutablePropertyDataSet |
dependsOn(QDataSet ds,
int dim,
QDataSet dep)
declare that the dataset is a dependent parameter of an independent parameter.
|
static QDataSet |
detrend(java.lang.Object yy,
int size) |
static QDataSet |
detrend(QDataSet yy,
int size)
remove D/C and low-frequency components from the data by subtracting
out the smoothed data with a boxcar of the given size.
|
static QDataSet |
detrend1(QDataSet yy,
int size)
remove D/C and low-frequency components from the data by subtracting
out the smoothed data with a boxcar of the given size, along each
record.
|
static QDataSet |
diff(java.lang.Object ds) |
static QDataSet |
diff(QDataSet ds)
return array that is the differences between each successive pair in the dataset.
|
static int |
dimensionCount(java.lang.Object dss)
returns the number of physical dimensions of the object when
interpreted as a dataset.
|
static int |
dimensionCount(QDataSet dss)
returns the number of physical dimensions of a dataset.
|
static QDataSet |
dindgen(int len0)
returns rank 1 dataset with values [0.,1.,2.,...]
|
static QDataSet |
dindgen(int len0,
int len1)
returns rank 2 dataset with values increasing [ [0.,1.,2.], [ 3.,4.,5.] ]
|
static QDataSet |
dindgen(int len0,
int len1,
int len2)
returns rank 3 dataset with values increasing
|
static QDataSet |
dindgen(int len0,
int len1,
int len2,
int len3)
returns rank 4 dataset with values increasing
|
static QDataSet |
distance(int len0,
double c0,
double r0)
return a table of distances d[len0] to the indices c0; in units of r0.
|
static QDataSet |
distance(int len0,
int len1,
double c0,
double c1,
double r0,
double r1)
return a table of distances d[len0,len1] to the indices c0,c1; in units of r0, r1.
|
static QDataSet |
div(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
div(QDataSet ds1,
QDataSet ds2)
element-wise div of two datasets with compatible geometry.
|
static QDataSet |
divide(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
divide(QDataSet ds1,
QDataSet ds2)
element-wise divide of two datasets with compatible geometry.
|
static QDataSet |
divp(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
divp(QDataSet ds1,
QDataSet ds2)
This div goes with modp, where -18 divp 10 = -2 and -18 modp 10 = 8.
|
static QDataSet |
ellipse(double xwidth,
double ywidth)
return a dataset with X and Y forming a ellipse, introduced as a convenient way to indicate
planet location of any planet, according to Masafumi.
|
static QDataSet |
ensureMonotonic(QDataSet ds)
possibly sort the data where the DEPEND_0 tags are
monotonically increasing.
|
static QDataSet |
ensureMonotonicAndIncreasingWithFill(QDataSet ds)
Return data where the DEPEND_0 tags are
monotonically increasing and non repeating.
|
static QDataSet |
eq(java.lang.Object ds1,
java.lang.Object ds2)
element-wise equality test, converting arguments as necessary to
like units.
|
static QDataSet |
eq(QDataSet ds1,
QDataSet ds2)
element-wise equality test.
|
static java.util.HashMap<java.lang.String,java.lang.Object> |
equalProperties(java.util.Map<java.lang.String,java.lang.Object> m1,
java.util.Map<java.lang.String,java.lang.Object> m2)
returns the subset of two groups of properties that are equal, so these
may be preserved through operations.
|
static boolean |
equivalent(java.lang.Object ds1,
java.lang.Object ds2) |
static boolean |
equivalent(QDataSet ds1,
QDataSet ds2)
returns true iff the dataset values are equivalent.
|
static QDataSet |
eventsComplement(QDataSet events,
DatumRange range,
int color,
java.lang.String msg)
Return an events list of time intervals which are not covered in the events list.
|
static QDataSet |
eventsConjunction(QDataSet tE,
QDataSet tB)
return an events list of when events are found in both events lists.
|
static QDataSet |
eventsDiff(QDataSet tE,
QDataSet tB)
return an events dataset describing differences between the
two events lists.
|
static double |
exp(double d)
Jython requires this be implemented
|
static QDataSet |
exp(java.lang.Object ds1)
convert array, list, double, etc to QDataSet and return exp(d)
|
static QDataSet |
exp(QDataSet ds)
element-wise exponentiate e**x.
|
static double |
exp10(double ds1) |
static QDataSet |
exp10(java.lang.Object ds1) |
static QDataSet |
exp10(QDataSet ds)
element-wise exponentiate 10**x.
|
static QDataSet |
expandToFillGaps(QDataSet ds)
Special function by the RPW Group at U.
|
static QDataSet |
expandToFillGaps(QDataSet ds,
Datum cadenceMin,
double multiplier)
Special function by the RPW Group at U.
|
static QDataSet |
expandToFillGaps(QDataSet ds,
double factor)
Special self-configuring function by the RPW Group at U.
|
static QDataSet |
expandWaveform(QDataSet ds)
special function needed by the RPW Group at U.
|
static double |
expm1(double x)
Returns ex -1.
|
static QDataSet |
expm1(java.lang.Object x)
Returns ex -1.
|
static QDataSet |
expm1(QDataSet xx)
Returns exx -1.
|
static QDataSet |
extent(QDataSet ds)
returns a two element, rank 1 dataset containing the extent of the data.
|
static QDataSet |
extent(QDataSet ds,
QDataSet range)
returns a two element, rank 1 dataset containing the extent (min to max) of the data.
|
static QDataSet |
extent(QDataSet ds,
QDataSet wds,
QDataSet range)
returns a two element, rank 1 dataset containing the extent (min to max) of the data, allowing an external
evaluation of the weightsDataSet.
|
static QDataSet |
extent445(QDataSet ds)
Deprecated.
use extentSimple
|
static QDataSet |
extentSimple(QDataSet ds,
QDataSet range)
This is introduced to study effect of
https://sourceforge.net/p/autoplot/feature-requests/445/
Do not use this in scripts!!!
This is very interesting:
Ops.extent: 53ms
simpleRange: 77ms
study445FastRange: 4ms
Ops.extent: 76ms
simpleRange: 114ms
study445FastRange: 12ms
This is likely showing that DataSetIterator is slow...
|
static QDataSet |
extentSimple(QDataSet ds,
QDataSet wds,
QDataSet range)
like extent, but does not account for DELTA_PLUS, DELTA_MINUS,
BIN_PLUS, BIN_MINUS, BIN_MIN or BIN_MAX properties.
|
static QDataSet |
fft(QDataSet ds)
Performs an FFT on the provided rank 1 dataset.
|
static QDataSet |
fft(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
perform ffts on the waveform as we do with fftPower, but keep real and
imaginary components.
|
static QDataSet |
fftFilter(QDataSet ds,
int len,
Ops.FFTFilterType filt)
Apply windows to the data to prepare for FFT.
|
static QDataSet |
fftLinearSpectralDensity(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
Perform the linear spectral density function
|
static QDataSet |
fftLinearSpectrum(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
Perform the linear spectrum function
|
static QDataSet |
fftPower(QDataSet ds)
returns the power spectrum of the waveform.
|
static QDataSet |
fftPower(QDataSet ds,
int windowLen,
int stepFraction,
java.lang.String windowName,
ProgressMonitor mon)
fftPower that matches the filter call (|fftPower(ds,len,stepFraction,windowName)).
|
static QDataSet |
fftPower(QDataSet ds,
int len,
ProgressMonitor mon)
create a power spectrum on the dataset by breaking it up and
doing FFTs on each segment.
|
static QDataSet |
fftPower(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
create a power spectrum on the dataset by breaking it up and
doing FFTs on each segment.
|
static QDataSet |
fftPower(QDataSet ds,
QDataSet window,
ProgressMonitor mon)
perform the fft with the window, using no overlap.
|
static QDataSet |
fftPowerMultiThread(QDataSet ds,
int len,
ProgressMonitor mon)
Experiment with multi-threaded FFTPower function.
|
static QDataSet |
fftPowerSpectralDensity(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
Perform the power spectral density function
|
static QDataSet |
fftPowerSpectrum(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
Perform the linear spectrum function
|
static QDataSet |
fftWindow(QDataSet ds,
int len)
perform ffts on the rank 1 dataset to make a rank2 spectrogram.
|
static boolean |
fillIsDifferent(QDataSet ds1,
QDataSet ds2)
return true of the representation of fill is different in the two data sets.
|
static QDataSet |
findex(java.lang.Object x,
java.lang.Object y) |
static QDataSet |
findex(QDataSet uu,
QDataSet vv)
returns the "floating point index" of each element of vv within the monotonically
increasing dataset uu.
|
static QDataSet |
findgen(int len0)
returns rank 1 dataset with values [0.,1.,2.,...]
|
static QDataSet |
findgen(int len0,
int len1)
returns rank 2 dataset with values increasing [ [0.,1.,2.], [ 3.,4.,5.] ]
|
static QDataSet |
findgen(int len0,
int len1,
int len2)
returns rank 3 dataset with values increasing
|
static QDataSet |
findgen(int len0,
int len1,
int len2,
int len3)
returns rank 4 dataset with values increasing
|
static QDataSet |
finite(QDataSet ds)
returns 1 where the data is not NaN, Inf, etc I needed this when I was working with
the RBSP polar scatter script.
|
static QDataSet |
flatten(QDataSet ds)
flatten a rank N dataset.
|
static QDataSet |
flattenWaveform(QDataSet ds)
flatten a rank 2 dataset where the y depend variable is just an offset from the xtag.
|
static double |
floor(double x) |
static QDataSet |
floor(java.lang.Object ds1) |
static QDataSet |
floor(QDataSet ds1)
element-wise floor function.
|
static QDataSet |
fltarr(int len0)
create a dataset filled with zeros, stored in 4-byte floats.
|
static QDataSet |
fltarr(int len0,
int len1) |
static QDataSet |
fltarr(int len0,
int len1,
int len2) |
static double |
gamma(double n)
return the gamma function for numbers greater than 0.
|
static QDataSet |
gamma(java.lang.Object n)
return the gamma function for numbers greater than 0.
|
static QDataSet |
ge(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
ge(QDataSet ds1,
QDataSet ds2)
element-wise function returns 1 where ds1>=ds2.
|
static java.lang.Object |
getProperty(QDataSet ds,
java.lang.String name)
retrieve a property from the dataset.
|
static <T> T |
getProperty(QDataSet ds,
java.lang.String propertyName,
java.lang.Class<T> clazz)
return the property, issuing a warning and returning null when the
property value is not of the correct type.
|
static int[] |
getQubeDimsForArray(java.lang.Object arg0)
return the length of each index of a n-D array.
|
static QDataSet |
greaterOf(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
greaterOf(QDataSet ds1,
QDataSet ds2)
element-wise function returns the greater of ds1 and ds2.
|
static QDataSet |
grid(QDataSet ds)
Opposite of the flatten function, takes rank 2 bundle (x,y,z) and
makes a table from it z(x,y).
|
static QDataSet |
gridIrregularY(QDataSet t,
QDataSet y,
QDataSet z,
QDataSet ytags)
This finds sweeps of Y and interpolates T->Y->Z to make a regular
spectrogram T,yTags->Z[T,yTags]
This function was once known as "LvT" because it was used to create a spectrogram
of Flux(Time,Lshell) by interpolating along sweeps.
|
static QDataSet |
gt(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
gt(QDataSet ds1,
QDataSet ds2)
element-wise function returns 1 where ds1>ds2.
|
static java.lang.String |
guessLabel(QDataSet ds)
get the label, using the NAME when LABEL is not available.
|
static java.lang.String |
guessLabel(QDataSet ds,
java.lang.String deft)
get the label, using the NAME when LABEL is not available.
|
static java.lang.String |
guessName(QDataSet ds)
guess a name for the dataset, looking for NAME and then safeName(LABEL).
|
static java.lang.String |
guessName(QDataSet ds,
java.lang.String deft)
guess a name for the dataset, looking for NAME and then safeName(LABEL).
|
static QDataSet |
hanning(QDataSet ds,
int len)
Apply Hanning (Hann) windows to the data to prepare for FFT.
|
static QDataSet |
hashcodes(QDataSet ds)
return a rank 1 hashcodes of each record the dataset, with one hashcodes value for each record.
|
static QDataSet |
hilbert(QDataSet ds)
Perform the Hilbert function on the rank 1 dataset, similar to
the hilbert function in IDL and Matlab.
|
static QDataSet |
hilbertSciPy(QDataSet ds)
Perform the Hilbert function on the rank 1 dataset, similar to
the scipy.signal.hilbert function in SciPy.
|
static QDataSet |
histogram(QDataSet ds,
Datum min,
Datum max,
Datum binsize)
returns a rank 1 dataset that is a histogram of the data.
|
static QDataSet |
histogram(QDataSet ds,
double min,
double max,
double binSize)
returns a rank 1 dataset that is a histogram of the data.
|
static QDataSet |
histogram(QDataSet ds,
int binCount)
returns a histogram of the dataset, based on the extent and scaletype of the data.
|
static QDataSet |
histogram(QDataSet ds,
java.lang.String min,
java.lang.String max,
java.lang.String binsize)
returns rank 1 dataset that is a histogram of the data.
|
static QDataSet |
histogram2d(QDataSet x,
QDataSet y,
int[] bins,
QDataSet xrange,
QDataSet yrange)
make a 2-D histogram of the data in x and y.
|
static QDataSet |
identifyContinuousBlocks(Datum cadence,
DatumRange extent,
QDataSet lastBlocks,
QDataSet times)
return events list containing start and stop times of continuous blocks in
time.
|
static QDataSet |
ifft(QDataSet ds)
Performs an inverse FFT on the provided rank 2 dataset of complex numbers.
|
static QDataSet |
ifft(QDataSet ds,
QDataSet window,
int stepFraction,
ProgressMonitor mon)
create the inverse fft of the real and imaginary spec
|
static int |
imax(java.lang.Object ds) |
static int |
imax(QDataSet ds)
return the index of the maximum value.
|
static int |
imin(java.lang.Object ds) |
static int |
imin(QDataSet ds)
return the index of the minimum value.
|
static QDataSet |
indgen(int len0)
returns rank 1 dataset with values [0,1,2,...]
This returns an immutable dataset, so that it can
be used in Jython like so: for i in indgen(200000).
|
static QDataSet |
indgen(int len0,
int len1)
returns rank 2 dataset with values increasing [ [0,1,2], [ 3,4,5] ]
|
static QDataSet |
indgen(int len0,
int len1,
int len2)
returns rank 3 dataset with values increasing
|
static QDataSet |
intarr(int len0)
create a dataset filled with zeros, stored in 4-byte ints.
|
static QDataSet |
intarr(int len0,
int len1)
create a rank 2 dataset filled with zeros, stored in 4-byte ints.
|
static QDataSet |
intarr(int len0,
int len1,
int len2)
create a rank 3 dataset filled with zeros, stored in 4-byte ints.
|
static QDataSet |
interpolate(java.lang.Object vv,
java.lang.Object findex) |
static QDataSet |
interpolate(java.lang.Object vv,
java.lang.Object findex0,
java.lang.Object findex1)
interpolate values from rank 2 dataset vv using fractional indices
in rank N findex, using bilinear interpolation.
|
static QDataSet |
interpolate(QDataSet vv,
QDataSet findex)
interpolate values from rank 1 dataset vv using fractional indices
in rank N findex.
|
static QDataSet |
interpolate(QDataSet vv,
QDataSet findex0,
QDataSet findex1)
interpolate values from rank 2 dataset vv using fractional indices
in rank N findex, using bilinear interpolation.
|
static QDataSet |
interpolate(QDataSet vv,
QDataSet findex0,
QDataSet findex1,
QDataSet findex2)
interpolate values from rank 2 dataset vv using fractional indices
in rank N findex, using bilinear interpolation.
|
static QDataSet |
interpolateGrid(java.lang.Object x,
java.lang.Object y,
java.lang.Object z) |
static QDataSet |
interpolateGrid(QDataSet vv,
QDataSet findex0,
QDataSet findex1)
interpolate values from rank 2 dataset vv using fractional indices
in rank N findex, using bilinear interpolation.
|
static QDataSet |
interpolateMod(QDataSet vv,
QDataSet mod,
QDataSet findex)
like interpolate, but the findex is recalculated when the two bracketed points are closer in the
modulo space than they would be in the linear space.
|
static QDataSet |
invalid(QDataSet ds)
returns a dataset with one where the data is invalid, and zero the data is valid.
|
static java.util.Iterator<java.lang.Integer> |
irange(double max)
mimic the Jython xrange function for use in loops.
|
static java.util.Iterator<java.lang.Integer> |
irange(double min,
double max)
mimic the Jython xrange function for use in loops.
|
static java.util.Iterator<java.lang.Integer> |
irange(double min,
double max,
int step)
mimic the Jython xrange function for use in loops.
|
static java.lang.Double |
isAngleRange(QDataSet ds,
boolean strict)
return true if the dataset can be interpreted as radian degrees from 0 to PI or from 0 to 2*PI.
|
static boolean |
isBundle(QDataSet zds)
return true if the dataset is a bundle.
|
static boolean |
isLegacyBundle(QDataSet zds)
return true if DEPEND_1 is set and its units are EnumerationUnits.
|
static boolean |
isSafeName(java.lang.String name)
returns true if the name is a Java-style identifier, starting
with one of a-z, A-Z, or _; followed by a-z, A-Z, 0-9, or _; and
note that only ASCII characters are allowed.
|
static QDataSet |
join(QDataSet ds2)
Deprecated.
use join(null,ds2) instead.
|
static QDataSet |
join(QDataSet ds1,
QDataSet ds2)
Join two rank N datasets to make a rank N+1 dataset, with the first dimension
having two elements.
|
static QDataSet |
labels(java.lang.String[] labels)
Deprecated.
use labelsDataSet
|
static QDataSet |
labels(java.lang.String[] labels,
java.lang.String context)
Deprecated.
use labelsDataset
|
static QDataSet |
labelsDataset(java.lang.String label)
create a rank 0 label dataset.
|
static QDataSet |
labelsDataset(java.lang.String[] labels)
create a labels dataset for tagging rows of a dataset.
|
static QDataSet |
labelsDataset(java.lang.String[] labels,
java.lang.String context)
create a labels dataset for tagging rows of a dataset.
|
static QDataSet |
labelsDataset(java.lang.String label,
java.lang.String context)
create a rank 0 label dataset.
|
static QDataSet |
le(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
le(QDataSet ds1,
QDataSet ds2)
element-wise function returns 1 where ds1<=ds2.
|
static QDataSet |
lesserOf(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
lesserOf(QDataSet ds1,
QDataSet ds2)
element-wise function returns the smaller of ds1 and ds2.
|
static QDataSet |
link(java.lang.Object x,
java.lang.Object y) |
static QDataSet |
link(java.lang.Object x,
java.lang.Object y,
java.lang.Object z) |
static QDataSet |
link(java.lang.Object d0,
java.lang.Object d1,
java.lang.Object d2,
java.lang.Object z) |
static QDataSet |
link(QDataSet x,
QDataSet y)
link is the fundamental operator where we declare that one
dataset is dependent on another.
|
static QDataSet |
link(QDataSet x,
QDataSet y,
QDataSet z)
link is the fundamental operator where we declare that one
dataset is dependent on another.
|
static QDataSet |
link(QDataSet d0,
QDataSet d1,
QDataSet d2,
QDataSet z)
like bundle, but declare the last dataset is dependent on the first three.
|
static QDataSet |
link(QDataSet d0,
QDataSet d1,
QDataSet d2,
QDataSet d3,
QDataSet z)
like bundle, but declare the last dataset is dependent on the first three.
|
static QDataSet |
linspace(double min,
double max,
int len0)
return a rank 1 dataset with len0 linearly-spaced values, the first
is min and the last is max.
|
static QDataSet |
linspace(java.lang.Object omin,
java.lang.Object omax,
int len0)
return a rank 1 dataset with len0 linearly-spaced values, the first
is min and the last is max.
|
static double |
log(double ds1) |
static QDataSet |
log(java.lang.Object ds1) |
static QDataSet |
log(QDataSet ds)
element-wise natural logarithm.
|
static double |
log10(double ds1) |
static QDataSet |
log10(java.lang.Object ds1) |
static QDataSet |
log10(QDataSet ds)
element-wise base 10 logarithm.
|
static QDataSet |
logspace(double min,
double max,
int len0)
return a rank 1 dataset with len0 logarithmically-spaced values, the first
is min and the last is max.
|
static QDataSet |
logspace(java.lang.Object omin,
java.lang.Object omax,
int len0)
return a rank 1 dataset with len0 logarithmically-spaced values, the first
is min and the last is max.
|
static QDataSet |
lonarr(int len0)
create a dataset filled with zeros, stored in 8-byte longs, suitable for
storing cdf_tt2000 times..
|
static QDataSet |
lonarr(int len0,
int len1)
create a rank 2 dataset filled with zeros, stored in 8-byte longs.
|
static QDataSet |
lt(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
lt(QDataSet ds1,
QDataSet ds2)
element-wise function returns 1 where ds1<ds2.
|
static QDataSet |
magnitude(java.lang.Object ds1) |
static QDataSet |
magnitude(QDataSet ds)
return the magnitudes of vectors in a rank 1 or greater dataset (typically
rank 2).
|
static java.lang.String |
matrixFormat(QDataSet mm,
java.lang.String style)
format the matrix values, using %.3f and tabs to
make it legible.
|
static QDataSet |
matrixFromEuler(java.lang.String seq,
Datum angle)
return the matrix rotating about one axis.
|
static QDataSet |
matrixMultiply(QDataSet m,
QDataSet v)
matrix multiply the components of vector
v by matrix m . |
static QDataSet |
matrixParse(java.lang.String smat)
parse the string into a rank 2 matrix
|
static WritableDataSet |
maybeCopy(QDataSet ads0)
Copy the dataset to an ArrayDataSet only if the dataset is not already an ArrayDataSet
or BufferDataSet.
|
static QDataSet |
mean(java.lang.Object o) |
static QDataSet |
mean(QDataSet ds)
Mean function that returns the average of the valid elements of a rank N dataset
|
static QDataSet |
meanAverageDeviation(QDataSet ds)
return the Mean Average Deviation (MAD) of the rank N dataset.
|
static QDataSet |
median(java.lang.Object o)
Median function that sorts a rank N dataset and returns its median.
|
static QDataSet |
median(QDataSet ds)
Median function that sorts a rank N dataset and returns its median.
|
static QDataSet |
medianFilter(QDataSet ds,
int size)
1-D median filter with a boxcar of the given size.
|
static QDataSet |
merge(QDataSet ds1,
QDataSet ds2)
Merge the two sorted rank N datasets, using their DEPEND_0 datasets, into one rank N dataset.
|
static QDataSet |
mod(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
mod(QDataSet ds1,
QDataSet ds2)
element-wise mod of two datasets with compatible geometry.
|
static QDataSet |
mode(QDataSet ds)
return the most frequently occurring element of the valid elements of a rank N dataset
|
static QDataSet |
modp(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
modp(QDataSet ds1,
QDataSet ds2)
element-wise mod of two datasets with compatible geometry.
|
static MutablePropertyDataSet |
monotonicSubset(QDataSet ds)
ensure that there are no non-monotonic or repeat records, by removing
the first N-1 records of N repeated records.
|
static QDataSet |
multiply(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
multiply(QDataSet ds1,
QDataSet ds2)
element-wise multiply of two datasets with compatible geometry.
|
static QDataSet |
ne(java.lang.Object ds1,
java.lang.Object ds2)
element-wise equality test, converting arguments as necessary to
like units.
|
static QDataSet |
ne(QDataSet ds1,
QDataSet ds2)
element-wise not equal test.
|
static QDataSet |
negate(java.lang.Object ds1) |
static QDataSet |
negate(QDataSet ds1)
return a dataset with each element negated.
|
static QDataSet |
neighborFill(QDataSet ds)
fill in the missing values by copying nearest data points.
|
static QDataSet |
normalize(QDataSet ds)
normalize the data so that the max is 1, where we normalize by the biggest
value, so that the maximum is one.
|
static QDataSet |
normalize(QDataSet ds,
int dim)
normalize the data so that the max at a row or column is 1, where we
have normalized by the biggest value along a dimension.
|
static QDataSet |
not(java.lang.Object ds1) |
static QDataSet |
not(QDataSet ds1)
element-wise logical not function.
|
static QDataSet |
ones(int len0)
return new dataset filled with ones.
|
static QDataSet |
ones(int len0,
int len1)
return a rank two dataset filled with ones.
|
static QDataSet |
ones(int len0,
int len1,
int len2)
return new dataset filled with ones.
|
static QDataSet |
ones(int len0,
int len1,
int len2,
int len3)
return new dataset filled with ones.
|
static QDataSet |
or(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
or(QDataSet ds1,
QDataSet ds2)
element-wise logical or function.
|
static QDataSet |
outerProduct(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
outerProduct(QDataSet ds1,
QDataSet ds2)
returns outerProduct of two rank 1 datasets, a rank 2 dataset with
elements R[i,j]= ds1[i] * ds2[j].
|
static QDataSet |
outerSum(java.lang.Object ds1,
java.lang.Object ds2) |
static QDataSet |
outerSum(QDataSet ds1,
QDataSet ds2)
returns outerSum of two rank 1 datasets, a rank 2 dataset with
elements R[i,j]= ds1[i] + ds2[j].
|
static QDataSet |
polarToCartesian(QDataSet ds)
converts a rank 2 bundle of polar data, where ds[:,0] are the radii and ds[:,1]
are the angles.
|
static QDataSet |
polyCenters(QDataSet polyMesh)
return an array of the centers of each triangle in the triangle mesh.
|
static double |
pow(double x,
double y)
for Jython, we define this because the doubles aren't coerced.
|
static long |
pow(long x,
long y)
for Jython, we define this because the doubles aren't coerced.
|
static QDataSet |
pow(java.lang.Object ds1,
java.lang.Object pow)
element-wise pow (** in FORTRAN, ^ in IDL) of two datasets with the same
geometry.
|
static QDataSet |
pow(QDataSet ds1,
QDataSet pow)
element-wise pow (** in FORTRAN, ^ in IDL) of two datasets with the compatible
geometry.
|
static MutablePropertyDataSet |
putBundleProperty(QDataSet ds,
java.lang.String name,
int index,
java.lang.Object value)
Like putIndexedProperty, but manages the bundle for the client.
|
static MutablePropertyDataSet |
putIndexedProperty(QDataSet ds,
java.lang.String name,
int index,
java.lang.Object value)
Like putProperty, but this inserts the value at the index.
|
static MutablePropertyDataSet |
putProperty(java.lang.Object ds,
java.lang.String name,
java.lang.Object value)
converts types often seen in Jython and Java codes to the correct type.
|
static MutablePropertyDataSet |
putProperty(QDataSet ds,
java.lang.String name,
java.lang.Object value)
converts types often seen in Jython and Java codes to the correct type.
|
static WritableDataSet |
putValues(java.lang.Object ds,
java.lang.Object indices,
java.lang.Object values)
like putProperty, but this inserts values into the dataset.
|
static WritableDataSet |
putValues(QDataSet ds,
QDataSet indices,
QDataSet value)
like putProperty, but this inserts values into the dataset.
|
static QDataSet |
rand()
Deprecated.
use randu instead
|
static QDataSet |
rand(int len0)
Deprecated.
use randu instead. This is used in many test programs and Jython codes, and will not be removed.
|
static QDataSet |
rand(int len0,
int len1)
Deprecated.
use randu instead
|
static QDataSet |
rand(int len0,
int len1,
int len2)
Deprecated.
use randu instead
|
static QDataSet |
randn()
return a rank 0 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randn(int len0)
return a rank 1 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randn(int len0,
int len1)
return a rank 2 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randn(int len0,
int len1,
int len2)
return a rank 3 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randn(int len0,
int len1,
int len2,
int len3)
return a rank 4 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randomn(long seed)
returns a rank 0 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randomn(long seed,
int len0)
returns a rank 1 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randomn(long seed,
int len0,
int len1)
returns a rank 2 dataset of random numbers of a Gaussian (normal) distribution.
|
static QDataSet |
randomn(long seed,
int len0,
int len1,
int len2)
returns a rank 3 dataset of random numbers of a gaussian (normal) distribution.
|
static QDataSet |
randomn(long seed,
int len0,
int len1,
int len2,
int len3)
returns a rank 3 dataset of random numbers of a gaussian (normal) distribution.
|
static long |
randomSeed()
restart the random sequence used by randu and randn.
|
static long |
randomSeed(long seed)
reset the random sequence used by randu and randn to the given seed.
|
static QDataSet |
randomu(long seed)
returns a rank 0 dataset of random numbers of a uniform distribution.
|
static QDataSet |
randomu(long seed,
int len0)
returns a rank 1 dataset of random numbers of a uniform distribution.
|
static QDataSet |
randomu(long seed,
int len0,
int len1)
returns a rank 2 dataset of random numbers of a uniform distribution.
|
static QDataSet |
randomu(long seed,
int len0,
int len1,
int len2)
returns a rank 3 dataset of random numbers of a uniform distribution.
|
static QDataSet |
randomu(long seed,
int len0,
int len1,
int len2,
int len3)
returns a rank 3 dataset of random numbers of a uniform distribution.
|
static QDataSet |
randu()
returns a rank 0 dataset of random uniform numbers from 0 to 1 but not including 1.
|
static QDataSet |
randu(int len0)
returns a rank 1 dataset of random uniform numbers from 0 to 1 but not including 1.
|
static QDataSet |
randu(int len0,
int len1)
returns a rank 2 dataset of random uniform numbers from 0 to 1 but not including 1.
|
static QDataSet |
randu(int len0,
int len1,
int len2)
returns a rank 3 dataset of random uniform numbers from 0 to 1 but not including 1.
|
static QDataSet |
randu(int len0,
int len1,
int len2,
int len3)
return a rank 4 dataset of random uniform numbers from 0 to 1 but not including 1.
|
static QDataSet |
rebundle(QDataSet bundle1,
int[] ii)
unbundle datasets by index from the bundle, and rebundle them in the order
specified.
|
static QDataSet |
rebundle(QDataSet bundle1,
java.lang.String[] names)
unbundle the names from the bundle, and rebundle them in the order
specified.
|
static QDataSet |
reduceBins(QDataSet dep1)
reduce each bin to its center.
|
static QDataSet |
reduceMax(QDataSet ds,
int dim)
reduce the dataset's rank by reporting the max of all the elements along a dimension.
|
static QDataSet |
reduceMax(QDataSet ds,
int dim,
ProgressMonitor mon)
reduce the dataset's rank by reporting the max of all the elements along a dimension.
|
static QDataSet |
reduceMean(QDataSet ds,
int dim)
reduce the dataset's rank by reporting the mean of all the elements along a dimension.
|
static QDataSet |
reduceMean(QDataSet ds,
int dim,
ProgressMonitor mon)
reduce the dataset's rank by reporting the mean of all the elements along a dimension.
|
static QDataSet |
reduceMedian(QDataSet ds,
int dim,
ProgressMonitor mon)
reduce the dataset's rank by reporting the median of all the elements along a dimension.
|
static QDataSet |
reduceMin(QDataSet ds,
int dim)
reduce the dataset's rank by reporting the min of all the elements along a dimension.
|
static QDataSet |
reduceMin(QDataSet ds,
int dim,
ProgressMonitor mon)
reduce the dataset's rank by reporting the min of all the elements along a dimension.
|
static QDataSet |
reduceSum(QDataSet ds,
int dim)
reduce the dataset's rank by reporting the sum of all the valid elements along a dimension.
|
static QDataSet |
reform(java.lang.Object ds,
int[] qube) |
static QDataSet |
reform(QDataSet ds)
Reshape the dataset to remove the first dimension with length 1, reducing
its rank by 1.
|
static QDataSet |
reform(QDataSet ds,
int[] qube)
change the dimensionality of the elements of the QUBE dataset.
|
static QDataSet |
reform(QDataSet ds,
int nrec,
int[] qube)
allow reform record-by-record, which comes up often.
|
static WritableDataSet |
removeFill(QDataSet ds)
remove the fill values from the rank 1 dataset, returning a smaller dataset.
|
static QDataSet |
removeIndeces(QDataSet vv,
QDataSet indices)
remove the data at the indices from the rank 1 dataset.
|
static WritableDataSet |
removeValues(java.lang.Object ds,
java.lang.Object indices) |
static WritableDataSet |
removeValues(QDataSet ds,
QDataSet indices)
put fill data for these indices
|
static WritableDataSet |
removeValuesGreaterThan(java.lang.Object ds,
java.lang.Object v) |
static WritableDataSet |
removeValuesGreaterThan(QDataSet ds,
QDataSet v)
remove values in the dataset which are greater than the value.
|
static WritableDataSet |
removeValuesLessThan(java.lang.Object ds,
java.lang.Object v) |
static WritableDataSet |
removeValuesLessThan(QDataSet ds,
QDataSet v)
remove values in the dataset which are less than the value.
|
static WritableDataSet |
replicate(double val,
int len0)
returns rank 1 dataset with value
|
static WritableDataSet |
replicate(double val,
int len0,
int len1)
returns rank 2 dataset filled with value
|
static WritableDataSet |
replicate(double val,
int len0,
int len1,
int len2)
returns rank 3 dataset with filled with value.
|
static WritableDataSet |
replicate(double val,
int len0,
int len1,
int len2,
int len3)
returns rank 4 dataset with filled with value.
|
static WritableDataSet |
replicate(float val,
int len0)
returns rank 1 dataset with value
|
static WritableDataSet |
replicate(float val,
int len0,
int len1)
returns rank 2 dataset filled with value
|
static WritableDataSet |
replicate(float val,
int len0,
int len1,
int len2)
returns rank 3 dataset with filled with value.
|
static WritableDataSet |
replicate(int val,
int len0)
returns rank 1 dataset with value
|
static WritableDataSet |
replicate(int val,
int len0,
int len1)
returns rank 2 dataset filled with value
|
static WritableDataSet |
replicate(int val,
int len0,
int len1,
int len2)
returns rank 3 dataset with filled with value.
|
static WritableDataSet |
replicate(long val,
int len0)
returns rank 1 dataset with value
|
static WritableDataSet |
replicate(long val,
int len0,
int len1)
returns rank 2 dataset filled with value
|
static WritableDataSet |
replicate(long val,
int len0,
int len1,
int len2)
returns rank 3 dataset with filled with value.
|
static MutablePropertyDataSet |
replicate(QDataSet val,
int len0)
returns a rank N+1 dataset by repeating the rank N dataset, so
all records will have the same value.
|
static MutablePropertyDataSet |
replicate(QDataSet val,
int len0,
int len1)
returns a rank N+2 dataset by repeating the rank N dataset, so
all records will have the same value.
|
static WritableDataSet |
replicate(short val,
int len0)
returns rank 1 dataset with value
|
static WritableDataSet |
replicate(short val,
int len0,
int len1)
returns rank 2 dataset filled with value
|
static WritableDataSet |
replicate(short val,
int len0,
int len1,
int len2)
returns rank 3 dataset with filled with value.
|
static QDataSet |
rescale(QDataSet data,
QDataSet min,
QDataSet max)
calculate the range of data, then rescale it so that the smallest
values becomes min and the largest values becomes max.
|
static QDataSet |
rescaleRange(QDataSet dr,
double min,
double max)
returns rank 1 QDataSet range relative to range "dr", where 0.
|
static QDataSet |
rescaleRangeLogLin(QDataSet dr,
double min,
double max)
like rescaleRange, but look at log/lin flag.
|
static QDataSet |
reverse(java.lang.Object ds) |
static QDataSet |
reverse(QDataSet ds)
returns the reverse of the rank 1 dataset.
|
static QDataSet |
rgbColorDataset(QDataSet red,
QDataSet green,
QDataSet blue)
create a dataset of RGB colors.
|
static QDataSet |
ripples(int len0)
rank 1 dataset for demos and testing.
|
static QDataSet |
ripples(int len0,
int len1)
rank 2 dataset for demos and testing.
|
static QDataSet |
ripples(int len0,
int len1,
int len2)
rank 3 dataset for demos and testing.
|
static QDataSet |
ripples(int len0,
int len1,
int len2,
int len3)
rank 4 dataset for demos and testing.
|
static QDataSet |
ripplesJoinSpectrogramTimeSeries(int len)
return fake position data for testing
result is rank 3 bundle [3,len/3,27*]
|
static QDataSet |
ripplesPitchAngleDistribution()
return an example of a QDataSet containing a pitch angle distribution.
|
static QDataSet |
ripplesSpectrogramTimeSeries(int len)
return fake position data for testing
result is rank 2 bundle [len,27]
|
static QDataSet |
ripplesTimeSeries(int len)
return fake rank 1 data timeseries for testing
|
static QDataSet |
ripplesVectorTimeSeries(int len)
return fake position data for testing.
|
static QDataSet |
ripplesWaveformTimeSeries(int len)
return fake waveform data for testing
result is rank 2 bundle [len,512]
|
static double |
round(double x)
for Jython, we handle this because the double isn't coerced.
|
static double |
round(double x,
int ndigits)
for Jython, we handle this because the double isn't coerced.
|
static QDataSet |
round(java.lang.Object x) |
static QDataSet |
round(java.lang.Object ds1,
int ndigits)
element-wise round function, which rounds to i decimal places.
|
static QDataSet |
round(QDataSet ds1)
element-wise round function.
|
static QDataSet |
round(QDataSet ds1,
int ndigits)
element-wise round function, which rounds to i decimal places.
|
static java.lang.String |
safeName(java.lang.String suggest)
made a Java-style identifier from the provided string
See Autoplot/src/scripts/safeName.jy which demonstrates this.
|
static java.lang.String |
saferName(java.lang.String suggest)
extra spaces and pipes cause problems in the Operations text field.
|
static QDataSet |
sawtooth(QDataSet t)
generates a sawtooth from the tags, where a peak occurs with a period 2*PI.
|
static QDataSet |
setDepend0Cadence(QDataSet ds,
java.lang.String arg)
set the cadence property for the DEPEND_0 data.
|
static QDataSet |
setDepend1Cadence(QDataSet ds,
java.lang.String arg)
set the cadence property for the DEPEND_1 data.
|
static QDataSet |
setNominalRange(QDataSet ds,
java.lang.String arg)
set the metadata property LIMITS_NOMINAL_MIN and LIMITS_NOMINAL_MAX, which are displayed in the series renderer
as a yellow line.
|
static QDataSet |
setValidRange(QDataSet ds,
java.lang.String arg)
assert that the valid data is within the given range like "10 to 50000", where
the range is parsed using DatumRangeUtil.parseDatumRange.
|
static QDataSet |
setWarnRange(QDataSet ds,
java.lang.String arg)
set the metadata property LIMITS_WARN_MIN and LIMITS_WARN_MAX, which are displayed in the series renderer
as a red line.
|
static QDataSet |
shortarr(int len0)
create a dataset filled with zeros, stored in 2-byte signed shorts.
|
static QDataSet |
shortarr(int len0,
int len1)
create a rank 2 dataset filled with zeros, stored in 2-byte shorts.
|
static QDataSet |
shortarr(int len0,
int len1,
int len2)
create a rank 3 dataset filled with zeros, stored in 2-byte shorts.
|
static QDataSet |
shuffle(java.lang.Object ds)
returns a rank 1 dataset of indices that shuffle the rank 1 dataset ds.
|
static QDataSet |
shuffle(QDataSet ds)
returns a rank 1 dataset of indices that shuffle the rank 1 dataset ds.
|
static double |
signum(double x) |
static QDataSet |
signum(java.lang.Object x) |
static QDataSet |
signum(QDataSet ds1)
Returns the signum function of the argument; zero if the argument is
zero, 1.0 if the argument is greater than zero, -1.0 if the argument
is less than zero.
|
static double |
sin(double ds)
return the sin of the real number, which is to be in radians.
|
static QDataSet |
sin(java.lang.Object ds) |
static QDataSet |
sin(QDataSet ds)
element-wise sin.
|
static double |
sinh(double ds) |
static QDataSet |
sinh(java.lang.Object ds) |
static QDataSet |
sinh(QDataSet ds)
element-wise sinh.
|
static int[] |
size(QDataSet ds)
returns the number of elements in each index.
|
static QDataSet |
slice0(QDataSet ds,
int idx)
returns the slice at the given slice location.
|
static QDataSet |
slice0(QDataSet ds,
QDataSet sliceds)
returns the slice at the given slice location.
|
static QDataSet |
slice1(QDataSet ds,
int idx)
returns the slice at the given slice location.
|
static QDataSet |
slice1(QDataSet ds,
QDataSet sliceds)
returns the slice at the given slice location.
|
static QDataSet |
slice2(QDataSet ds,
int idx)
returns the slice at the given slice location.
|
static QDataSet |
slice2(QDataSet ds,
QDataSet sliceds)
returns the slice at the given slice location.
|
static QDataSet |
slice3(QDataSet ds,
int idx)
returns the slice at the given slice location.
|
static QDataSet |
slice3(QDataSet ds,
QDataSet sliceds)
returns the slice at the given slice location.
|
static QDataSet |
slices(QDataSet ds,
java.lang.Object... args)
slice each dimension in one call, so that chaining isn't required to slice multiple dimensions at once.
|
static QDataSet |
smooth(java.lang.Object ds,
int size) |
static QDataSet |
smooth(QDataSet ds,
int size)
run boxcar average over the dataset, returning a dataset of same geometry.
|
static QDataSet |
smooth1(QDataSet ds,
int size)
smooth over the first dimension (not the zeroth).
|
static QDataSet |
smooth2d(QDataSet ds,
int n0,
int n1)
smooth in both the first and second dimensions.
|
static QDataSet |
smoothFit(java.lang.Object xx,
java.lang.Object yy,
int size) |
static QDataSet |
smoothFit(QDataSet xx,
QDataSet yy,
int size)
run boxcar average over the dataset, returning a dataset of same geometry.
|
static QDataSet |
sort(java.lang.Object ds) |
static QDataSet |
sort(QDataSet ds)
returns a rank 1 dataset of indices that sort the rank 1 dataset ds.
|
static QDataSet |
sortInTime(QDataSet ds)
pick out the timetags and sort the data based on these.
|
static double |
sqrt(double ds1) |
static QDataSet |
sqrt(java.lang.Object ds1) |
static QDataSet |
sqrt(QDataSet ds)
element-wise sqrt.
|
static QDataSet |
square(QDataSet t)
generates a square from the tags, where a the signal is 1 from 0-PI, 0 from PI-2*PI, etc.
|
static QDataSet |
stddev(java.lang.Object o)
standard deviation function.
|
static QDataSet |
stddev(QDataSet ds)
standard deviation function.
|
static QDataSet |
strarr(int len0)
return a QDataSet containing empty strings.
|
static QDataSet |
strarr(int len0,
int len1)
return a rank 2 QDataSet containing empty strings.
|
static QDataSet |
subset(QDataSet ds,
QDataSet w)
return the data at the indices given.
|
static QDataSet |
subtract(java.lang.Object ds1,
java.lang.Object ds2)
subtract one dataset from another, using dataset to convert the arguments.
|
static QDataSet |
subtract(QDataSet ds1,
QDataSet ds2)
subtract one dataset from another.
|
static java.util.List<QDataSet> |
synchronize(QDataSet dsTarget,
QDataSet... dsSources)
The first dataset's timetags are used to
synchronize the list of datasets to a set of common timetags.
|
static QDataSet |
synchronize(QDataSet ds1,
QDataSet ds)
The first dataset's timetags are used to
synchronize the second dataset to a set of common timetags.
|
static java.util.List<QDataSet> |
synchronizeNN(QDataSet dsTarget,
QDataSet... dsSources)
The first dataset's timetags are used to
synchronize the list of datasets to a set of common timetags, using
nearest neighbor interpolation.
|
static QDataSet |
synchronizeNN(QDataSet ds1,
QDataSet ds)
The first dataset's timetags are used to
synchronize the second dataset to a set of common timetags, using
nearest neighbor interpolation.
|
static QDataSet |
synchronizeOne(QDataSet dsTarget,
QDataSet dsSource)
The first dataset's timetags are used to
synchronize the single dataset to common timetags.
|
static MutablePropertyDataSet |
taggen(double base,
double dcadence,
int len0,
Units units)
creates tags.
|
static double |
tan(double ds)
return the trigonometric tangent of the real number in radians.
|
static QDataSet |
tan(java.lang.Object ds) |
static QDataSet |
tan(QDataSet ds)
element-wise trigonometric tangent (tan) function
|
static double |
tanh(double ds) |
static QDataSet |
tanh(java.lang.Object ds) |
static QDataSet |
tanh(QDataSet ds)
element-wise tanh.
|
static QDataSet |
timegen(java.lang.String baseTime,
java.lang.String cadence,
int len0)
returns rank 1 dataset with values that are times.
|
static QDataSet |
timeShift(QDataSet ds,
Datum delta)
Shift the DEPEND_0 or the time column of a rank 2 dataset by the amount.
|
static QDataSet |
toDegrees(java.lang.Object ds) |
static QDataSet |
toDegrees(QDataSet ds)
convert the data to degrees by multiplying each element by 180/PI.
|
static QDataSet |
toRadians(java.lang.Object ds) |
static QDataSet |
toRadians(QDataSet ds)
convert the data to radians by multiplying each element by PI/180.
|
static double |
total(java.lang.Object ds1)
return the total of all the elements in the object which can be converted
to a dataset.
|
static double |
total(QDataSet ds)
return the total of all the elements in the dataset.
|
static QDataSet |
total(QDataSet ds,
int dim)
reduce the dataset's rank by totaling all the elements along a dimension.
|
static QDataSet |
total(QDataSet ds,
int dim,
ProgressMonitor mon)
reduce the dataset's rank by totaling all the elements along a dimension.
|
static double |
total(QDataSet ds,
ProgressMonitor mon)
return the total of all the elements in the dataset.
|
static QDataSet |
toTimeDataSet(java.lang.Object years,
java.lang.Object mons,
java.lang.Object days,
java.lang.Object hour,
java.lang.Object minute,
java.lang.Object second,
java.lang.Object nano) |
static QDataSet |
toTimeDataSet(QDataSet years,
QDataSet mons,
QDataSet days,
QDataSet hour,
QDataSet minute,
QDataSet second,
QDataSet nano)
return a rank 1 dataset of times.
|
static QDataSet |
transpose(java.lang.Object ds) |
static QDataSet |
transpose(QDataSet ds)
transpose the rank 2 or rank 1 dataset.
|
static QDataSet |
triangulate(QDataSet xx,
QDataSet yy)
return a triangle tesselation of the space identified by
rank 1 xx and yy.
|
static QDataSet |
trim(int dim,
QDataSet ds,
int st,
int en)
trim the qube dataset on any of its indices, for example ds[:,:,5:10]
would use this operation.
|
static QDataSet |
trim(int dim,
QDataSet ds,
QDataSet st,
QDataSet en)
trim the qube dataset on any of its indices, for example ds[:,:,5:10]
would use this operation.
|
static QDataSet |
trim(QDataSet ds,
DatumRange dr)
return the trim of the dataset ds where its DEPEND_0 (typically xtags) are
within the range dr.
|
static QDataSet |
trim(QDataSet ds,
int st,
int en)
trim the dataset to the indices on the zeroth dimension.
|
static QDataSet |
trim(QDataSet ds,
java.lang.Object odr)
return the trim of the dataset ds where its DEPEND_0 (typically xtags) are
within the range dr.
|
static QDataSet |
trim(QDataSet ds,
QDataSet st,
QDataSet en)
return the trim of the dataset ds where its DEPEND_0 (typically xtags) are
within the range dr.
|
static QDataSet |
trim1(QDataSet ds,
int st,
int en)
trim on the first (not zeroth) dimension.
|
static QDataSet |
trim1(QDataSet ds,
QDataSet st,
QDataSet en)
return the trim of the dataset ds where its DEPEND_1 (typically ytags) are
within the range dr.
|
static QDataSet |
unbundle(QDataSet ds,
int i)
Extract a bundled dataset from a bundle of datasets.
|
static QDataSet |
unbundle(QDataSet ds,
java.lang.String name)
Extract the named bundled dataset.
|
static QDataSet |
unbundleBins(QDataSet ds,
int i)
convenient method for getting the times from an events dataset, this
unbundles the startTimes at i and the stopTimes at i+1 to a bins dataset.
|
static QDataSet |
uniq(QDataSet ds)
Return the unique indices from the rank 1 dataset.
|
static QDataSet |
uniq(QDataSet ds,
QDataSet sort)
Return the unique indices from the rank 1 dataset, using sort to resort the indices.
|
static QDataSet |
uniqValues(QDataSet ds,
QDataSet sort)
return the unique elements from the dataset.
|
static QDataSet |
unwrap(QDataSet ds,
double discont)
SciPy's unwrap function, used in demo of hilbertSciPy, which unwraps
a function that exists in a modulo space so that the differences are
minimal.
|
static QDataSet |
valid(QDataSet ds)
returns a dataset with zero where the data is invalid, and positive
non-zero where the data is valid.
|
static QDataSet |
variance(java.lang.Object o)
variance function is the square of the stddev.
|
static QDataSet |
variance(QDataSet ds)
variance function is the square of the stddev.
|
static QDataSet |
where(java.lang.Object ds) |
static QDataSet |
where(QDataSet ds)
returns a dataset containing the indices of where the dataset is non-zero.
|
static QDataSet |
whereR1(QDataSet ds)
returns a dataset containing the indices of where the dataset is non-zero.
|
static QDataSet |
whereSequence(QDataSet ds,
QDataSet seq)
return a list of indices, similar to the where result.
|
static QDataSet |
windowFunction(Ops.FFTFilterType filt,
int len)
return a dataset for the given filter type.
|
static QDataSet |
windowFunction(java.lang.String type,
int len)
return a dataset for the given filter type, added to support use in Jython.
|
static QDataSet |
within(java.lang.Object ds,
java.lang.Object bounds)
return non-zero where the data in ds are within the bounds.
|
static QDataSet |
within(QDataSet ds,
QDataSet bounds)
return non-zero where the data in ds are within the bounds.
|
static QDataSet |
withinSet(QDataSet ds,
QDataSet set)
returns 1 where the dataset contains elements within the set, 0 where elements are not within the set.
|
static QDataSet |
without(java.lang.Object ds,
java.lang.Object bounds)
return non-zero where the data in ds are outside of the bounds.
|
static QDataSet |
without(QDataSet ds,
QDataSet bounds)
return non-zero where the data in ds are outside of the bounds.
|
static QDataSet |
xtags(QDataSet ds)
return the xtags of the dataset.
|
static QDataSet |
ytags(QDataSet ds)
return the ytags of the dataset.
|
static WritableDataSet |
zeros(int len0)
return new dataset filled with zeros.
|
static WritableDataSet |
zeros(int len0,
int len1)
return new dataset filled with zeros.
|
static WritableDataSet |
zeros(int len0,
int len1,
int len2)
return new dataset filled with zeros.
|
static WritableDataSet |
zeros(int len0,
int len1,
int len2,
int len3)
return new dataset filled with zeros.
|
static WritableDataSet |
zeros(QDataSet ds)
return a new dataset filled with zeroes that has the same geometry as
the given dataset.
|
public static final double PI
Math.PI
,
Constant Field Valuespublic static final double TAU
Math.PI
,
Constant Field Valuespublic static final double E
Math.E
,
Constant Field Valuespublic static MutablePropertyDataSet applyUnaryOp(QDataSet ds1, Ops.UnaryOp op)
ds1
- the argumentop
- the operation for each element.public static MutablePropertyDataSet applyUnaryOp(java.lang.Object ds1, Ops.UnaryOp op)
ds1
- the argument which can be converted to a dataset.op
- the operation for each element.public static MutablePropertyDataSet applyBinaryOp(QDataSet ds1, QDataSet ds2, Ops.BinaryOp op)
ds1
- the first argumentds2
- the second argumentop
- binary operation for each pair of elementspublic static MutablePropertyDataSet applyBinaryOp(java.lang.Object ds1, java.lang.Object ds2, Ops.BinaryOp op)
ds1
- the first operandds2
- the second operandop
- binary operation for each pair of elementsdataset(java.lang.Object)
public static java.util.HashMap<java.lang.String,java.lang.Object> equalProperties(java.util.Map<java.lang.String,java.lang.Object> m1, java.util.Map<java.lang.String,java.lang.Object> m2)
m1
- map of dataset properties, including DEPEND properties.m2
- map of dataset properties, including DEPEND properties.public static QDataSet add(QDataSet ds1, QDataSet ds2)
The units handling is quite simple, and this will soon change. Note that the Jython operator + is overloaded to this method.ds1=timegen('2014-10-15T07:23','60s',300) ds2=dataset('30s') print add(ds1,ds2)
ds1
- a rank N datasetds2
- a rank M dataset with compatible geometryaddGen, which shows how units are resolved.
,
https://sourceforge.net/p/autoplot/bugs/2558/, which shows the issues with CDF_TT2000.
public static QDataSet add(java.lang.Object ds1, java.lang.Object ds2)
ds1
- QDataSet, array, string, scalar argumentds2
- QDataSet, array, string, scalar argument with compatible geometry.dataset(java.lang.Object)
public static QDataSet add(QDataSet ds1, QDataSet ds2, QDataSet ds3)
ds1
- a rank N datasetds2
- a rank N dataset or one with compatible geometryds3
- a rank N dataset or one with compatible geometrypublic static QDataSet subtract(QDataSet ds1, QDataSet ds2)
ds1
- a rank N datasetds2
- a rank M dataset with compatible geometrypublic static QDataSet subtract(java.lang.Object ds1, java.lang.Object ds2)
ds1
- QDataSet, array, string, scalar argumentds2
- QDataSet, array, string, scalar argument with compatible geometrypublic static QDataSet negate(QDataSet ds1)
ds1
- copysign(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
signum(org.das2.qds.QDataSet)
public static QDataSet negate(java.lang.Object ds1)
public static QDataSet magnitude(QDataSet ds)
For rank 0, this just returns the absolute value, but with the same units.ds= getDataSet('http://autoplot.org/data/autoplot.cdf?BGSM') # BGSM[Epoch=24,cart=3] m= magnitude(ds)
ds
- dataset of Rank N.abs(org.das2.qds.QDataSet)
public static QDataSet magnitude(java.lang.Object ds1)
public static double total(QDataSet ds)
ds
- total, which should be used instead.
public static double total(QDataSet ds, ProgressMonitor mon)
ds
- mon
- progress monitortotal, which should be used instead.
public static double total(java.lang.Object ds1)
ds1
- the object which can be converted to a dataset.total(org.das2.qds.QDataSet)
public static QDataSet total(QDataSet ds, int dim)
ds
- rank N qube dataset. N=1,2,3,4dim
- zero-based index number.total(ds) total, which is an earlier deprecated routine.
,
reduceSum, which skips invalid data.
public static QDataSet total(QDataSet ds, int dim, ProgressMonitor mon) throws CancelledOperationException
ds
- rank N qube dataset. N=1,2,3,4dim
- zero-based index number.mon
- progress monitor.CancelledOperationException
public static QDataSet reduceMax(QDataSet ds, int dim)
ds
- rank N qube dataset.dim
- zero-based index number.public static QDataSet reduceMax(QDataSet ds, int dim, ProgressMonitor mon)
ds
- rank N qube dataset.dim
- zero-based index number.mon
- progress monitorreduceMin(org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
,
reduceMean(org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
,
extent(org.das2.qds.QDataSet)
,
extent(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet reduceSum(QDataSet ds, int dim)
ds
- rank N qube dataset.dim
- zero-based index number.total(org.das2.qds.QDataSet, int)
public static QDataSet reduceMin(QDataSet ds, int dim)
ds
- rank N qube dataset.dim
- zero-based index number.public static QDataSet reduceMin(QDataSet ds, int dim, ProgressMonitor mon)
ds
- rank N qube dataset.dim
- zero-based index number.mon
- progress monitorpublic static QDataSet reduceMean(QDataSet ds, int dim)
ds
- rank N qube dataset.dim
- zero-based index number.public static QDataSet reduceMean(QDataSet ds, int dim, ProgressMonitor mon) throws CancelledOperationException
ds
- rank N qube dataset.dim
- zero-based index number.mon
- progress monitor.CancelledOperationException
public static QDataSet reduceMedian(QDataSet ds, int dim, ProgressMonitor mon) throws CancelledOperationException
ds
- rank N qube dataset.dim
- zero-based index number.mon
- progress monitor.CancelledOperationException
public static QDataSet reduceBins(QDataSet dep1)
dep1
- rank 2 [N,2] bins dataset, where bins are min,max boundaries.public static QDataSet binData(QDataSet ds, DatumRange bin)
byOrbit= binData( density, datumRange( 'orbit:rbspa-pp:3' ) )
ds
- rank 1 data with (time) tagsbin
- datum range which is an example rangepublic static QDataSet normalize(QDataSet ds)
ds
- public static QDataSet normalize(QDataSet ds, int dim)
ds
- the datasetdim
- the dimension to normalizereduceMax(org.das2.qds.QDataSet, int)
public static QDataSet decimate(QDataSet ds)
ds
- a qube dataset.decimate(org.das2.qds.QDataSet, int)
public static QDataSet decimate(QDataSet ds, int m)
ds
- rank 1 or more dataset.m
- the decimation factor, e.g. 2 is every other measurement.public static QDataSet decimate(QDataSet ds, int m, int n)
ds
- rank 2 or more dataset.m
- the decimation factor for the zeroth index, e.g. 2 is every other measurement.n
- the decimation factor for the first index, e.g. 2 is every other measurement.public static QDataSet collapse0(QDataSet fillDs, int st, int en)
fillDs
- st
- the start indexen
- the non-inclusive end indexpublic static QDataSet collapse0(QDataSet fillDs)
fillDs
- public static QDataSet collapse0R4(QDataSet ds, ProgressMonitor mon)
ds
- rank 4 datasetmon
- OperationsProcessor.sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)
public static QDataSet collapse1R4(QDataSet ds, ProgressMonitor mon)
ds
- rank 4 datasetmon
- OperationsProcessor.sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)
public static QDataSet collapse1(QDataSet ds)
ds
- public static QDataSet collapse2(QDataSet fillDs)
fillDs
- public static QDataSet collapse2R4(QDataSet ds, ProgressMonitor mon)
ds
- rank 4 datasetmon
- OperationsProcessor.sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)
public static QDataSet collapse3(QDataSet fillDs)
fillDs
- public static QDataSet collapse3R4(QDataSet ds, ProgressMonitor mon)
ds
- rank 4 datasetmon
- OperationsProcessor.sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)
public static QDataSet trim(QDataSet ds, int st, int en)
ds
- the dataset to be trimmed.st
- the start indexen
- the non-inclusive end indexpublic static QDataSet trim(QDataSet ds, DatumRange dr)
ds
- a rank 1 or greater datasetdr
- a range in the same units as dstrim(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet trim(QDataSet ds, java.lang.Object odr)
ds
- a rank 1 or greater datasetodr
- an object which can be interpretted as a range.trim(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet trim(QDataSet ds, QDataSet st, QDataSet en)
ds
- the dataset to be trimmed, with a rank 1 monotonic DEPEND_0.st
- rank 0 min valueen
- rank 0 max valueslice0(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet trim(int dim, QDataSet ds, int st, int en)
dim
- the index (0, 1, 2, 3, or 4) on which to trim.ds
- the dataset, which must be a qube.st
- the first index, inclusiveen
- the last index, exclusivepublic static QDataSet trim(int dim, QDataSet ds, QDataSet st, QDataSet en)
dim
- the index (0, 1, 2, 3, or 4) on which to trim.ds
- the dataset, which must be a qube.st
- rank 0 min valueen
- rank 0 max valuepublic static QDataSet trim1(QDataSet ds, QDataSet st, QDataSet en)
ds
- the dataset to be trimmed, with a rank 1 monotonic DEPEND_1.st
- rank 0 min valueen
- rank 0 max valueslice1(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet trim1(QDataSet ds, int st, int en)
ds
- the dataset, rank 2 or greaterst
- the first indexen
- the last index, exclusive.public static QDataSet setDepend0Cadence(QDataSet ds, java.lang.String arg) throws java.text.ParseException
xx= [ 0,2,4,6,8,10 ] yy= [ 1,1,2,2,3,3 ] ds= dataset(xx,yy) ds= setDepend0Cadence( ds, '2' )
ds
- the data, which has a DEPEND_0 property.arg
- the string representing the cadence.java.text.ParseException
public static QDataSet setDepend1Cadence(QDataSet ds, java.lang.String arg) throws java.text.ParseException
xx= findgen(6)*2 yy= findgen(6)*'10Hz' yy[3:]= yy[3:]+'2Hz' zz= randn(6,6) ds= dataset(xx,yy,zz) ds= setDepend1Cadence( ds, '12Hz' ) plot( ds )
ds
- the data, which has a DEPEND_1 property.arg
- the string representing the cadence.java.text.ParseException
public static QDataSet setValidRange(QDataSet ds, java.lang.String arg) throws java.text.ParseException
ds
- the dataarg
- the formatted rangejava.text.ParseException
- if the string cannot be parsed.DatumRangeUtil.parseDatumRange(java.lang.String)
public static QDataSet setNominalRange(QDataSet ds, java.lang.String arg) throws java.text.ParseException
ds
- a rank 1 dataset or rank 2 waveformarg
- the range, parsed as a datum range using the data units.java.text.ParseException
public static QDataSet setWarnRange(QDataSet ds, java.lang.String arg) throws java.text.ParseException
ds
- a rank 1 dataset or rank 2 waveformarg
- the range, parsed as a datum range using the data units.java.text.ParseException
public static QDataSet sqrt(QDataSet ds)
ds
- the datasetpow(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static double sqrt(double ds1)
public static QDataSet sqrt(java.lang.Object ds1)
public static QDataSet butterworth(QDataSet in, int order, Datum f, boolean lowp)
in
- the rank 1 waveform or rank 2 waveformorder
- the order of the filter (2,3,4)f
- the frequency, e.g. Units.hertz.createDatum(10)lowp
- true for low pass, false for high pass.public static QDataSet butterworth(QDataSet in, int order, Datum flow, Datum fhigh, boolean pass)
in
- the rank 1 waveform or rank 2 waveformorder
- the order of the filter (2,3,4)flow
- the lower band limit, e.g. Units.hertz.createDatum(10)fhigh
- the higher band limit, e.g. Units.hertz.createDatum(20)pass
- true for band pass, false for band reject.public static QDataSet cubicRoot(QDataSet coefficients)
coefficients
- Set of all coefficients.public static double[] cubicRoot(double a, double b, double c, double d) throws java.lang.ArithmeticException
a
- Coefficient of x^3.b
- Coefficient of x^2.c
- Coefficient of x.d
- Constant.java.lang.ArithmeticException
public static QDataSet abs(QDataSet ds1)
ds1
- the datasetmagnitude(ds), which preserves the sign.
public static long abs(long x)
x
- the longpublic static double abs(double v)
v
- the valyepublic static QDataSet abs(java.lang.Object ds1)
ds1
- list, double, array, etcpublic static QDataSet pow(QDataSet ds1, QDataSet pow)
ds1
- the basepow
- the exponentpublic static long pow(long x, long y)
x
- the basey
- the exponentpublic static double pow(double x, double y)
x
- the basey
- the exponentpublic static QDataSet pow(java.lang.Object ds1, java.lang.Object pow)
ds1
- the basepow
- the exponentpublic static QDataSet exp(QDataSet ds)
ds
- the datasetpublic static double exp(double d)
d
- public static QDataSet exp(java.lang.Object ds1)
ds1
- requires this be implementedpublic static QDataSet exp10(QDataSet ds)
ds
- public static double exp10(double ds1)
public static QDataSet exp10(java.lang.Object ds1)
public static QDataSet log(QDataSet ds)
ds
- public static double log(double ds1)
public static QDataSet log(java.lang.Object ds1)
public static QDataSet log10(QDataSet ds)
ds
- public static double log10(double ds1)
public static QDataSet log10(java.lang.Object ds1)
public static QDataSet multiply(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- multiplyUnits(org.das2.datum.Units, org.das2.datum.Units)
public static QDataSet multiply(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet divide(QDataSet ds1, QDataSet ds2)
ds1
- the numeratords2
- the divisorpublic static QDataSet divide(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet mod(QDataSet ds1, QDataSet ds2)
ds1
- the numeratords2
- the divisorpublic static QDataSet mod(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet modp(QDataSet ds1, QDataSet ds2)
ds1
- the numeratords2
- the divisorsawtooth(org.das2.qds.QDataSet)
public static QDataSet modp(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet divp(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet divp(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet div(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet div(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet eq(QDataSet ds1, QDataSet ds2)
ds1
- rank n datasetds2
- rank m dataset with compatible geometry.public static QDataSet eq(java.lang.Object ds1, java.lang.Object ds2)
ds1
- ds2
- public static QDataSet ne(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet ne(java.lang.Object ds1, java.lang.Object ds2)
ds1
- ds2
- public static QDataSet gt(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet gt(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet greaterOf(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet greaterOf(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet lesserOf(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet lesserOf(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet ge(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet ge(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet lt(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet lt(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet le(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet le(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet or(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- bitwiseOr(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet or(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet and(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- bitwiseAnd(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet and(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet bitwiseAnd(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet bitwiseAnd(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet bitwiseOr(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet bitwiseOr(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet bitwiseXor(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- not(org.das2.qds.QDataSet)
public static QDataSet bitwiseXor(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet not(QDataSet ds1)
ds1
- bitwiseXor(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet not(java.lang.Object ds1)
public static java.util.Iterator<java.lang.Integer> irange(double min, double max, int step)
min
- the first valuemax
- the last value, plus one (exclusive).step
- the increment between elements.public static java.util.Iterator<java.lang.Integer> irange(double min, double max)
min
- the first valuemax
- the last value, plus one (exclusive).public static java.util.Iterator<java.lang.Integer> irange(double max)
max
- the last value, plus one (exclusive).public static QDataSet indgen(int len0)
len0
- public static QDataSet indgen(int len0, int len1)
len0
- len1
- public static QDataSet indgen(int len0, int len1, int len2)
len0
- len1
- len2
- public static QDataSet dindgen(int len0)
len0
- public static QDataSet dindgen(int len0, int len1)
len0
- len1
- public static QDataSet dindgen(int len0, int len1, int len2)
len0
- len1
- len2
- public static QDataSet dindgen(int len0, int len1, int len2, int len3)
len0
- len1
- len2
- len3
- public static java.lang.String convertToString(QDataSet bytes)
bytes
- a QDataSet containing the data.public static QDataSet arange(int len0)
len0
- public static QDataSet findgen(int len0)
len0
- public static QDataSet findgen(int len0, int len1)
len0
- len1
- public static QDataSet findgen(int len0, int len1, int len2)
len0
- len1
- len2
- public static QDataSet findgen(int len0, int len1, int len2, int len3)
len0
- len1
- len2
- len3
- public static QDataSet strarr(int len0)
len0
- the number of elements.public static QDataSet strarr(int len0, int len1)
len0
- the number of elements in the first index.len1
- the number of elements in the second index.dblarr(int)
public static QDataSet fltarr(int len0)
len0
- the zeroth dimension lengthzeros(int)
,
dblarr(int)
,
strarr(int)
public static QDataSet fltarr(int len0, int len1)
public static QDataSet fltarr(int len0, int len1, int len2)
public static QDataSet bytarr(int len0)
len0
- the zeroth dimension lengthdblarr(int)
public static QDataSet bytarr(int len0, int len1)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.public static QDataSet bytarr(int len0, int len1, int len2)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.len2
- the length of the second dimension.public static QDataSet shortarr(int len0)
len0
- the zeroth dimension lengthzeros(int)
,
dblarr(int)
public static QDataSet shortarr(int len0, int len1)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.public static QDataSet shortarr(int len0, int len1, int len2)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.len2
- the length of the second dimension.public static QDataSet intarr(int len0)
len0
- the zeroth dimension lengthzeros(int)
,
dblarr(int)
public static QDataSet intarr(int len0, int len1)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.public static QDataSet intarr(int len0, int len1, int len2)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.len2
- the length of the second dimension.public static QDataSet lonarr(int len0)
len0
- the zeroth dimension lengthzeros(int)
,
dblarr(int)
public static QDataSet lonarr(int len0, int len1)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.public static QDataSet dblarr(int len0)
len0
- the length of the zeroth dimension.zeros(int)
,
fltarr(int)
,
bytarr(int)
,
shortarr(int)
,
intarr(int)
,
lonarr(int)
public static QDataSet dblarr(int len0, int len1)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.zeros(int)
,
fltarr(int)
public static QDataSet dblarr(int len0, int len1, int len2)
len0
- the length of the zeroth dimension.len1
- the length of the first dimension.len2
- the length of the second dimension.zeros(int)
,
fltarr(int)
public static QDataSet timegen(java.lang.String baseTime, java.lang.String cadence, int len0) throws java.text.ParseException
baseTime
- e.g. "2003-02-04T00:00"cadence
- e.g. "4.3 sec" "1 day"len0
- the number of elements.java.text.ParseException
public static QDataSet toTimeDataSet(QDataSet years, QDataSet mons, QDataSet days, QDataSet hour, QDataSet minute, QDataSet second, QDataSet nano)
years
- the years. (2010) Less than 100 is interpreted as 19xx.mons
- the months (1..12), or null. If null, then days are day of year. These are interpreted as integersdays
- the day of month (1..28) or day of year. This may be fractional.hour
- null or the hours of the day.minute
- null or the minutes of the daysecond
- null or the seconds of the daynano
- null or the nanoseconds (1e-9) of the dayrgbColorDataset(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet toTimeDataSet(java.lang.Object years, java.lang.Object mons, java.lang.Object days, java.lang.Object hour, java.lang.Object minute, java.lang.Object second, java.lang.Object nano)
public static MutablePropertyDataSet taggen(double base, double dcadence, int len0, Units units)
base
- dcadence
- len0
- units
- public static QDataSet linspace(double min, double max, int len0)
min
- doublemax
- doublelen0
- number of elements in the resultpublic static QDataSet linspace(java.lang.Object omin, java.lang.Object omax, int len0)
omin
- rank 0 datasetomax
- rank 0 datasetlen0
- number of elements in the resultpublic static QDataSet logspace(double min, double max, int len0)
min
- doublemax
- doublelen0
- number of elements in the resultpublic static QDataSet logspace(java.lang.Object omin, java.lang.Object omax, int len0)
omin
- rank 0 datasetomax
- rank 0 datasetlen0
- number of elements in the resultpublic static WritableDataSet replicate(short val, int len0)
val
- fill the dataset with this value.len0
- public static WritableDataSet replicate(short val, int len0, int len1)
val
- fill the dataset with this value.len0
- len1
- public static WritableDataSet replicate(short val, int len0, int len1, int len2)
val
- fill the dataset with this value.len0
- len1
- len2
- public static WritableDataSet replicate(int val, int len0)
val
- fill the dataset with this value.len0
- public static WritableDataSet replicate(int val, int len0, int len1)
val
- fill the dataset with this value.len0
- len1
- public static WritableDataSet replicate(int val, int len0, int len1, int len2)
val
- fill the dataset with this value.len0
- len1
- len2
- public static WritableDataSet replicate(long val, int len0)
val
- fill the dataset with this value.len0
- public static WritableDataSet replicate(long val, int len0, int len1)
val
- fill the dataset with this value.len0
- len1
- public static WritableDataSet replicate(long val, int len0, int len1, int len2)
val
- fill the dataset with this value.len0
- len1
- len2
- public static WritableDataSet replicate(double val, int len0)
val
- fill the dataset with this value.len0
- public static WritableDataSet replicate(double val, int len0, int len1)
val
- fill the dataset with this value.len0
- len1
- public static WritableDataSet replicate(double val, int len0, int len1, int len2)
val
- fill the dataset with this value.len0
- len1
- len2
- public static WritableDataSet replicate(double val, int len0, int len1, int len2, int len3)
val
- fill the dataset with this value.len0
- len1
- len2
- len3
- public static WritableDataSet replicate(float val, int len0)
val
- fill the dataset with this value.len0
- public static WritableDataSet replicate(float val, int len0, int len1)
val
- fill the dataset with this value.len0
- len1
- public static WritableDataSet replicate(float val, int len0, int len1, int len2)
val
- fill the dataset with this value.len0
- len1
- len2
- public static MutablePropertyDataSet replicate(QDataSet val, int len0)
val
- the rank N datasetlen0
- the number of times to repeatpublic static MutablePropertyDataSet replicate(QDataSet val, int len0, int len1)
val
- the rank N datasetlen0
- the number of times to repeatlen1
- the length of the second index.public static WritableDataSet zeros(int len0)
len0
- fltarr, which stores the data in 4-byte floats.
public static WritableDataSet zeros(int len0, int len1)
len0
- len1
- public static WritableDataSet zeros(int len0, int len1, int len2)
len0
- len1
- len2
- public static WritableDataSet zeros(int len0, int len1, int len2, int len3)
len0
- len1
- len2
- len3
- public static WritableDataSet zeros(QDataSet ds)
ds
- public static QDataSet ones(int len0)
len0
- the length of the first index.public static QDataSet ones(int len0, int len1)
len0
- the length of the first index.len1
- the length of the second index.public static QDataSet ones(int len0, int len1, int len2)
len0
- the length of the first index.len1
- the length of the second index.len2
- the length of the third index.public static QDataSet ones(int len0, int len1, int len2, int len3)
len0
- the length of the first index.len1
- the length of the second index.len2
- the length of the third index.len3
- the length of the fourth index.public static QDataSet concatenate(QDataSet ds1, QDataSet ds2)
ds1
- null or a dataset of length m.ds2
- dataset of length n to be concatenated.java.lang.IllegalArgumentException
- if the two datasets don't have the same rank.merge(ds1,ds2), which will interleave to preserve monotonic.
,
append(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet concatenate(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet rand()
public static QDataSet rand(int len0)
len0
- the number of elements in the result.public static QDataSet rand(int len0, int len1)
len0
- the number of elements in the first index.len1
- the number of elements in the second index.public static QDataSet rand(int len0, int len1, int len2)
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.public static QDataSet randu()
public static QDataSet randu(int len0)
len0
- the number of elements in the result.public static QDataSet randu(int len0, int len1)
len0
- the number of elements in the first index.len1
- the number of elements in the second index.public static QDataSet randu(int len0, int len1, int len2)
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.public static QDataSet randu(int len0, int len1, int len2, int len3)
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.public static QDataSet randn()
public static QDataSet randn(int len0)
len0
- the number of elements in the first index.public static QDataSet randn(int len0, int len1)
len0
- the number of elements in the first index.len1
- the number of elements in the second index.public static QDataSet randn(int len0, int len1, int len2)
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.public static QDataSet randn(int len0, int len1, int len2, int len3)
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.public static long randomSeed()
public static long randomSeed(long seed)
seed
- the new seed for the sequence.public static QDataSet randomn(long seed)
seed
- basis for the random number (which will not be modified).public static QDataSet randomn(long seed, int len0)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexpublic static QDataSet randomn(long seed, int len0, int len1)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexpublic static QDataSet randomn(long seed, int len0, int len1, int len2)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexpublic static QDataSet randomn(long seed, int len0, int len1, int len2, int len3)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexlen3
- number of elements in the fourth indexpublic static QDataSet randomu(long seed)
seed
- basis for the random number (which will not be modified).public static QDataSet randomu(long seed, int len0)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexpublic static QDataSet randomu(long seed, int len0, int len1)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexpublic static QDataSet randomu(long seed, int len0, int len1, int len2)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexpublic static QDataSet randomu(long seed, int len0, int len1, int len2, int len3)
seed
- basis for the random number (which will not be modified).len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexlen3
- number of elements in the fourth indexpublic static QDataSet distance(int len0, double c0, double r0)
len0
- the length of the datasetc0
- the center point 0r0
- the units to normalize in the 0 directionpublic static QDataSet distance(int len0, int len1, double c0, double c1, double r0, double r1)
len0
- the length of the datasetlen1
- the length of each row of the datasetc0
- the center point 0c1
- the center point 1r0
- the units to normalize in the 0 directionr1
- the units to normalize in the 1 directionpublic static QDataSet ripples(int len0)
len0
- number of elements in the first indexpublic static QDataSet ripples(int len0, int len1)
len0
- number of elements in the first indexlen1
- number of elements in the second indexpublic static QDataSet ripples(int len0, int len1, int len2)
len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexpublic static QDataSet ripples(int len0, int len1, int len2, int len3)
len0
- number of elements in the first indexlen1
- number of elements in the second indexlen2
- number of elements in the third indexlen3
- number of elements in the fourth indexpublic static QDataSet ripplesTimeSeries(int len)
len
- number of recordspublic static QDataSet ripplesWaveformTimeSeries(int len)
len
- number of 512-element waveforms.public static QDataSet ripplesVectorTimeSeries(int len)
len
- number of recordspublic static QDataSet ripplesSpectrogramTimeSeries(int len)
len
- the number of recordspublic static QDataSet ripplesJoinSpectrogramTimeSeries(int len)
len
- the total number of records.Schemes.irregularJoin()
public static QDataSet ripplesPitchAngleDistribution()
public static QDataSet sawtooth(QDataSet t)
t
- the independent valuesmodp(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet square(QDataSet t)
t
- the independent values.public static QDataSet appendEvents(QDataSet ev1, QDataSet ev2)
ev1
- an events dataset which is rank 2 with records of [start,stop,color,label]ev2
- an events dataset which is rank 2 with records of [start,stop,color,label]append(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
https://github.com/autoplot/dev/blob/master/demos/2023/20230909/demoCreateEvent.jy
public static QDataSet createEvent(java.lang.String timeRange, int rgbcolor, java.lang.String annotation)
timeRange
- a timerange like "2010-01-01" or "2010-01-01/2010-01-10" or "2010-01-01 through 2010-01-09"rgbcolor
- and RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue),annotation
- label for event, possibly including granny codes.#eventsComplement(org.das2.qds.QDataSet, int, java.lang.String)
public static QDataSet createEvent(QDataSet append, java.lang.String timeRange, int rgbcolor, java.lang.String annotation)
append
- null or a dataset to append the result. This events dataset must have [starttime, endtime, RBG color, string] for each record.timeRange
- a timerange like "2010-01-01" or "2010-01-01/2010-01-10" or "2010-01-01 through 2010-01-09" or "64-96"rgbcolor
- an RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue).annotation
- label for event, possibly including granny codes.public static QDataSet createEvent(DatumRange dr, int rgbcolor, java.lang.String annotation)
dr
- a datum range like "1496 to 1627"rgbcolor
- and RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue),annotation
- label for event, possibly including granny codes.#eventsComplement(org.das2.qds.QDataSet, int, java.lang.String)
public static QDataSet createEvent(QDataSet append, DatumRange dr, int rgbcolor, java.lang.String annotation)
append
- null or a dataset to append the result. This events dataset must have [starttime, endtime, RBG color, string] for each record.dr
- a datum rangergbcolor
- an RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue)annotation
- label for event, possibly including granny codes.public static QDataSet createEvents(QDataSet vds)
vds
- dataset in a number of forms that can be converted to an events dataset.public static QDataSet createEvents(QDataSet vds, java.awt.Color deftColor)
vds
- dataset in a number of forms that can be converted to an events dataset.deftColor
- the color to use as the default color.public static int[] dataIntersection(int[] itE, int[] itB)
itE
- a bunch of values.itB
- a bunch of values.eventsConjunction(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet dataIntersection(QDataSet tE, QDataSet tB)
tE
- a bunch of values.tB
- a bunch of values.eventsConjunction(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet eventsDiff(QDataSet tE, QDataSet tB)
tE
- sorted rank 2 events dataset with records of [start, stop, color, label ]tB
- sorted rank 2 events dataset with records of [start, stop, color, label ]public static QDataSet eventsConjunction(QDataSet tE, QDataSet tB)
tE
- rank 2 canonical events listtB
- rank 2 canonical events listSchemes.eventsList()
,
dataIntersection(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
eventsComplement(org.das2.qds.QDataSet, org.das2.datum.DatumRange, int, java.lang.String)
public static QDataSet eventsComplement(QDataSet events, DatumRange range, int color, java.lang.String msg)
events
- an events listrange
- find gaps in events within this rangecolor
- color for the missing eventsmsg
- message to attach to these eventscreateEvent(java.lang.String, int, java.lang.String)
,
eventsConjunction(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet circle(QDataSet radius, QDataSet x, QDataSet y)
x
- the x coordinate of the circley
- the y coordinate of the circleradius
- rank 0 datasetpublic static QDataSet circle(double radius, double x, double y)
x
- the x coordinate of the circley
- the y coordinate of the circleradius
- rank 0 datasetpublic static QDataSet circle(QDataSet radius)
radius
- rank 0 datasetpublic static QDataSet circle(double dradius)
dradius
- a real number representing the dimensionless radiuspublic static QDataSet circle(java.lang.String sradius) throws java.text.ParseException
sradius
- string parsed into rank 0 datasetjava.text.ParseException
public static QDataSet ellipse(double xwidth, double ywidth)
xwidth
- a real number representing the width of the ellipse in the X directionywidth
- a real number representing the width of the ellipse in the Y directionpublic static java.util.Map<java.lang.String,java.lang.Object> copyProperties(QDataSet ds)
ds
- the data from which the properties are extracted.DataSetUtil.getProperties(org.das2.qds.QDataSet)
public static void copyIndexedProperties(QDataSet srcds, MutablePropertyDataSet mds)
srcds
- the source datasetmds
- the destination datasetpublic static WritableDataSet copy(QDataSet src)
src
- public static WritableDataSet maybeCopy(QDataSet ads0)
ads0
- a dataset.public static QDataSet sortInTime(QDataSet ds)
ds
- a dataset with tags in DEPEND_0.public static MutablePropertyDataSet monotonicSubset(QDataSet ds)
ds
- MutablePropertyDataSet, which must be writable.public static QDataSet sin(QDataSet ds)
ds
- the angles in radians or degrees, and data without units are treated as radians.public static double sin(double ds)
ds
- the angle in radiansMath.sin(double)
public static QDataSet sin(java.lang.Object ds)
public static QDataSet asin(QDataSet ds)
ds
- the valuesMath.asin(double)
public static double asin(double ds)
ds
- the sin of the anglepublic static QDataSet asin(java.lang.Object ds)
public static QDataSet cos(QDataSet ds)
ds
- the angles in radians or degrees, and data without units are treated as radians.public static double cos(double ds)
ds
- the angle in radiansMath.cos(double)
public static QDataSet cos(java.lang.Object ds)
public static QDataSet acos(QDataSet ds)
ds
- the valuesMath.acos(double)
public static double acos(double ds)
ds
- the cos of the anglepublic static QDataSet acos(java.lang.Object ds)
public static QDataSet tan(QDataSet ds)
ds
- the angles for the values in radians or degreesMath.tan(double)
public static double tan(double ds)
ds
- the angle in radianspublic static QDataSet tan(java.lang.Object ds)
public static QDataSet atan(QDataSet ds)
ds
- the valuesMath.atan(double)
public static double atan(double ds)
ds
- the valueMath.atan(double)
public static QDataSet atan(java.lang.Object ds)
public static QDataSet atan2(QDataSet y, QDataSet x)
x
, y
) to polar coordinates
(r, theta). This method computes the phase theta
by computing an arc tangent of y/x
in the range of
-pi to pi."
Note different languages have different argument order. Microsoft Office uses atan2(x,y); IDL uses atan(y,x); Matlab uses atan2(y,x); and NumPy uses arctan2(y,x).
y
- the y valuesx
- the x valuesMath.atan2(double, double)
public static double atan2(double y, double x)
x
, y
) to polar coordinates
(r, theta). This method computes the phase theta
by computing an arc tangent of y/x
in the range of
-pi to pi."
Note different languages have different argument order. Microsoft Office uses atan2(x,y); IDL uses atan(y,x); Matlab uses atan2(y,x); and NumPy uses arctan2(y,x).
y
- the y positionx
- the x positionMath.atan2(double, double)
public static QDataSet atan2(java.lang.Object dsy, java.lang.Object dsx)
public static QDataSet cosh(QDataSet ds)
ds
- the dataMath.cosh(double)
public static double cosh(double ds)
public static QDataSet cosh(java.lang.Object ds)
public static double sinh(double ds)
public static QDataSet sinh(java.lang.Object ds)
public static double tanh(double ds)
public static QDataSet tanh(java.lang.Object ds)
public static QDataSet expm1(QDataSet xx)
expm1(x)
+ 1 is much closer to the true
result of exx than exp(x)
.xx
- the valuespublic static double expm1(double x)
expm1(x)
+ 1 is much closer to the true
result of ex than exp(x)
.x
- a doublepublic static QDataSet expm1(java.lang.Object x)
expm1(x)
+ 1 is much closer to the true
result of ex than exp(x)
.x
- an object which can be interpretted as a double or dataset.public static int[] getQubeDimsForArray(java.lang.Object arg0)
arg0
- an array, or array of arrays, or array of array of arrays, etc.public static QDataSet dataset(java.lang.Object arg0)
arg0
- null,QDataSet,Number,Datum,DatumRange,String,List,or array.java.lang.IllegalArgumentException
- if the argument cannot be parsed or converted.public static QDataSet dataset(java.lang.Object arg0, Units u)
arg0
- null,QDataSet,Number,Datum,DatumRange,String,List,or array.u
- units providing contextjava.lang.IllegalArgumentException
- if the argument cannot be parsed or converted.JythonOps#dataset(PyObject, org.das2.datum.Units)
public static Datum datum(java.lang.Object arg0)
arg0
- null,QDataSet,Number,Datum, or String.java.lang.IllegalArgumentException
- if the argument cannot be parsed or converted.public static DatumRange datumRange(java.lang.Object arg0)
arg0
- null, QDataSet, String, array or List.java.lang.IllegalArgumentException
- if the argument cannot be parsed or converted.boundsDataset(java.lang.String)
public static QDataSet toRadians(QDataSet ds)
ds
- data values in degreespublic static QDataSet toRadians(java.lang.Object ds)
public static QDataSet toDegrees(QDataSet ds)
ds
- values in radianspublic static QDataSet toDegrees(java.lang.Object ds)
public static int imax(QDataSet ds)
ds
- rank 1 datasetpublic static int imax(java.lang.Object ds)
public static int imin(QDataSet ds)
ds
- rank 1 datasetpublic static int imin(java.lang.Object ds)
public static QDataSet subset(QDataSet ds, QDataSet w)
QDataSet r= Ops.subset( ds, Ops.where( Ops.gt( ds, 1 ) ) )
will return the subset of ds where ds is greater than 1.ds
- rank N array, N > 0.w
- rank 1 dataset of length l indexing a rank 1 array, or rank 2 ds[l,N] indexing a rank N array.applyIndex, which does the same thing.
public static QDataSet whereR1(QDataSet ds)
ds
- a rank 1 QDataSetwhere(org.das2.qds.QDataSet)
public static QDataSet where(QDataSet ds)
ds
- of any rank M, M>0.putValues(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet where(java.lang.Object ds)
public static QDataSet withinSet(QDataSet ds, QDataSet set)
ds
- a datasetset
- a dataset, typically rank 1, of values.not(org.das2.qds.QDataSet)
,
within(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet within(QDataSet ds, QDataSet bounds)
print within( [0,1,2,3,4], '2 to 4' ) --> [ 0,0,1,1,0 ] print within( ttag, 'orbit:rbspa-pp:172' )
ds
- rank N dataset where N > 0bounds
- a rank 1 bounding box, or rank 2 array of bounding boxes, or rank 2 events listwithout(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
binsWithin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
withinSet(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet within(java.lang.Object ds, java.lang.Object bounds)
Note, before March 2, 2015, this would incorrectly return the where of the result.print within( [0,1,2,3,4], '2 to 4' ) --> [ 0,0,1,1,0 ] print within( ttag, 'orbit:rbspa-pp:172' )
ds
- object which can be converted to rank N dataset where N > 0bounds
- a rank 1 bounding box, DatumRange, or two-element array.without(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
where(java.lang.Object)
,
binsWithin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet binsWithin(QDataSet ds, QDataSet bounds)
ds
- rank 2 bins datasetbounds
- a rank 1 bounding box.within(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet without(QDataSet ds, QDataSet bounds)
Note if bounds contain fill, then everything is fill.print without( [0,1,2,3,4], '2 to 4' ) --> [ 1,1,0,0,1 ] print without( ttag, 'orbit:rbspa-pp:172' )
ds
- rank N dataset where N > 0bounds
- a rank 1 bounding box.within(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet without(java.lang.Object ds, java.lang.Object bounds)
Note if bounds contain fill, then everything is fill.print without( [0,1,2,3,4], '2 to 4' ) --> [ 1,1,0,0,1 ] print without( ttag, 'orbit:rbspa-pp:172' )
ds
- rank N dataset where N > 0bounds
- a rank 1 bounding box.within(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet binsWithout(QDataSet ds, QDataSet bounds)
ds
- rank 2 bins datasetbounds
- a rank 1 bounding box.binsWithin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet sort(QDataSet ds)
Note the result will have the property MONOTONIC==Boolean.TRUE if the data was sorted already.ds= randn(2000) s= sort( ds ) dsSorted= ds[s]
ds
- rank 1 datasetshuffle(org.das2.qds.QDataSet)
public static QDataSet sort(java.lang.Object ds)
public static QDataSet uniq(QDataSet ds)
ds
- rank 1 dataset, sorted, or mostly sorted.sort(java.lang.Object)
,
uniq(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
uniqValues(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet hashcodes(QDataSet ds)
ds
- dataset with rank greater than 0.public static QDataSet uniq(QDataSet ds, QDataSet sort)
ds
- rank 1 dataset, sorted, or mostly sorted.sort
- null, or the rank 1 dataset of indicesuniqValues, which returns the values.
public static QDataSet uniqValues(QDataSet ds, QDataSet sort)
ds
- rank 1 dataset, sorted, or mostly sorted.sort
- null, or the rank 1 dataset of indicesuniq, which returns the indices.
,
uniq(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static java.lang.Object getProperty(QDataSet ds, java.lang.String name)
ds
- the datasetname
- the property namepublic static MutablePropertyDataSet putProperty(java.lang.Object ds, java.lang.String name, java.lang.Object value)
ds= putProperty( [1400,2800], 'UNITS', 'seconds since 2012-01-01')will convert the string 'seconds since 2012-01-01' into a Unit before assigning it to the dataset.
ds
- the object which can be interpreted as a dataset, such as a number or array of numbers.name
- the property namevalue
- the property value, which can converted to the proper type.public static MutablePropertyDataSet putProperty(QDataSet ds, java.lang.String name, java.lang.Object value)
ds
- the dataset to which the property is to be set.name
- the property namevalue
- the property value, which can converted to the proper type.public static java.lang.Object convertPropertyValue(QDataSet context, java.lang.String name, java.lang.Object value)
context
- the dataset to which we are assigning the value.name
- the property namevalue
- the valuePyQDataSet.convertPropertyValue(org.das2.qds.QDataSet, java.lang.String, java.lang.Object)
public static MutablePropertyDataSet putIndexedProperty(QDataSet ds, java.lang.String name, int index, java.lang.Object value)
bds= putProperty( bds, 'UNITS', 0, 'seconds since 2012-01-01')
.
The dataset may be copied to make it mutable.ds
- the dataset to which the property is to be set.name
- the property nameindex
- the property indexvalue
- the property value, which can converted to the proper type.public static MutablePropertyDataSet putBundleProperty(QDataSet ds, java.lang.String name, int index, java.lang.Object value)
ds= putBundleProperty( ds, 'UNITS', 0, 'seconds since 2012-01-01')
.
The dataset may be copied to make it mutable. If the bundle descriptor dataset
is not found, it is added, making the rank 2 dataset a bundle.ds
- the rank 1 or rank 2 bundle dataset to which the property is to be set.name
- the property nameindex
- the property indexvalue
- the property value, which can converted to the proper type.public static WritableDataSet putValues(java.lang.Object ds, java.lang.Object indices, java.lang.Object values)
ds
- the rank 1 or greater datasetindices
- rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.values
- null for fill, or the rank 0 value or rank 1 values to assign.where(org.das2.qds.QDataSet)
,
removeValues(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static WritableDataSet putValues(QDataSet ds, QDataSet indices, QDataSet value)
ds
- the rank 1 or greater datasetindices
- rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.value
- null for fill, or the rank 0 value or rank 1 values to assign.where(org.das2.qds.QDataSet)
,
removeValues(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static WritableDataSet removeValues(QDataSet ds, QDataSet indices)
ds
- the rank 1 or greater datasetindices
- rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.putValues(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
where(org.das2.qds.QDataSet)
,
which copies the data to remove the indices.
public static WritableDataSet removeValues(java.lang.Object ds, java.lang.Object indices)
public static WritableDataSet removeValuesGreaterThan(QDataSet ds, QDataSet v)
ds
- rank N datasetv
- the value, a rank 0 scalar or dataset with compatible geometrypublic static WritableDataSet removeValuesGreaterThan(java.lang.Object ds, java.lang.Object v)
public static WritableDataSet removeValuesLessThan(QDataSet ds, QDataSet v)
ds
- rank N datasetv
- the value, a rank 0 scalar or dataset with compatible geometrypublic static WritableDataSet removeValuesLessThan(java.lang.Object ds, java.lang.Object v)
public static WritableDataSet removeFill(QDataSet ds)
ds
- the dataset, with VALID_MIN, VALID_MAX, or FILL_VALUE indicating the invalid data points.public static WritableDataSet applyIndex(QDataSet vv, QDataSet ds, java.lang.Number fillValue)
vv
- values to return, a rank 1, N-element dataset.ds
- the indices.fillValue
- the value to use when the index is out-of-bounds.subset, which does the same thing.
,
applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)
public static WritableDataSet applyIndex(QDataSet ds, QDataSet r)
ds
- values to return, a rank 1 N-element dataset, or rank 2 N by m element dataset.r
- the indices.subset, which does the same thing.
,
applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)
public static WritableDataSet applyIndex(java.lang.Object dso, QDataSet r)
dso
- values to return, a rank 1, N-element dataset.r
- the indices.applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)
public static MutablePropertyDataSet applyIndex(QDataSet ds, int dimension, QDataSet indices)
ds
- rank N qube of data.dimension
- the dimension on which the indices should be applied.indices
- the indices to apply.https://github.com/autoplot/dev/blob/master/demos/2023/20230909/demoApplyIndex.jy
,
SubsetDataSet
public static QDataSet removeIndeces(QDataSet vv, QDataSet indices)
ds= ripples(20)
ds= removeIndeces( ds, where( valid(ds).eq(0) ) )
print ds.length()
vv
- a rank 1 datasetindices
- the indices to remove.https://github.com/autoplot/dev/blob/master/rfe/20190208/demoRemoveIndeces.jy
,
which inserts fill.
,
where(org.das2.qds.QDataSet)
public static QDataSet reverse(QDataSet ds)
ds
- public static QDataSet reverse(java.lang.Object ds)
public static QDataSet shuffle(QDataSet ds)
s= shuffle( ds ) dsShuffled= ds[s]
ds
- rank 1 datasetsort(org.das2.qds.QDataSet)
public static QDataSet shuffle(java.lang.Object ds)
s= shuffle( ds ) dsShuffled= ds[s]
ds
- an object which can be interpretted as a rank 1 dataset.sort(org.das2.qds.QDataSet)
public static QDataSet slice0(QDataSet ds, int idx)
ds
- the rank N (N>0) or more datasetidx
- the indexQDataSet.slice(int)
public static QDataSet slice0(QDataSet ds, QDataSet sliceds)
ds
- ripples(20,20). Presently this must be a simple table.sliceds
- dataset("10.3")trim(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet slice1(QDataSet ds, int idx)
ds
- the rank N where N≥2 dataset, which is also a qube.idx
- the index to slice at.DataSetOps.slice1(org.das2.qds.QDataSet, int)
public static QDataSet slice1(QDataSet ds, QDataSet sliceds)
ds
- the rank N where N≥2 dataset, which is also a qube.sliceds
- dataset("10.3")public static QDataSet slice2(QDataSet ds, int idx)
ds
- the rank N where N≥3 dataset, which is also a qube.idx
- the index to slice at.DataSetOps.slice2(org.das2.qds.QDataSet, int)
public static QDataSet slice2(QDataSet ds, QDataSet sliceds)
ds
- ripples(20,20). Presently this must be a simple table.sliceds
- dataset("10.3")public static QDataSet slice3(QDataSet ds, int idx)
ds
- the rank N where N≥4 dataset, which is also a qube.idx
- the index to slice at.DataSetOps.slice3(org.das2.qds.QDataSet, int)
public static QDataSet slice3(QDataSet ds, QDataSet sliceds)
ds
- ripples(20,20). Presently this must be a simple table.sliceds
- dataset("10.3")public static QDataSet fftFilter(QDataSet ds, int len, Ops.FFTFilterType filt)
ds
- rank 1, 2, or 3 datalen
- size of the window.filt
- FFTFilterType.Hanning or FFTFilterType.TenPercentEdgeCosinepublic static QDataSet hanning(QDataSet ds, int len)
ds,
- rank 1, 2, or 3 datalen
- windowFunction(org.das2.qds.ops.Ops.FFTFilterType, int)
public static QDataSet fftPower(QDataSet ds, int len, ProgressMonitor mon)
ds
- rank 2 dataset ds(N,M) with M>lenlen
- the number of elements to have in each fft.mon
- a ProgressMonitor for the processpublic static QDataSet windowFunction(Ops.FFTFilterType filt, int len)
filt
- the type of the window, such as FFTFilterType.Hann or TenPercentEdgeCosine.TenPercentEdgeCosinelen
- the length of the window.Ops.FFTFilterType
public static QDataSet windowFunction(java.lang.String type, int len)
type
- the type of the window, one of Hanning, Hann, TenPercentEdgeCosine, Unity or Boxcar.len
- the length of the window.public static QDataSet fftPower(QDataSet ds, QDataSet window, ProgressMonitor mon)
ds
- rank 1,2 or 3 waveform dataset.window
- the windowmon
- a ProgressMonitor for the processfftPower(org.das2.qds.QDataSet, org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
,
windowFunction(org.das2.qds.ops.Ops.FFTFilterType, int)
public static QDataSet fftPower(QDataSet ds, int windowLen, int stepFraction, java.lang.String windowName, ProgressMonitor mon)
ds
- rank 2 dataset ds(N,M) with M>lenwindowLen
- the length of the window.stepFraction
- size, expressed as a fraction of the length (1 for no slide, 2 for half steps, 4 for quarters)windowName
- name for the window, including "Hanning" "Hann" "TenPercentEdgeCosine", "Unity", "Boxcar"mon
- a ProgressMonitor for the processfftPower(org.das2.qds.QDataSet, org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
public static <T> T getProperty(QDataSet ds, java.lang.String propertyName, java.lang.Class<T> clazz)
T
- the property valueds
- the datasetpropertyName
- the property nameclazz
- the class of the property.java.lang.IllegalArgumentException
- if the class given is not of the right type for the property.public static QDataSet fftPowerSpectralDensity(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- waveform datawindow
- the window to applystepFraction
- advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)mon
- a progress monitorpage 7
public static QDataSet fftLinearSpectralDensity(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- waveform datawindow
- the window to apply window to applystepFraction
- advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)mon
- progress monitorpage 7
public static QDataSet fftLinearSpectrum(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- waveform datawindow
- the window to apply window to applystepFraction
- advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)mon
- progress monitorpage 7
public static QDataSet fftPowerSpectrum(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- waveform datawindow
- the window to apply window to applystepFraction
- advance by this much for each window (2 means 50% overlap, 4 means 75% overlap, etc.)mon
- progress monitorpage 7
public static QDataSet fftPower(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- rank 2 dataset ds(N,M) with M>len, rank 3 with the same cadence, or rank 1.window
- window to apply to the data before performing FFT (Hann,Unity,etc.)stepFraction
- size, expressed as a fraction of the length (1 for no slide, 2 for half steps, 4 for quarters)mon
- a ProgressMonitor for the processOps.FFTFilterType
public static QDataSet fftPower(QDataSet ds)
ds
- rank 1 waveform or rank 2 array of waveformspublic static QDataSet fft(QDataSet ds)
ds
- a rank 1 dataset.Schemes.rank2ComplexNumbers()
,
ifft(org.das2.qds.QDataSet)
public static QDataSet ifft(QDataSet ds)
ds
- a rank 2 dataset.fft(org.das2.qds.QDataSet)
public static final QDataSet complexConj(QDataSet ds)
ds
- ds[2] or ds[n,2] or ds[n,m,2]complexMultiply(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static final QDataSet complexMultiply(QDataSet ds1, QDataSet ds2)
ds1
- ds[2] or ds[n,2] or ds[n,m,2]ds2
- ds[2] or ds[n,2] or ds[n,m,2]complexConj(org.das2.qds.QDataSet)
public static QDataSet crossProduct(QDataSet a, QDataSet b)
a
- rank 1 ds[3] or rank 2 ds[n,3] or rank 3 ds[m,n,3]b
- rank 1 ds[3] or rank 2 ds[n,3] or rank 3 ds[m,n,3]public static QDataSet complexDataset(QDataSet realPart, QDataSet imaginaryPart)
realPart
- the real component.imaginaryPart
- the complex component.Schemes.rank2ComplexNumbers()
public static QDataSet expandWaveform(QDataSet ds)
ds
- rank 2 waveformSchemes.rank2Waveform()
,
expandToFillGaps(org.das2.qds.QDataSet)
public static QDataSet expandToFillGaps(QDataSet ds)
ds
- the datasetexpandWaveform(org.das2.qds.QDataSet)
public static QDataSet expandToFillGaps(QDataSet ds, Datum cadenceMin, double multiplier)
ds
- the data, presumably containing burst of continuous packets between long gaps.cadenceMin
- sets threshold to identify continuous bursts of packets.multiplier
- the scale to by which to expand the packet into the gap.expandToFillGaps(org.das2.qds.QDataSet, double)
public static QDataSet expandToFillGaps(QDataSet ds, double factor)
ds
- the data, presumably containing burst of continuous packets between long gaps.factor
- duty cycle factor (0.5=50% duty cycle)expandWaveform(org.das2.qds.QDataSet)
,
expandToFillGaps(org.das2.qds.QDataSet, org.das2.datum.Datum, double)
public static QDataSet identifyContinuousBlocks(Datum cadence, DatumRange extent, QDataSet lastBlocks, QDataSet times)
cadence
- null or the cadenceextent
- null or the interval containing the times.lastBlocks
- null or the preceding interval times.times
- the times for the intervaljava.lang.IllegalArgumentException
- if the cadence cannot be guessed and cadence is not specified.public static QDataSet chirp(QDataSet t, Datum df0, Datum dt1, Datum df1)
t
- Times at which to evaluate the waveform.df0
- Frequency (e.g. Hz) at time t=0.dt1
- Time at which `f1` is specified.df1
- Frequency (e.g. Hz) of the waveform at time `t1`.public static QDataSet hilbertSciPy(QDataSet ds)
ds
- rank 1 dataset of length n.hilbert(org.das2.qds.QDataSet)
public static QDataSet hilbert(QDataSet ds)
ds
- rank 1 dataset of length n.hilbert(org.das2.qds.QDataSet)
public static QDataSet unwrap(QDataSet ds, double discont)
ds
- rank 1 dataset, containing values from 0 to discontdiscont
- the discont, such as PI, TAU, 24, 60, 360, etc.public static java.lang.Double isAngleRange(QDataSet ds, boolean strict)
ds
- any QDataSet.strict
- return null if it's not clear that the units are degrees.public static QDataSet polarToCartesian(QDataSet ds)
ds
- public static QDataSet ifft(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- rank 3 dataset of N,FFTLength,2window
- stepFraction
- mon
- public static QDataSet fft(QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon)
ds
- the waveform rank 1,2,or 3 dataset.window
- the window function, like ones(1024) or windowFunction( FFTFilterType.Hanning, 1024 ). This is used to infer window size.stepFraction
- step this fraction of the window size. 1 is no overlap, 2 is 50% overlap, 4 is 75% overlap, etc.mon
- progress monitor.public static QDataSet fftWindow(QDataSet ds, int len)
ds
- rank 1 datasetlen
- the window lengthpublic static QDataSet extent(QDataSet ds)
ds
- the dataset to measure the extentDataSetUtil.rangeOfMonotonic(org.das2.qds.QDataSet)
,
in Autoplot.
,
reduceMax(org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
public static QDataSet extent(QDataSet ds, QDataSet range)
ds
- the dataset to measure the extentrange
- if non-null, return the union of this range and the extent. This must not contain fill!public static QDataSet extentSimple(QDataSet ds, QDataSet wds, QDataSet range)
ds
- the dataset to measure the extent rank 1 or rank 2 binswds
- a weights dataset, containing zero where the data is not valid, positive non-zero otherwise. If null, then all finite data is treated as valid.range
- if non-null, return the union of this range and the extent. This must not contain fill!extent(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet extent(QDataSet ds, QDataSet wds, QDataSet range)
ds
- the dataset to measure the extent rank 1 or rank 2 binswds
- a weights dataset, containing zero where the data is not valid, positive non-zero otherwise. If null, then all finite data is treated as valid.range
- if non-null, return the union of this range and the extent. This must not contain fill!reduceMax(org.das2.qds.QDataSet, int, org.das2.util.monitor.ProgressMonitor)
public static QDataSet extent445(QDataSet ds)
ds
- a dataset.extentSimple(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet extentSimple(QDataSet ds, QDataSet range)
ds
- the datasetrange
- null, or rank 1 bins datasetextentSimple(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet rescale(QDataSet data, QDataSet min, QDataSet max)
data
- rank N datasetmin
- rank 0 minmax
- rank 0 maxpublic static QDataSet rescaleRange(QDataSet dr, double min, double max)
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.public static QDataSet rescaleRangeLogLin(QDataSet dr, double min, double max)
dr
- min
- max
- QDataSet.SCALE_TYPE
public static QDataSet histogram2d(QDataSet x, QDataSet y, int[] bins, QDataSet xrange, QDataSet yrange)
The result will be a rank 2 dataset with DEPEND_0 and DEPEND_1 indicating the bin locations. If the xrange or yrange is dimensionless, then use the units of x or y.x= randn(10000)+1 y= randn(10000)+4 zz= histogram2d( x,y, [30,30], dataset([0,8]), dataset([-2,6]) ) plot( zz )
x
- the x valuesy
- the y valuesbins
- number of bins in x and yxrange
- a rank 1 2-element bounds dataset, so that Units can be specified.yrange
- a rank 1 2-element bounds dataset, so that Units can be specified.histogram(org.das2.qds.QDataSet, double, double, double)
,
Reduction.histogram2D(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet histogram(QDataSet ds, double min, double max, double binSize)
ds
- rank N datasetmin
- the min of the first bin. If min=-1 and max=-1, then automatically set the min and max.max
- the max of the last bin.binSize
- the size of each bin.public static QDataSet histogram(QDataSet ds, Datum min, Datum max, Datum binsize)
ds
- rank N datasetmin
- the center of the first bin. If min=-1 and max=-1, then automatically set the min and max.max
- the center of the last bin.binsize
- the size of each bin.public static QDataSet histogram(QDataSet ds, java.lang.String min, java.lang.String max, java.lang.String binsize) throws java.text.ParseException
ds
- rank N datasetmin
- the center of the first bin. If min=-1 and max=-1, then automatically set the min and max.max
- the center of the last bin.binsize
- the size of each bin.java.text.ParseException
public static QDataSet histogram(QDataSet ds, int binCount)
ds
- binCount
- number of binspublic static QDataSet autoHistogram(QDataSet ds)
ds
- rank N dataset (all ranks are supported).public static QDataSet outerProduct(QDataSet ds1, QDataSet ds2)
ds1
- rank 1 dataset length m.ds2
- rank 1 dataset of length n.public static QDataSet outerProduct(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet outerSum(QDataSet ds1, QDataSet ds2)
ds1
- a rank 1 dataset of length mds2
- a rank 1 dataset of length npublic static QDataSet outerSum(java.lang.Object ds1, java.lang.Object ds2)
public static QDataSet floor(QDataSet ds1)
ds1
- public static double floor(double x)
public static QDataSet floor(java.lang.Object ds1)
public static QDataSet ceil(QDataSet ds1)
ds1
- public static double ceil(double x)
public static QDataSet ceil(java.lang.Object x)
public static QDataSet round(QDataSet ds1)
ds1
- public static double round(double x)
x
- public static QDataSet round(java.lang.Object x)
public static QDataSet round(QDataSet ds1, int ndigits)
ds1
- the dataset.ndigits
- round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)public static double round(double x, int ndigits)
x
- the doublendigits
- round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)public static QDataSet round(java.lang.Object ds1, int ndigits)
ds1
- the dataset.ndigits
- round to this number of digits after the decimal point (e.g. 1=0.1 2=0.01 -1=10)public static QDataSet signum(QDataSet ds1)
ds1
- copysign(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
negate(org.das2.qds.QDataSet)
public static double signum(double x)
public static QDataSet signum(java.lang.Object x)
public static QDataSet copysign(QDataSet magnitude, QDataSet sign)
magnitude
- sign
- signum(org.das2.qds.QDataSet)
,
negate(org.das2.qds.QDataSet)
public static double copysign(double x, double y)
public static QDataSet copysign(java.lang.Object x, java.lang.Object y)
public static QDataSet whereSequence(QDataSet ds, QDataSet seq)
ds
- rank 1 dataset of length Nseq
- rank 1 dataset, with length much less than N.https://github.com/autoplot/dev/blob/master/demos/2021/20210115/whereSequence.jy
public static QDataSet findex(QDataSet uu, QDataSet vv)
uu
- rank 1 monotonically increasing dataset, non-repeating, containing no fill values.vv
- rank N dataset with values in the same physical dimension as uu. Fill is allowed.public static QDataSet findex(java.lang.Object x, java.lang.Object y)
public static QDataSet interpolate(QDataSet vv, QDataSet findex)
xx= [1,2,3,4]
yy= [2,4,5,4]
xxx= linspace(0,5,100)
yyy= interpolate( yy, findex(xx,xxx) )
plot( xx, yy, symbolSize=20 )
plot( addPlotElement(0), xxx, yyy )
This looks at the AVERAGE_TYPE metadata, and when it is present, linear, geometric, none, mod360, mod24, modpi, and modtau are respected.vv
- rank 1 dataset having length L that is the data to be interpolated.findex
- rank N dataset of fractional indices. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.interpolateMod, for data like longitude where 259 deg is 2 degrees away from 1 deg
public static QDataSet interpolate(java.lang.Object vv, java.lang.Object findex)
vv
- object that can be converted to rank 1 dataset, such as array. These are the rank 1 dataset that is the data to be interpolated.findex
- object that can be converted to a rank N dataset, such as an array. These are the rank N dataset of fractional indices.public static QDataSet interpolate(QDataSet vv, QDataSet findex0, QDataSet findex1)
vv
- rank 2 dataset.findex0
- rank N dataset of fractional indices for the zeroth index. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.findex1
- rank N dataset of fractional indices for the first index. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.findex, the 1-D findex command
,
interpolateGrid(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet interpolate(java.lang.Object vv, java.lang.Object findex0, java.lang.Object findex1)
vv
- object convertible to rank 2 dataset.findex0
- object convertible to rank N dataset of fractional indices for the zeroth index.findex1
- object convertible to rank N dataset of fractional indices for the first index.findex, the 1-D findex command
public static QDataSet interpolate(QDataSet vv, QDataSet findex0, QDataSet findex1, QDataSet findex2)
vv
- rank 2 dataset.findex0
- rank N dataset of fractional indices for the zeroth index. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.findex1
- rank N dataset of fractional indices for the first index. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.findex2
- rank N dataset of fractional indices for the second index. This must be dimensionless, between -0.5 and L-0.5 and is typically calculated by the findex command.findex, the 1-D findex command
,
interpolateGrid(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet interpolateMod(QDataSet vv, QDataSet mod, QDataSet findex)
vv
- rank 1 dataset that is the data to be interpolated. (e.g. longitude from 0 to 360deg)mod
- rank 0 dataset that is the mod of the space (e.g. 360deg), or rank 1 where the range is specified (e.g. -180 to 180).findex
- rank N dataset of fractional indices. This must be dimensionless and is typically calculated by the findex command.interpolate(QDataSet,QDataSet)
public static QDataSet interpolateGrid(QDataSet vv, QDataSet findex0, QDataSet findex1)
vv
- rank 2 dataset.findex0
- rank 1 dataset of fractional indices for the zeroth index.findex1
- rank 1 dataset of fractional indices for the first index.findex, the 1-D findex command
public static QDataSet interpolateGrid(java.lang.Object x, java.lang.Object y, java.lang.Object z)
public static QDataSet valid(QDataSet ds)
r= where( valid( ds ) )
ds
- a rank N dataset that might have FILL_VALUE, VALID_MIN or VALID_MAX
set.invalid(org.das2.qds.QDataSet)
public static QDataSet invalid(QDataSet ds)
The purpose of this is to make this commonly used logic easier to find.r= where( invalid( ds ) )
ds
- a rank N datasetvalid(org.das2.qds.QDataSet)
public static void clearWritable(WritableDataSet ds)
ds
- public static QDataSet finite(QDataSet ds)
ds
- qdataset of any rank.public static QDataSet smooth1(QDataSet ds, int size)
ds
- rank 2 dataset.size
- the boxcar sizedetrend1(org.das2.qds.QDataSet, int)
public static QDataSet smooth2d(QDataSet ds, int n0, int n1)
ds
- rank 2 datan0
- the boxcar size in the first dimensionn1
- the boxcar size in the second dimensionsmooth(org.das2.qds.QDataSet, int)
,
smooth1(org.das2.qds.QDataSet, int)
public static QDataSet smooth(QDataSet ds, int size)
ds
- a rank 1 or rank 2 dataset of length Nsize
- the number of adjacent bins to averagesmooth2d(org.das2.qds.QDataSet, int, int)
public static QDataSet smooth(java.lang.Object ds, int size)
public static QDataSet smoothFit(QDataSet xx, QDataSet yy, int size)
xx
- a rank 1 dataset of size Nyy
- a rank 1 dataset of size Nsize
- the number of adjacent bins to average. If size is greater than yy.length, size is reset to yy.length.public static QDataSet smoothFit(java.lang.Object xx, java.lang.Object yy, int size)
public static QDataSet detrend(QDataSet yy, int size)
yy
- rank 1 datasetsize
- size of the boxcarpublic static QDataSet detrend(java.lang.Object yy, int size)
public static QDataSet detrend1(QDataSet yy, int size)
yy
- rank 2 datasetsize
- size of the boxcarsmooth1(org.das2.qds.QDataSet, int)
public static QDataSet cleanData(QDataSet ds)
ds
- rank 1 dataset.public static QDataSet cleanData(QDataSet ds, int size)
ds
- rank 1 dataset.size
- size for a boxcar, or -1 for the whole dataset.public static QDataSet cleanData(QDataSet ds, double nsigma, int size)
ds
- rank 1 dataset.nsigma
- remove data more than this many stddevs from mean.size
- size for a boxcar, or -1 for the whole dataset.public static QDataSet mean(QDataSet ds)
ds
- rank N datasetmode(org.das2.qds.QDataSet)
,
median(java.lang.Object)
,
variance(org.das2.qds.QDataSet)
,
meanAverageDeviation(org.das2.qds.QDataSet)
public static QDataSet mean(java.lang.Object o)
public static QDataSet mode(QDataSet ds)
ds
- rank N dataset.mean(org.das2.qds.QDataSet)
,
median(java.lang.Object)
public static QDataSet median(java.lang.Object o)
o
- object which can be interpreted as a dataset.mean(org.das2.qds.QDataSet)
,
mode(org.das2.qds.QDataSet)
public static QDataSet median(QDataSet ds)
ds
- rank N dataset.mean(org.das2.qds.QDataSet)
,
mode(org.das2.qds.QDataSet)
public static QDataSet stddev(java.lang.Object o)
o
- an object which can be interpreted as a rank N dataset.public static QDataSet stddev(QDataSet ds)
ds
- rank N dataset.public static QDataSet variance(java.lang.Object o)
o
- object which can be interpreted as rank 1 dataset.stddev(java.lang.Object)
public static QDataSet variance(QDataSet ds)
ds
- rank 1 dataset.stddev(java.lang.Object)
public static QDataSet meanAverageDeviation(QDataSet ds)
ds
- the rank N dataset.mean(org.das2.qds.QDataSet)
,
BinAverage.binMeanAverageDeviation(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet neighborFill(QDataSet ds)
ds
- public static QDataSet medianFilter(QDataSet ds, int size)
ds
- rank 1 or rank 2 dataset. Future implementations may support higher rank data.size
- the boxcar sizesmooth(org.das2.qds.QDataSet, int)
public static QDataSet contour(QDataSet tds, QDataSet vv)
tds
- rank 2 tablevv
- rank 2 bundlepublic static QDataSet contour(java.lang.Object tds, java.lang.Object vv)
public static QDataSet diff(QDataSet ds)
ds
- a rank 1 dataset with N elements.accum(org.das2.qds.QDataSet)
public static QDataSet diff(java.lang.Object ds)
public static QDataSet accum(QDataSet accumDs, QDataSet ds)
accumDs
- the initial value of the running sum. Last value of Rank 0 or Rank 1 dataset is used, or may be null.ds
- each element is added to the running sumdiff(org.das2.qds.QDataSet)
public static QDataSet accum(java.lang.Object accumDs, java.lang.Object ds)
public static QDataSet accum(QDataSet ds)
ds
- each element is added to the running sumdiff(org.das2.qds.QDataSet)
public static QDataSet accum(java.lang.Object ds)
public static QDataSet cumulativeMax(QDataSet ds)
ds
- rank 1 datasetpublic static QDataSet cumulativeMin(QDataSet ds)
ds
- rank 1 datasetpublic static QDataSet append(QDataSet ds1, QDataSet ds2)
If both datasets are ArrayDataSets and of the same component type, then the result will have this type as well. Otherwise DDataSet is returned.ds1= findgen(10) ds2= findgen(12) print append(ds1,ds2) ; dataSet[22] (dimensionless)
ds1
- null or rank N datasetds2
- rank N dataset with compatible geometry.which is the same thing.
public static QDataSet timeShift(QDataSet ds, Datum delta)
ds
- the data which is a time series.delta
- the amount to add to each timetag.Schemes.isTimeSeries(org.das2.qds.QDataSet)
public static QDataSet synchronizeOne(QDataSet dsTarget, QDataSet dsSource)
dsTarget
- the dataset providing timetags, or the timetags themselves.dsSource
- the dataset to synch up. Its timetags must be monotonically increasing and non-repeating.synchronize(org.das2.qds.QDataSet, org.das2.qds.QDataSet...)
public static QDataSet synchronize(QDataSet ds1, QDataSet ds)
ds1
- the dataset providing timetags, or the timetags themselves.ds
- the single datasets to synch up.synchronizeNN(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
synchronize(org.das2.qds.QDataSet, org.das2.qds.QDataSet...)
,
flattenWaveform(org.das2.qds.QDataSet)
public static java.util.List<QDataSet> synchronize(QDataSet dsTarget, QDataSet... dsSources)
dsTarget
- the dataset providing timetags, or the timetags themselves.dsSources
- the N datasets to synch up, where each should have monotonic timetags.synchronizeNN(org.das2.qds.QDataSet, org.das2.qds.QDataSet...)
,
synchronize(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
flattenWaveform(org.das2.qds.QDataSet)
public static QDataSet synchronizeNN(QDataSet ds1, QDataSet ds)
ds1
- the dataset providing timetags, or the timetags themselves.ds
- the single datasets to synch up.synchronize(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
synchronizeNN(org.das2.qds.QDataSet, org.das2.qds.QDataSet...)
,
flattenWaveform(org.das2.qds.QDataSet)
public static java.util.List<QDataSet> synchronizeNN(QDataSet dsTarget, QDataSet... dsSources)
dsTarget
- the dataset providing timetags, or the timetags themselves.dsSources
- the N datasets, each either rank 1 or rank 2, all should have DEPEND_0 which is monotonic.synchronize(org.das2.qds.QDataSet, org.das2.qds.QDataSet...)
,
synchronizeNN(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
flattenWaveform(org.das2.qds.QDataSet)
public static QDataSet convertUnitsTo(QDataSet ds, Units u)
y= ytags(spectrogramds)
y= convertUnitsTo( y, Units.Hz )
spectrogramDs= link( xtags( spectrogramDs ), y, spectrogramDs )
ds
- the original dataset.u
- units of the new datasetpublic static DatumRange convertUnitsTo(DatumRange dr, Units u)
y= ytags(spectrogramds)
y= convertUnitsTo( y, Units.Hz )
spectrogramDs= link( xtags( spectrogramDs ), y, spectrogramDs )
dr
- the datum range, e.g. '5 to 50 MHz'u
- the new units. e.g. 'Hz'InconvertibleUnitsException
public static Datum convertUnitsTo(Datum d, Units u)
d
- the datum, e.g. '5 MHz'u
- the new units, e.g. 'Hz'InconvertibleUnitsException
public static QDataSet flatten(QDataSet ds)
ds
- the rank N datasetDataSetOps.flattenRank2(org.das2.qds.QDataSet)
,
grid(org.das2.qds.QDataSet)
,
flattenWaveform(org.das2.qds.QDataSet)
public static QDataSet flattenWaveform(QDataSet ds)
ds
- rank 2 waveform with tags for DEPEND_0 and offsets for DEPEND_1flatten(org.das2.qds.QDataSet)
,
DataSetOps.flattenWaveform(org.das2.qds.QDataSet)
,
synchronizeNN(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet grid(QDataSet ds)
ds
- rank 2 bundle of X,Y, and Z data.flatten(org.das2.qds.QDataSet)
public static QDataSet gridIrregularY(QDataSet t, QDataSet y, QDataSet z, QDataSet ytags)
t
- the rank 1 x values (often time)y
- the rank 1 y values (for example, L)z
- the rank 1 z values at each y.ytags
- the rank 1 y tags for the result.public static QDataSet labels(java.lang.String[] labels, java.lang.String context)
labels
- array of string labelscontext
- the namespace for the labels, to provide control over String→int mapping.labelsDataset(java.lang.String[])
public static QDataSet labels(java.lang.String[] labels)
labels
- array of string labelslabelsDataset(java.lang.String[])
public static QDataSet labelsDataset(java.lang.String[] labels, java.lang.String context)
labels
- array of string labelscontext
- the namespace for the labels, to provide control over String→int mapping.public static QDataSet labelsDataset(java.lang.String[] labels)
labels
- public static QDataSet labelsDataset(java.lang.String label)
label
- the string labelpublic static QDataSet labelsDataset(java.lang.String label, java.lang.String context)
label
- the string labelcontext
- the namespace for the labels, to provide control over String→int mapping.public static QDataSet rgbColorDataset(QDataSet red, QDataSet green, QDataSet blue)
red
- the red component, from 0 to 255green
- the green component, from 0 to 255blue
- the blue component, from 0 to 255toTimeDataSet(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static int[] size(QDataSet ds)
Note datasets need not have the same number of elements in each record. This is often the case however, and a "qube" dataset has this property.ds= zeros(3,4) print size(ds) # returns "3,4"
ds
- a qube dataset.java.lang.IllegalArgumentException
- if the dataset is not a qube.public static java.awt.Color colorFromString(java.lang.String sval)
sval
- the string representationjava.lang.IllegalArgumentException
- if the color cannot be parsed.public static QDataSet slices(QDataSet ds, java.lang.Object... args)
ds
- the datasetargs
- varargs list of integers that are slice indices, or "" or ":" to mean don't slicepublic static QDataSet reform(QDataSet ds)
ds
- rank N datasetpublic static QDataSet reform(QDataSet ds, int nrec, int[] qube)
ds
- rank 2 or greater dataset of length nrec.nrec
- number of records in dsqube
- length nn array with the new geometry of each record.public static QDataSet reform(QDataSet ds, int[] qube)
ds
- datasetqube
- the dimensions of the result dataset.public static QDataSet reform(java.lang.Object ds, int[] qube)
public static QDataSet xtags(QDataSet ds)
ds
- the datasetSemanticOps.xtagsDataSet(org.das2.qds.QDataSet)
public static QDataSet ytags(QDataSet ds)
ds
- the datasetSemanticOps.ytagsDataSet(org.das2.qds.QDataSet)
public static QDataSet boundsDataset(java.lang.String s)
2002-03-02/2002-03-03 2002-03-02 orbit:crres:6 5 to 50 | rank 1 bounds (a datumRange) |
2002-03-02/2002-03-03;5 to 50 | rank 2 bounding box |
2002-03-02T01:01/2002-03-02T01:02;5 to 50 eV;90 to 180 deg | rank 2 bounding qube |
s
- string representation of a datasetdatumRange(java.lang.Object)
public static QDataSet bundle(QDataSet ds)
ds
- a rank N datasetpublic static QDataSet bundle(QDataSet ds1, QDataSet ds2)
ds1
- null, rank N dataset with n records or rank N+1 bundle datasetds2
- rank N dataset.join(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
DataSetOps.unbundle(org.das2.qds.QDataSet, java.lang.String)
public static QDataSet bundle(QDataSet ds1, QDataSet ds2, QDataSet ds3)
ds1
- rank 1 (for now) dataset with n records or rank 2 bundle datasetds2
- rank 1 (for now) dataset with n recordsds3
- rank 1 (for now) dataset with n recordsjoin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet bundle(QDataSet ds1, QDataSet ds2, QDataSet ds3, QDataSet ds4)
ds1
- rank 1 (for now) dataset with n records or rank 2 bundle datasetds2
- rank 1 (for now) dataset with n recordsds3
- rank 1 (for now) dataset with n recordsds4
- rank 1 (for now) dataset with n recordsjoin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet bundle(QDataSet ds1, QDataSet ds2, QDataSet ds3, QDataSet ds4, QDataSet ds5)
ds1
- rank 1 (for now) dataset with n records or rank 2 bundle datasetds2
- rank 1 (for now) dataset with n recordsds3
- rank 1 (for now) dataset with n recordsds4
- rank 1 (for now) dataset with n recordsds5
- rank 1 (for now) dataset with n recordsjoin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet bundle(QDataSet ds1, QDataSet ds2, QDataSet ds3, QDataSet ds4, QDataSet ds5, QDataSet ds6)
ds1
- rank 1 (for now) dataset with n records or rank 2 bundle datasetds2
- rank 1 (for now) dataset with n recordsds3
- rank 1 (for now) dataset with n recordsds4
- rank 1 (for now) dataset with n recordsds5
- rank 1 (for now) dataset with n recordsds6
- rank 1 (for now) dataset with n recordsjoin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet bundle(QDataSet ds1, QDataSet ds2, QDataSet ds3, QDataSet ds4, QDataSet ds5, QDataSet ds6, QDataSet ds7)
ds1
- rank 1 (for now) dataset with n records or rank 2 bundle datasetds2
- rank 1 (for now) dataset with n recordsds3
- rank 1 (for now) dataset with n recordsds4
- rank 1 (for now) dataset with n recordsds5
- rank 1 (for now) dataset with n recordsds6
- rank 1 (for now) dataset with n recordsds7
- rank 1 (for now) dataset with n recordsjoin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet unbundle(QDataSet ds, java.lang.String name)
ds
- the bundle of datasets, often rank 2 with BUNDLE_1 propertyname
- the name of the bundled dataset, or "ch_<i>" where i is the dataset numberjava.lang.IllegalArgumentException
- if no named dataset is found.unbundle(org.das2.qds.QDataSet, int)
,
DataSetOps.bundleNames(org.das2.qds.QDataSet)
public static QDataSet unbundle(QDataSet ds, int i)
ds
- the bundle dataset.i
- index of the dataset to extract. If the index is within a high-rank dataset, then the entire dataset is returned.java.lang.IndexOutOfBoundsException
- if the index is invalid.java.lang.IllegalArgumentException
- if the dataset is not a bundle dataset, with either BUNDLE_1 or DEPEND_1 set.public static QDataSet unbundleBins(QDataSet ds, int i)
ds
- the bundle.i
- the index, 0 for a canonical events dataset.public static QDataSet rebundle(QDataSet bundle1, java.lang.String[] names)
bundle1
- a bundle of datasetsnames
- the bundled dataset namesunbundle(org.das2.qds.QDataSet, java.lang.String)
public static QDataSet rebundle(QDataSet bundle1, int[] ii)
bundle1
- a bundle of datasetsii
- the index of each datasetunbundle(org.das2.qds.QDataSet, java.lang.String)
public static boolean isLegacyBundle(QDataSet zds)
zds
- rank 1 or rank 2 datasetpublic static boolean isBundle(QDataSet zds)
zds
- the datasetSchemes
public static QDataSet ensureMonotonic(QDataSet ds)
ds
- the datasetDataSetUtil.isMonotonic(org.das2.qds.QDataSet)
public static QDataSet ensureMonotonicAndIncreasingWithFill(QDataSet ds)
ds
- the datasetDataSetUtil.isMonotonicAndIncreasingQuick(org.das2.qds.QDataSet)
public static QDataSet link(QDataSet x, QDataSet y)
plot(X,Y) shows a plot of Y(X), link(X,Y) returns the dataset Y(X).
x
- rank 1 datasety
- rank 1 or rank 2 bundle datasetpublic static QDataSet link(QDataSet x, QDataSet y, QDataSet z)
Note if z is a rank 1 dataset, then a bundle dataset Nx3 is returned, and names are assigned to the datasetsplot(x,y,z) shows a plot of Z(X,Y), link(x,y,z) returns the dataset Z(X,Y).
x
- rank 1 datasety
- rank 1 datasetz
- rank 1 or 2 dataset.public static QDataSet link(QDataSet d0, QDataSet d1, QDataSet d2, QDataSet z)
d0
- rank 1 datasetd1
- rank 1 datasetd2
- rank 1 datasetz
- rank 1 or rank 3 dataset.public static QDataSet link(QDataSet d0, QDataSet d1, QDataSet d2, QDataSet d3, QDataSet z)
d0
- rank 1 datasetd1
- rank 1 datasetd2
- rank 1 datasetd3
- rank 1 datasetz
- rank 1 or rank 4 dataset.public static QDataSet link(java.lang.Object x, java.lang.Object y)
x
- object which can be converted to a QDataSety
- object which can be converted to a QDataSetlink(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
link(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet link(java.lang.Object x, java.lang.Object y, java.lang.Object z)
x
- object which can be converted to a QDataSety
- object which can be converted to a QDataSetz
- object which can be converted to a QDataSetlink(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
link(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet link(java.lang.Object d0, java.lang.Object d1, java.lang.Object d2, java.lang.Object z)
d0
- object which can be converted to a QDataSetd1
- object which can be converted to a QDataSetd2
- object which can be converted to a QDataSetz
- object which can be converted to a QDataSetlink(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
,
link(org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static MutablePropertyDataSet dependsOn(QDataSet ds, int dim, QDataSet dep)
ds
- the datasetdim
- dimension to declare dependence: 0,1,2.dep
- the independent dataset.public static QDataSet join(QDataSet ds2)
ds2
- rank N datasetpublic static QDataSet join(QDataSet ds1, QDataSet ds2)
ds1
- rank N dataset, or nullds2
- rank N datasetslices(org.das2.qds.QDataSet, java.lang.Object...)
,
concatenate(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static QDataSet merge(QDataSet ds1, QDataSet ds2)
ds1
- rank N dataset, or null.ds2
- rank N datasetconcatenate(org.das2.qds.QDataSet, org.das2.qds.QDataSet)
public static java.lang.String guessLabel(QDataSet ds)
ds
- the datasetpublic static java.lang.String guessLabel(QDataSet ds, java.lang.String deft)
ds
- the datasetdeft
- the default label to use.public static java.lang.String guessName(QDataSet ds)
ds
- the datasetpublic static java.lang.String guessName(QDataSet ds, java.lang.String deft)
ds
- the datasetdeft
- the default name to use.public static java.lang.String saferName(java.lang.String suggest)
suggest
- a name, possibly containing pipes (|)public static boolean isSafeName(java.lang.String name)
name
- public static java.lang.String safeName(java.lang.String suggest)
suggest
- a name, possibly containing spaces and illegal characterspublic static boolean fillIsDifferent(QDataSet ds1, QDataSet ds2)
ds1
- ds2
- public static QDataSet transpose(QDataSet ds)
ds
- rank 2 datasetpublic static QDataSet transpose(java.lang.Object ds)
public static boolean equivalent(QDataSet ds1, QDataSet ds2)
ds1
- the first datasetds2
- the second datasetpublic static boolean equivalent(java.lang.Object ds1, java.lang.Object ds2)
public static int dimensionCount(QDataSet dss)
dss
- the datasetpublic static int dimensionCount(java.lang.Object dss)
dss
- the object that can be coerced into a dataset.dataset(java.lang.Object)
public static QDataSet fftPowerMultiThread(QDataSet ds, int len, ProgressMonitor mon)
ds
- rank 2 dataset ds(N,M) with M>lenlen
- the number of elements to have in each fft.mon
- a ProgressMonitor for the processpublic static QDataSet buckshotInterpolate(QDataSet xyz, QDataSet data, QDataSet xinterp, QDataSet yinterp, QDataSet zinterp)
xyz
- rank 2 bundle of x,y,z data.data
- rank 1 dependent data, a function of x,y,z.xinterp
- the x locations to interpolate, rank 0, 1, or 2.yinterp
- the y locations to interpolatezinterp
- the z locations to interpolatepublic static QDataSet polyCenters(QDataSet polyMesh)
polyMesh
- Schemes#triangleMesh()
public static QDataSet createPolyMesh(QDataSet append, QDataSet xy)
in
- null or a polyMesh to append the result.xy
- the rank 2 bundle of x and y valuescreateEvent(org.das2.qds.QDataSet, org.das2.datum.DatumRange, int, java.lang.String)
public static QDataSet triangulate(QDataSet xx, QDataSet yy)
xx
- rank 1 datasetyy
- rank 1 datasetpublic static QDataSet buckshotInterpolate(QDataSet xy, QDataSet data, QDataSet xinterp, QDataSet yinterp)
xy
- rank 2 bundle of independent data x,y points.data
- rank 1 dependent data, a function of x,y.xinterp
- the x locations to interpolateyinterp
- the y locations to interpolatepublic static final QDataSet matrixParse(java.lang.String smat)
smat
- a string like '[[1,0,0],[0,1,0],[0,0,1]]'matrixFormat(org.das2.qds.QDataSet, java.lang.String)
public static final QDataSet matrixFromEuler(java.lang.String seq, Datum angle)
seq
- the string "x", "y", or "z"angle
- the angle in degrees or radians.public static final QDataSet matrixMultiply(QDataSet m, QDataSet v)
v
by matrix m
. Argument v
can also be a
rank 2 series of vectors (vv[n,3]), and argument m
can be an array of matrices (mm[n,3,3]). Note
that to multiply a vector and a matrix (instead of matrix and a vector), use matrixMultiply( transpose(m), v ).m
- matrix or array of matricesv
- vector or array of vectorsb
bundle for creating vectors from
components.
,
for extracting components from the result.
public static java.lang.String matrixFormat(QDataSet mm, java.lang.String style)
mm
- the 3x3 matrix.style
- "code" or "newlines". None/null is newlines.will parse when style is "code"
public static final double gamma(double n)
n
- public static final QDataSet gamma(java.lang.Object n)
n
-