Skip to content

ScriptingReference

Jeremy Faden edited this page Jan 14, 2020 · 20 revisions

<a name="abs-org.das2.qds.QDataSet->

abs

abs( QDataSet ds1 ) → QDataSet

element-wise abs. For vectors, this returns the length of each element. Note Jython conflict needs to be resolved. Note the result of this will have dimensionless units, and see magnitude for the more abstract operator.
For ratio-type units (Stevens) like "kms", the unit is preserved.

Parameters:

ds1 - the dataset

Returns:

dataset with the same geometry

See Also:

Ops#magnitude(org.das2.qds.QDataSet) magnitude(ds), which preserves the sign.

<a name="abs-java.lang.Object->

abs

abs( java.lang.Object ds1 ) → QDataSet

promote the list, double, array etc to QDataSet before taking abs.

Parameters:

ds1 - list, double, array, etc

Returns:

the abs in a QDataSet

<a name="accum-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

accum

accum( QDataSet accumDs, QDataSet ds ) → QDataSet

return an array that is the running sum of each element in the array, starting with the value accum. Result[i]= accum + total( ds[0:i+1] )

Parameters:

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 sum

Returns:

the running of each element in the array.

See Also:

#diff(org.das2.qds.QDataSet)

<a name="accum-java.lang.Object-java.lang.Object->

accum

accum( java.lang.Object accumDs, java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="accum-org.das2.qds.QDataSet->

accum

accum( QDataSet ds ) → QDataSet

return an array that is the running sum of each element in the array, starting with the value accum. Result[i]= total( ds[0:i+1] )

Parameters:

ds - each element is added to the running sum

Returns:

the running of each element in the array.

See Also:

#diff(org.das2.qds.QDataSet)

<a name="accum-java.lang.Object->

accum

accum( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="acos-org.das2.qds.QDataSet->

acos

acos( QDataSet ds ) → QDataSet

element-wise arccos.

Parameters:

ds -

Returns:

QDataSet

<a name="acos-java.lang.Object->

acos

acos( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="add-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

add

add( QDataSet ds1, QDataSet ds2 ) → QDataSet

add the two datasets which have the compatible geometry and units. For example,

{@code
ds1=timegen('2014-10-15T07:23','60s',300)
ds2=dataset('30s')
print add(ds1,ds2)
}
The units handling is quite simple, and this will soon change. Note that the Jython operator + is overloaded to this method.

Parameters:

ds1 - a rank N dataset
ds2 - a rank M dataset with compatible geometry

Returns:

the element-wise sum of the two datasets.

See Also:

#addGen(org.das2.qds.QDataSet, org.das2.qds.QDataSet, java.util.Map) addGen, which shows how units are resolved.

<a name="add-java.lang.Object-java.lang.Object->

add

add( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

add the two datasets which have the compatible geometry and units.

Parameters:

ds1 - QDataSet, array, string, scalar argument
ds2 - QDataSet, array, string, scalar argument with compatible geometry.

Returns:

the element-wise sum of the two datasets.

See Also:

#dataset(java.lang.Object)

<a name="and-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

and

and( QDataSet ds1, QDataSet ds2 ) → QDataSet

element-wise logical and function. non-zero is true, zero is false.

Parameters:

ds1 -
ds2 -

Returns:

QDataSet

See Also:

#bitwiseAnd(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="and-java.lang.Object-java.lang.Object->

and

and( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="append-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

append

append( QDataSet ds1, QDataSet ds2 ) → QDataSet

append two datasets that are QUBEs. DEPEND_0 and other metadata is handled as well. So for example:

ds1= findgen(10)
ds2= findgen(12)
print append(ds1,ds2)  ; dataSet[22] (dimensionless)
If both datasets are ArrayDataSets and of the same component type, then the result will have this type as well. Otherwise DDataSet is returned.

Parameters:

ds1 - null or rank N dataset
ds2 - rank N dataset with compatible geometry.

Returns:

QDataSet

<a name="appendEvents-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

appendEvents

appendEvents( QDataSet ev1, QDataSet ev2 ) → QDataSet

provide explicit method for appending two events scheme datasets. This will probably be deprecated, and this was added at 17:30 for a particular need.

Parameters:

ev1 -
ev2 -

Returns:

QDataSet

<a name="applyBinaryOp-org.das2.qds.QDataSet-org.das2.qds.QDataSet-Ops.BinaryOp->

applyBinaryOp

applyBinaryOp( QDataSet ds1, QDataSet ds2, org.das2.qds.ops.Ops.BinaryOp op ) → MutablePropertyDataSet

apply the binary operator element-for-element of the two datasets, minding dataset geometry, fill values, etc. The two datasets are coerced to compatible geometry, if possible (e.g.Temperature[Time]+2deg), using CoerceUtil.coerce. Structural metadata such as DEPEND_0 are preserved where this is reasonable, and dimensional metadata such as UNITS are dropped.

Parameters:

ds1 - the first argument
ds2 - the second argument
op - binary operation for each pair of elements

Returns:

the result with the same geometry as the pair.

<a name="applyBinaryOp-java.lang.Object-java.lang.Object-Ops.BinaryOp->

applyBinaryOp

applyBinaryOp( java.lang.Object ds1, java.lang.Object ds2, org.das2.qds.ops.Ops.BinaryOp op ) → MutablePropertyDataSet

As with applyBinaryOp, but promote compatible objects to QDataSet first.

Parameters:

ds1 - the first operand
ds2 - the second operand
op - binary operation for each pair of elements

Returns:

the result with the same geometry as the pair.

See Also:

#dataset(java.lang.Object)

<a name="applyIndex-org.das2.qds.QDataSet-org.das2.qds.QDataSet-Number->

applyIndex

applyIndex( QDataSet vv, QDataSet ds, java.lang.Number fillValue ) → WritableDataSet

apply the indeces, checking for out-of-bounds values.

Parameters:

vv - values to return, a rank 1, N-element dataset.
ds - the indeces.
fillValue - the value to use when the index is out-of-bounds.

Returns:

data a dataset with the geometry of ds and the units of values.

See Also:

#subset(org.das2.qds.QDataSet, org.das2.qds.QDataSet) subset, which does the same thing.
#applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)

<a name="applyIndex-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

applyIndex

applyIndex( QDataSet ds, QDataSet r ) → WritableDataSet

apply the indeces

Parameters:

ds - values to return, a rank 1, N-element dataset.
r - the indeces.

Returns:

data a dataset with the geometry of ds and the units of values.

See Also:

#subset(org.das2.qds.QDataSet, org.das2.qds.QDataSet) subset, which does the same thing.
#applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)

<a name="applyIndex-java.lang.Object-org.das2.qds.QDataSet->

applyIndex

applyIndex( java.lang.Object dso, QDataSet r ) → WritableDataSet

apply the indeces

Parameters:

dso - values to return, a rank 1, N-element dataset.
r - the indices.

Returns:

data a dataset with the geometry of ds and the units of values.

See Also:

#applyIndex(org.das2.qds.QDataSet, int, org.das2.qds.QDataSet)

<a name="applyIndex-org.das2.qds.QDataSet-int-org.das2.qds.QDataSet->

applyIndex

applyIndex( QDataSet ds, int dimension, QDataSet indices ) → MutablePropertyDataSet

apply the indeces to the given dimension.

Parameters:

ds -
dimension -
indices -

Returns:

MutablePropertyDataSet

See Also:

SubsetDataSet

<a name="applyUnaryOp-org.das2.qds.QDataSet-Ops.UnaryOp->

applyUnaryOp

applyUnaryOp( QDataSet ds1, org.das2.qds.ops.Ops.UnaryOp op ) → MutablePropertyDataSet

apply the unary operation (such as "cos") to the dataset. DEPEND_[0-3] is propagated.

Parameters:

ds1 - the argument
op - the operation for each element.

Returns:

the result the the same geometry.

<a name="applyUnaryOp-java.lang.Object-Ops.UnaryOp->

applyUnaryOp

applyUnaryOp( java.lang.Object ds1, org.das2.qds.ops.Ops.UnaryOp op ) → MutablePropertyDataSet

apply the unary operation (such as "cos") to the dataset. DEPEND_[0-3] is propagated.

Parameters:

ds1 - the argument which can be converted to a dataset.
op - the operation for each element.

Returns:

the result the the same geometry.

<a name="asin-org.das2.qds.QDataSet->

asin

asin( QDataSet ds ) → QDataSet

element-wise arcsin.

Parameters:

ds -

Returns:

QDataSet

<a name="asin-java.lang.Object->

asin

asin( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="atan-org.das2.qds.QDataSet->

atan

atan( QDataSet ds ) → QDataSet

element-wise atan.

Parameters:

ds -

Returns:

QDataSet

<a name="atan-java.lang.Object->

atan

atan( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="atan2-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

atan2

atan2( QDataSet y, QDataSet x ) → QDataSet

element-wise atan2, 4-quadrant atan. 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).

Parameters:

y - the y values
x - the x values

Returns:

angles between -PI and PI

<a name="atan2-java.lang.Object-java.lang.Object->

atan2

atan2( java.lang.Object dsy, java.lang.Object dsx ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="autoHistogram-org.das2.qds.QDataSet->

autoHistogram

autoHistogram( QDataSet ds ) → QDataSet

AutoHistogram is a one-pass self-scaling histogram, useful in autoranging data.
The data is fed into the routine, and bins will grow as more and more data is added, to result in about 100 bins. For example, if the initial binsize is 1.0 unit, and the data extent is 0-200, then bins are combined so that the new binsize is 2.0 units and 100 bins are used.

Parameters:

ds - rank N dataset (all ranks are supported).

Returns:

rank 1 dataset

<a name="binsWithin-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

binsWithin

binsWithin( QDataSet ds, QDataSet bounds ) → QDataSet

return non-zero where the bins of ds are within the bounds.

Parameters:

ds - rank 2 bins dataset
bounds - a rank 1 bounding box.

Returns:

rank 1 dataset containing non-zero where the condition is true.

See Also:

#within(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="binsWithout-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

binsWithout

binsWithout( QDataSet ds, QDataSet bounds ) → QDataSet

return non-zero where the bins of ds are outside of the bounds.

Parameters:

ds - rank 2 bins dataset
bounds - a rank 1 bounding box.

Returns:

rank 1 dataset containing non-zero where the condition is true.

See Also:

#binsWithin(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="bitwiseAnd-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bitwiseAnd

bitwiseAnd( QDataSet ds1, QDataSet ds2 ) → QDataSet

bitwise AND operator treats the data as (32-bit) integers, and returns the bit-wise AND.

Parameters:

ds1 -
ds2 -

Returns:

bit-wise AND.

<a name="bitwiseAnd-java.lang.Object-java.lang.Object->

bitwiseAnd

bitwiseAnd( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="bitwiseOr-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bitwiseOr

bitwiseOr( QDataSet ds1, QDataSet ds2 ) → QDataSet

bitwise OR operator treats the data as (32-bit) integers, and returns the bit-wise OR.

Parameters:

ds1 -
ds2 -

Returns:

bit-wise OR.

<a name="bitwiseOr-java.lang.Object-java.lang.Object->

bitwiseOr

bitwiseOr( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="bitwiseXor-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bitwiseXor

bitwiseXor( QDataSet ds1, QDataSet ds2 ) → QDataSet

bitwise XOR (exclusive or) operator treats the data as (32-bit) integers, and returns the bit-wise XOR. Note there is no bitwise not, and this is because there are no shorts, bytes. So to implement bitwise not for a 16 bit number you would have bitwiseXor( ds, dataset(2**16-1) ).

Parameters:

ds1 -
ds2 -

Returns:

bit-wise XOR.

<a name="bitwiseXor-java.lang.Object-java.lang.Object->

bitwiseXor

bitwiseXor( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="buckshotInterpolate-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

buckshotInterpolate

buckshotInterpolate( QDataSet xyz, QDataSet data, QDataSet xinterp, QDataSet yinterp, QDataSet zinterp ) → QDataSet

3-D interpolation performed by tesselating the space (with 4-point tetrahedra) and doing interpolation. NOTE: this does not check units.

Parameters:

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 interpolate
zinterp - the z locations to interpolate

Returns:

the interpolated data.

<a name="buckshotInterpolate-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

buckshotInterpolate

buckshotInterpolate( QDataSet xy, QDataSet data, QDataSet xinterp, QDataSet yinterp ) → QDataSet

2-D interpolation performed by tessellating the space (with 3-point triangles) and doing interpolation. NOTE: this does not check units.

Parameters:

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 interpolate
yinterp - the y locations to interpolate

Returns:

the interpolated data.

<a name="bundle-org.das2.qds.QDataSet->

bundle

bundle( QDataSet ds ) → QDataSet

bundle the dataset, making an initial bundle, adding a bundle dimension.

Parameters:

ds - a rank N dataset

Returns:

rank N+1 bundle dataset

<a name="bundle-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bundle

bundle( QDataSet ds1, QDataSet ds2 ) → QDataSet

bundle the two datasets, adding if necessary a bundle dimension. This will try to bundle on the second dimension, unlike join. This will also isolate the semantics of bundle dimensions as it's introduced. Note the first argument can be null in order to simplify loops in client code.

Parameters:

ds1 - null, rank N dataset with n records or rank N+1 bundle dataset
ds2 - rank N dataset.

Returns:

rank N+1 bundle dataset, presently with mutable properties.

See Also:

#join(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="bundle-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bundle

bundle( QDataSet ds1, QDataSet ds2, QDataSet ds3 ) → QDataSet

bundle three datasets, giving them a common zeroth index, typically time. unlike join. This bundles on the second dimension, unlike join. This is just like bundle(ds1,ds2), in fact this just calls bundle( bundle( ds1,ds2 ), ds3 )

Parameters:

ds1 - rank 1 (for now) dataset with n records or rank 2 bundle dataset
ds2 - rank 1 (for now) dataset with n records
ds3 - rank 1 (for now) dataset with n records

Returns:

rank 2 [n,3] bundle dataset

See Also:

#join(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="bundle-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

bundle

bundle( QDataSet ds1, QDataSet ds2, QDataSet ds3, QDataSet ds4 ) → QDataSet

bundle four datasets, making them share their zeroth index, typically time, unlike join. This is just like bundle(ds1,ds2), in fact this just calls bundle( bundle( bundle( ds1,ds2 ), ds3 ), ds4 )

Parameters:

ds1 - rank 1 (for now) dataset with n records or rank 2 bundle dataset
ds2 - rank 1 (for now) dataset with n records
ds3 - rank 1 (for now) dataset with n records
ds4 - rank 1 (for now) dataset with n records

Returns:

rank 2 [n,4] bundle dataset

See Also:

#join(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="butterworth-org.das2.qds.QDataSet-int-Datum-boolean->

butterworth

butterworth( QDataSet in, int order, Datum f, boolean lowp ) → QDataSet

Perform Butterworth filter for high pass or low pass.

Parameters:

in - the rank 1 waveform
order - 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.

Returns:

the dataset in the same form.

<a name="butterworth-org.das2.qds.QDataSet-int-Datum-Datum-boolean->

butterworth

butterworth( QDataSet in, int order, Datum flow, Datum fhigh, boolean pass ) → QDataSet

Perform Butterworth filter for notch or band pass or band reject.

Parameters:

in - the rank 1 waveform
order - 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.

Returns:

the dataset in the same form.

<a name="bytarr-int->

bytarr

bytarr( int len0 ) → QDataSet

create a dataset filled with zeros, stored in unsigned bytes. Each element can contain numbers from 0 to 255.

Parameters:

len0 - the zeroth dimension length

Returns:

rank 1 dataset filled with zeros.

See Also:

#dblarr(int)

<a name="bytarr-int-int->

bytarr

bytarr( int len0, int len1 ) → QDataSet

create a rank 2 dataset filled with zeros, stored in unsigned bytes.

Parameters:

len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.

Returns:

rank 2 dataset filled with zeros.

<a name="bytarr-int-int-int->

bytarr

bytarr( int len0, int len1, int len2 ) → QDataSet

create a rank 3 dataset filled with zeros, stored in unsigned bytes.

Parameters:

len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.
len2 - the length of the second dimension.

Returns:

rank 3 dataset filled with zeros.

<a name="ceil-org.das2.qds.QDataSet->

ceil

ceil( QDataSet ds1 ) → QDataSet

element-wise ceil function.

Parameters:

ds1 -

Returns:

QDataSet

<a name="ceil-java.lang.Object->

ceil

ceil( java.lang.Object x ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="chirp-org.das2.qds.QDataSet-Datum-Datum-Datum->

chirp

chirp( QDataSet t, Datum df0, Datum dt1, Datum df1 ) → QDataSet

scipy chirp function, used for testing.

Parameters:

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.

Returns:

QDataSet

<a name="circle-org.das2.qds.QDataSet-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

circle

circle( QDataSet radius, QDataSet x, QDataSet y ) → QDataSet

return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.

Parameters:

x - the x coordinate of the circle
y - the y coordinate of the circle
radius - rank 0 dataset

Returns:

QDataSet that when plotted is a circle.

<a name="circle-double-double-double->

circle

circle( double radius, double x, double y ) → QDataSet

return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location. Note this is presently returned as Y[X], but should probably return a rank 2 dataset that is a bundle.

Parameters:

x - the x coordinate of the circle
y - the y coordinate of the circle
radius - rank 0 dataset

Returns:

QDataSet that when plotted is a circle.

<a name="circle-org.das2.qds.QDataSet->

circle

circle( QDataSet radius ) → QDataSet

return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.

Parameters:

radius - rank 0 dataset

Returns:

QDataSet that when plotted is a circle.

<a name="circle-double->

circle

circle( double dradius ) → QDataSet

return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.

Parameters:

dradius -

Returns:

QDataSet that when plotted is a circle.

<a name="circle-String->

circle

circle( java.lang.String sradius ) → QDataSet

return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.

Parameters:

sradius - string parsed into rank 0 dataset

Returns:

QDataSet that when plotted is a circle.

<a name="clearWritable-WritableDataSet->

clearWritable

clearWritable( WritableDataSet ds ) → void

assign zeros to all the values of the dataset. The dataset must be mutable. This was used to verify Jython behavior.

Parameters:

ds -

Returns:

void

<a name="collapse0-org.das2.qds.QDataSet-int-int->

collapse0

collapse0( QDataSet fillDs, int st, int en ) → QDataSet

this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the zeroth dimension. collapse0( ds[30,20] ) → ds[20]

Parameters:

fillDs -
st - the start index
en - the non-inclusive end index

Returns:

the averaged dataset

<a name="collapse0-org.das2.qds.QDataSet->

collapse0

collapse0( QDataSet fillDs ) → QDataSet

this is introduced to mimic the in-line function which reduces the dimensionality by averaging over the zeroth dimension. collapse0( ds[30,20] ) → ds[20]

Parameters:

fillDs -

Returns:

the averaged dataset

<a name="collapse0R4-org.das2.qds.QDataSet-ProgressMonitor->

collapse0R4

collapse0R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the zeroth index.

Parameters:

ds - rank 4 dataset
mon -

Returns:

rank 3 dataset

See Also:

org.das2.qds.OperationsProcessor#sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)

<a name="collapse1-org.das2.qds.QDataSet->

collapse1

collapse1( QDataSet ds ) → QDataSet

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]

Parameters:

ds -

Returns:

the averaged dataset

<a name="collapse1R4-org.das2.qds.QDataSet-ProgressMonitor->

collapse1R4

collapse1R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the first index.

Parameters:

ds - rank 4 dataset
mon -

Returns:

rank 3 dataset

See Also:

org.das2.qds.OperationsProcessor#sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)

<a name="collapse2-org.das2.qds.QDataSet->

collapse2

collapse2( QDataSet fillDs ) → QDataSet

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]

Parameters:

fillDs -

Returns:

the averaged dataset

<a name="collapse2R4-org.das2.qds.QDataSet-ProgressMonitor->

collapse2R4

collapse2R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the second index.

Parameters:

ds - rank 4 dataset
mon -

Returns:

rank 3 dataset

See Also:

org.das2.qds.OperationsProcessor#sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)

<a name="collapse3-org.das2.qds.QDataSet->

collapse3

collapse3( QDataSet fillDs ) → QDataSet

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]

Parameters:

fillDs -

Returns:

the averaged dataset

<a name="collapse3R4-org.das2.qds.QDataSet-ProgressMonitor->

collapse3R4

collapse3R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the third index.

Parameters:

ds - rank 4 dataset
mon -

Returns:

rank 3 dataset

See Also:

org.das2.qds.OperationsProcessor#sprocess(java.lang.String, org.das2.qds.QDataSet, org.das2.util.monitor.ProgressMonitor)

<a name="colorFromString-String->

colorFromString

colorFromString( java.lang.String sval ) → java.awt.Color

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

Parameters:

sval - the string representation

Returns:

the color

<a name="complexConj-org.das2.qds.QDataSet->

complexConj

complexConj( QDataSet ds ) → QDataSet

return the complex conjugate of the rank 1 or rank 2 QDataSet.

Parameters:

ds - ds[2] or ds[n,2]

Returns:

ds[2] or ds[n,2]

See Also:

#complexMultiply(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="complexDataset-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

complexDataset

complexDataset( QDataSet realPart, QDataSet imaginaryPart ) → QDataSet

create a complex dataset.

Parameters:

realPart - the real component.
imaginaryPart - the complex component.

Returns:

complex dataset

See Also:

org.das2.qds.examples.Schemes#rank2ComplexNumbers()

<a name="complexMultiply-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

complexMultiply

complexMultiply( QDataSet ds1, QDataSet ds2 ) → QDataSet

perform complex multiplication, where the two datasets must have the same rank and must both end with a complex dimension.

Parameters:

ds1 - ds[2] or ds[n,2] or ds[n,m,2]
ds2 - ds[2] or ds[n,2] or ds[n,m,2]

Returns:

ds[2] or ds[n,2] or ds[n,m,2]

See Also:

#complexConj(org.das2.qds.QDataSet)

<a name="concatenate-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

concatenate

concatenate( QDataSet ds1, QDataSet ds2 ) → QDataSet

concatenates the two datasets together, appending the datasets on the zeroth dimension. The two datasets must be QUBES have similar geometry on the higher dimensions. If one of the datasets is rank 0 and the geometry of the other is rank 1, then the lower rank dataset is promoted before appending. If the first dataset is null and the second is non-null, then return the second dataset.

Parameters:

ds1 - null or a dataset of length m.
ds2 - dataset of length n to be concatenated.

Returns:

a dataset length m+n.

See Also:

#merge(org.das2.qds.QDataSet, org.das2.qds.QDataSet) merge(ds1,ds2), which will interleave to preserve monotonic.
#append(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="concatenate-java.lang.Object-java.lang.Object->

concatenate

concatenate( java.lang.Object ds1, java.lang.Object ds2 ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="contour-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

contour

contour( QDataSet tds, QDataSet vv ) → QDataSet

contour the data in rank 2 table tds at rank 0 vv. The result is a rank 2 bundle of [:,'x,y,z'] where i is the contour number. The result will have DEPEND_0 be an monotonically increasing sequence with jumps indicating new contours.

Parameters:

tds - rank 2 table
vv - rank 2 bundle

Returns:

QDataSet

<a name="contour-java.lang.Object-java.lang.Object->

contour

contour( java.lang.Object tds, java.lang.Object vv ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="convertPropertyValue-org.das2.qds.QDataSet-String-java.lang.Object->

convertPropertyValue

convertPropertyValue( QDataSet context, java.lang.String name, java.lang.Object value ) → java.lang.Object

convert the object into the type needed for the property.

Parameters:

context - the dataset to which we are assigning the value.
name - the property name
value - the value

Returns:

the correct value.

See Also:

org.autoplot.jythonsupport.PyQDataSet#convertPropertyValue

<a name="convertUnitsTo-org.das2.qds.QDataSet-Units->

convertUnitsTo

convertUnitsTo( QDataSet ds, Units u ) → QDataSet

convert the dataset to the target units

Parameters:

ds - the original dataset.
u - units of the new dataset

Returns:

a new dataset with all the same properties but with the new units.

<a name="convertUnitsTo-DatumRange-Units->

convertUnitsTo

convertUnitsTo( DatumRange dr, Units u ) → DatumRange

convert the datumRange to the given units, which must be convertible.

Parameters:

dr - the datum range, e.g. '5 to 50 MHz'
u - the new units. e.g. 'Hz'

Returns:

DatumRange in the new units, e.g. '5000000 to 50000000 Hz'

<a name="convertUnitsTo-Datum-Units->

convertUnitsTo

convertUnitsTo( Datum d, Units u ) → Datum

convert the datum to the given units, which must be convertible.

Parameters:

d - the datum, e.g. '5 MHz'
u - the new units, e.g. 'Hz'

Returns:

Datum in the new units, e.g. '5000000 Hz'

<a name="copy-org.das2.qds.QDataSet->

copy

copy( QDataSet src ) → WritableDataSet

copy the dataset to make a new one that is writable. When a join dataset is copied, a WritableJoinDataSet is used to copy each dataset. This is a deep copy, so for example DEPEND_0 is copied as well. Note that BufferDataSets will be copied to BufferDataSets, and ArrayDataSets will be copied to ArrayDataSets.

Parameters:

src -

Returns:

a copy of src.

<a name="copyIndexedProperties-org.das2.qds.QDataSet-MutablePropertyDataSet->

copyIndexedProperties

copyIndexedProperties( QDataSet srcds, MutablePropertyDataSet mds ) → void

copy over all the indexed properties into the mutable property dataset. This was introduced to support DataSetOps.unbundle, but should probably always be used. See https://sourceforge.net/p/autoplot/bugs/1704/

Parameters:

srcds - the source dataset
mds - the destination dataset

Returns:

void

<a name="copyProperties-org.das2.qds.QDataSet->

copyProperties

copyProperties( QDataSet ds ) → java.util.Map

copies the properties, copying depend datasets as well.
TODO: This is not thorough, and this needs to be reviewed.

Parameters:

ds - the data from which the properties are extracted.

Returns:

a map of the properties.

See Also:

DataSetUtil#getProperties(org.das2.qds.QDataSet)

<a name="copysign-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

copysign

copysign( QDataSet magnitude, QDataSet sign ) → QDataSet

Returns the first floating-point argument with the sign of the second floating-point argument.

Parameters:

magnitude -
sign -

Returns:

QDataSet

See Also:

#signum
#negate

<a name="copysign-java.lang.Object-java.lang.Object->

copysign

copysign( java.lang.Object x, java.lang.Object y ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="cos-org.das2.qds.QDataSet->

cos

cos( QDataSet ds ) → QDataSet

element-wise cos.

Parameters:

ds -

Returns:

QDataSet

<a name="cos-java.lang.Object->

cos

cos( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="cosh-org.das2.qds.QDataSet->

cosh

cosh( QDataSet ds ) → QDataSet

element-wise cosh.

Parameters:

ds -

Returns:

QDataSet

<a name="cosh-java.lang.Object->

cosh

cosh( java.lang.Object ds ) → QDataSet

Parameters:

Returns:

QDataSet

<a name="createEvent-String-int-String->

createEvent

createEvent( java.lang.String timeRange, int rgbcolor, java.lang.String annotation ) → QDataSet

tool for creating ad-hoc events datasets.

Parameters:

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.

Returns:

a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation

<a name="createEvent-org.das2.qds.QDataSet-String-int-String->

createEvent

createEvent( QDataSet append, java.lang.String timeRange, int rgbcolor, java.lang.String annotation ) → QDataSet

tool for creating ad-hoc events datasets.

Parameters:

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"
rgbcolor - an RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue).
annotation - label for event, possibly including granny codes.

Returns:

a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation

<a name="createEvent-org.das2.qds.QDataSet-DatumRange-int-String->

createEvent

createEvent( QDataSet append, DatumRange dr, int rgbcolor, java.lang.String annotation ) → QDataSet

tool for creating ad-hoc events datasets. For example

Parameters:

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 range
rgbcolor - an RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue)
annotation - label for event, possibly including granny codes.

Returns:

a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation

<a name="createEvents-org.das2.qds.QDataSet->

createEvents

createEvents( QDataSet vds ) → QDataSet

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.

Parameters:

vds - dataset in a number of forms that can be converted to an events dataset.

Returns:

rank 2 QDataSet [ index; 4( time, stopTime, rgbColor, label ) ]

<a name="createEvents-org.das2.qds.QDataSet-Color->

createEvents

createEvents( QDataSet vds, java.awt.Color deftColor ) → QDataSet

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.

Parameters:

vds - dataset in a number of forms that can be converted to an events dataset.
deftColor - the color to use as the default color.

Returns:

rank 2 QDataSet [ index; 4( time, stopTime, rgbColor, label ) ]

<a name="cubicRoot-org.das2.qds.QDataSet->

cubicRoot

cubicRoot( QDataSet coefficients ) → QDataSet

Solves each of a set of cubic equations of the form: ax^3 + bx^2 + c*x + d = 0. Takes a rank 2 dataset with each equation across the first dimension and coefficients of each equation across the second.

Parameters:

coefficients - Set of all coefficients.

Returns:

Roots of each equation. Double.NaN is returned for complex roots.

<a name="cubicRoot-double-double-double-double->

cubicRoot

cubicRoot( double a, double b, double c, double d ) → double[]

Enter the coefficients for a cubic of the form: ax^3 + bx^2 + c*x + d = 0. Based on the method described at http://www.1728.org/cubic2.htm.

Parameters:

a - Coefficient of x^3.
b - Coefficient of x^2.
c - Coefficient of x.
d - Constant.

Returns:

Array containing 3 roots. NaN will be returned for imaginary roots.

<a name="cumulativeMax-org.das2.qds.QDataSet->

cumulativeMax

cumulativeMax( QDataSet ds ) → QDataSet

for each element i of ds, set the result[i] to the maximum of ds[0:(i+1)]

Parameters:

ds - rank 1 dataset

Returns:

the cumulative maximum

<a name="cumulativeMin-org.das2.qds.QDataSet->

cumulativeMin

cumulativeMin( QDataSet ds ) → QDataSet

for each element i of ds, set the result[i] to the minimum of ds[0:(i+1)]

Parameters:

ds - rank 1 dataset

Returns:

the cumulative minimum

<a name="dataIntersection-int[]-int[]->

dataIntersection

dataIntersection( int[] itE, int[] itB ) → int[]

return the values which occur in both rank 1 datasets. Each dataset is sorted.

Parameters:

itE - a bunch of values.
itB - a bunch of values.

Returns:

the set of values found in both.

See Also:

#eventsConjunction(org.das2.qds.QDataSet, org.das2.qds.QDataSet)

<a name="dataIntersection-org.das2.qds.QDataSet-org.das2.qds.QDataSet->

dataIntersection

dataIntersection( QDataSet tE, QDataSet tB ) → QDataSet

return the values which occur in both rank 1 datasets. Each dataset is sorted.

Parameters:

tE - a bunch of values.
tB - a bunch of values.

Returns:

the set of values found in both.

<a name="dataset-java.lang.Object->

dataset

dataset( java.lang.Object arg0 ) → QDataSet

coerce Java objects like arrays Lists and scalars into a QDataSet.
This is introduced to mirror the useful Jython dataset command. This is a nasty business that is surely going to cause all sorts of problems, so we should do it all in one place. See http://jfaden.net:8080/hudson/job/autoplot-test029/ This supports:

  • int, float, double, etc to Rank 0 datasets
  • List<Number> to Rank 1 datasets.
  • Java arrays of Number to Rank 1-4 qubes datasets
  • Strings to rank 0 datasets with units ("5 s" or "2014-01-01T00:00")
  • Datums to rank 0 datasets
  • DatumRanges to rank 1 bins

Parameters:

arg0 - null,QDataSet,Number,Datum,DatumRange,String,List,or array.

Returns:

QDataSet

<a name="dataset-java.lang.Object-Units->

dataset

dataset( java.lang.Object arg0, Units u ) → QDataSet

coerce Java objects like arrays Lists and scalars into a QDataSet.
This is introduced to mirror the useful Jython dataset command. This is a nasty business that is surely going to cause all sorts of problems, so we should do it all in one place. See http://jfaden.net:8080/hudson/job/autoplot-test029/ This supports:

  • int, float, double, etc to Rank 0 datasets
  • List<Number> to Rank 1 datasets.
  • Java arrays of Number to Rank 1-4 qubes datasets
  • Strings to rank 0 datasets with units ("5 s" or "2014-01-01T00:00")
  • Datums to rank 0 datasets
  • DatumRanges to rank 1 bins

Parameters:

arg0 - null,QDataSet,Number,Datum,DatumRange,String,List,or array.
u - units providing context

Returns:

QDataSet

See Also:

JythonOps#dataset(PyObject, org.das2.datum.Units)

Table Of Contents

URIs that Point to Data Files

Download a CDF and Plot it with Autoplot

Load a CDF directly from a website

URIs that Point to Data Servers

Saving to vap files

Loading vap files

Data Sources

CDF Files

HDF/NetCDF Files

Aggregation

CDAWeb

HAPI Servers

Exporting Data

Export Types

Additional controls

Aggregation

Tools

PNGWalk Tool

Data Mash Up

Events List

Run Batch

Advanced Topics

TimeSeriesBrowse and other Capabilities

Events Lists

Caching

Autoranging

Managing Autoplot's Data Cache

Using Autoplot with Python, IDL, and Matlab

Reading data into Python

Reading data into IDL

Reading data into Matlab

QDataSet Data Model

Clone this wiki locally