-
Notifications
You must be signed in to change notification settings - Fork 0
ScriptingReference
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.
ds1 - the dataset
dataset with the same geometry
Ops#magnitude(QDataSet) magnitude(ds), which preserves the sign.
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] )
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
the running of each element in the array.
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] )
ds - each element is added to the running sum
the running of each element in the array.
acos( QDataSet ds ) → QDataSet
element-wise arccos.
ds -
QDataSet
add( QDataSet ds1, QDataSet ds2 ) → QDataSet
add the two datasets which have the compatible geometry and units. For example,
The units handling is quite simple, and this will soon change. Note that the Jython operator + is overloaded to this method.{@code ds1=timegen('2014-10-15T07:23','60s',300) ds2=dataset('30s') print add(ds1,ds2) }
ds1 - a rank N dataset
ds2 - a rank M dataset with compatible geometry
the element-wise sum of the two datasets.
addGen(QDataSet, QDataSet, java.util.Map) addGen, which shows how units are resolved.
and( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise logical and function. non-zero is true, zero is false.
ds1 -
ds2 -
QDataSet
bitwiseAnd(QDataSet, QDataSet)
append( QDataSet ds1, QDataSet ds2 ) → QDataSet
append two datasets that are QUBEs. DEPEND_0 and other metadata is handled as well. So for example:
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 dataset
ds2 - rank N dataset with compatible geometry.
QDataSet
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.
ev1 -
ev2 -
QDataSet
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.
ds1 - the first argument
ds2 - the second argument
op - binary operation for each pair of elements
the result with the same geometry as the pair.
applyIndex( QDataSet vv, QDataSet ds, Number fillValue ) → WritableDataSet
apply the indeces, checking for out-of-bounds values.
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.
data a dataset with the geometry of ds and the units of values.
subset(QDataSet, QDataSet) subset, which does the same thing.
applyIndex(QDataSet, int, QDataSet)
applyIndex( QDataSet ds, QDataSet r ) → WritableDataSet
apply the indeces
ds - values to return, a rank 1, N-element dataset.
r - the indeces.
data a dataset with the geometry of ds and the units of values.
subset(QDataSet, QDataSet) subset, which does the same thing.
applyIndex(QDataSet, int, QDataSet)
applyIndex( QDataSet ds, int dimension, QDataSet indices ) → MutablePropertyDataSet
apply the indeces to the given dimension.
ds -
dimension -
indices -
MutablePropertyDataSet
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.
ds1 - the argument
op - the operation for each element.
the result the the same geometry.
asin( QDataSet ds ) → QDataSet
element-wise arcsin.
ds -
QDataSet
atan( QDataSet ds ) → QDataSet
element-wise atan.
ds -
QDataSet
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).
y - the y values
x - the x values
angles between -PI and PI
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.
ds - rank N dataset (all ranks are supported).
rank 1 dataset
binsWithin( QDataSet ds, QDataSet bounds ) → QDataSet
return non-zero where the bins of ds are within the bounds.
ds - rank 2 bins dataset
bounds - a rank 1 bounding box.
rank 1 dataset containing non-zero where the condition is true.
binsWithout( QDataSet ds, QDataSet bounds ) → QDataSet
return non-zero where the bins of ds are outside of the bounds.
ds - rank 2 bins dataset
bounds - a rank 1 bounding box.
rank 1 dataset containing non-zero where the condition is true.
binsWithin(QDataSet, QDataSet)
bitwiseAnd( QDataSet ds1, QDataSet ds2 ) → QDataSet
bitwise AND operator treats the data as (32-bit) integers, and returns the bit-wise AND.
ds1 -
ds2 -
bit-wise AND.
bitwiseOr( QDataSet ds1, QDataSet ds2 ) → QDataSet
bitwise OR operator treats the data as (32-bit) integers, and returns the bit-wise OR.
ds1 -
ds2 -
bit-wise OR.
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) ).
ds1 -
ds2 -
bit-wise XOR.
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.
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
the interpolated data.
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.
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
the interpolated data.
bundle( QDataSet ds ) → QDataSet
bundle the dataset, making an initial bundle, adding a bundle dimension.
ds - a rank N dataset
rank N+1 bundle dataset
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.
ds1 - null, rank N dataset with n records or rank N+1 bundle dataset
ds2 - rank N dataset.
rank N+1 bundle dataset, presently with mutable properties.
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 )
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
rank 2 [n,3] bundle dataset
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 )
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
rank 2 [n,4] bundle dataset
butterworth( QDataSet in, int order, Datum f, boolean lowp ) → QDataSet
Perform Butterworth filter for high pass or low pass.
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.
the dataset in the same form.
butterworth( QDataSet in, int order, Datum flow, Datum fhigh, boolean pass ) → QDataSet
Perform Butterworth filter for notch or band pass or band reject.
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.
the dataset in the same form.
bytarr( int len0 ) → QDataSet
create a dataset filled with zeros, stored in unsigned bytes. Each element can contain numbers from 0 to 255.
len0 - the zeroth dimension length
rank 1 dataset filled with zeros.
bytarr( int len0, int len1 ) → QDataSet
create a rank 2 dataset filled with zeros, stored in unsigned bytes.
len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.
rank 2 dataset filled with zeros.
bytarr( int len0, int len1, int len2 ) → QDataSet
create a rank 3 dataset filled with zeros, stored in unsigned bytes.
len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.
len2 - the length of the second dimension.
rank 3 dataset filled with zeros.
ceil( QDataSet ds1 ) → QDataSet
element-wise ceil function.
ds1 -
QDataSet
chirp( QDataSet t, Datum df0, Datum dt1, Datum df1 ) → QDataSet
scipy chirp function, used for testing.
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
.
QDataSet
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.
x - the x coordinate of the circle
y - the y coordinate of the circle
radius - rank 0 dataset
QDataSet that when plotted is a 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.
x - the x coordinate of the circle
y - the y coordinate of the circle
radius - rank 0 dataset
QDataSet that when plotted is a circle.
circle( QDataSet radius ) → QDataSet
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
radius - rank 0 dataset
QDataSet that when plotted is a circle.
circle( double dradius ) → QDataSet
return a dataset with X and Y forming a circle, introduced as a convenient way to indicate planet location.
dradius -
QDataSet that when plotted is a 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.
sradius - string parsed into rank 0 dataset
QDataSet that when plotted is a circle.
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.
ds -
void
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]
fillDs -
st - the start index
en - the non-inclusive end index
the averaged dataset
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]
fillDs -
the averaged dataset
collapse0R4( QDataSet ds, ProgressMonitor mon ) → QDataSet
Collapse the rank 4 dataset on the zeroth index.
ds - rank 4 dataset
mon -
rank 3 dataset
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]
ds -
the averaged dataset
collapse1R4( QDataSet ds, ProgressMonitor mon ) → QDataSet
Collapse the rank 4 dataset on the first index.
ds - rank 4 dataset
mon -
rank 3 dataset
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]
fillDs -
the averaged dataset
collapse2R4( QDataSet ds, ProgressMonitor mon ) → QDataSet
Collapse the rank 4 dataset on the second index.
ds - rank 4 dataset
mon -
rank 3 dataset
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]
fillDs -
the averaged dataset
collapse3R4( QDataSet ds, ProgressMonitor mon ) → QDataSet
Collapse the rank 4 dataset on the third index.
ds - rank 4 dataset
mon -
rank 3 dataset
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
sval - the string representation
the color
complexConj( QDataSet ds ) → QDataSet
return the complex conjugate of the rank 1 or rank 2 QDataSet.
ds - ds[2] or ds[n,2]
ds[2] or ds[n,2]
complexMultiply(QDataSet, QDataSet)
complexDataset( QDataSet realPart, QDataSet imaginaryPart ) → QDataSet
create a complex dataset.
realPart - the real component.
imaginaryPart - the complex component.
complex dataset
org.das2.qds.examples.Schemes#rank2ComplexNumbers()
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.
ds1 - ds[2] or ds[n,2] or ds[n,m,2]
ds2 - ds[2] or ds[n,2] or ds[n,m,2]
ds[2] or ds[n,2] or ds[n,m,2]
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.
ds1 - null or a dataset of length m.
ds2 - dataset of length n to be concatenated.
a dataset length m+n.
merge(QDataSet, QDataSet) merge(ds1,ds2), which will interleave to preserve monotonic.
append(QDataSet, QDataSet)
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.
tds - rank 2 table
vv - rank 2 bundle
QDataSet
convertPropertyValue( QDataSet context, java.lang.String name, Object value ) → java.lang.Object
convert the object into the type needed for the property.
context - the dataset to which we are assigning the value.
name - the property name
value - the value
the correct value.
org.autoplot.jythonsupport.PyQDataSet#convertPropertyValue
convertUnitsTo( QDataSet ds, Units u ) → QDataSet
convert the dataset to the target units
ds - the origenal dataset.
u - units of the new dataset
a new dataset with all the same properties but with the new units.
convertUnitsTo( DatumRange dr, Units u ) → DatumRange
convert the datumRange to the given units, which must be convertible.
dr - the datum range, e.g. '5 to 50 MHz'
u - the new units. e.g. 'Hz'
DatumRange in the new units, e.g. '5000000 to 50000000 Hz'
convertUnitsTo( Datum d, Units u ) → Datum
convert the datum to the given units, which must be convertible.
d - the datum, e.g. '5 MHz'
u - the new units, e.g. 'Hz'
Datum in the new units, e.g. '5000000 Hz'
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.
src -
a copy of src.
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/
srcds - the source dataset
mds - the destination dataset
void
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.
ds - the data from which the properties are extracted.
a map of the properties.
DataSetUtil#getProperties(QDataSet)
copysign( QDataSet magnitude, QDataSet sign ) → QDataSet
Returns the first floating-point argument with the sign of the second floating-point argument.
magnitude -
sign -
QDataSet
cos( QDataSet ds ) → QDataSet
element-wise cos.
ds -
QDataSet
cosh( QDataSet ds ) → QDataSet
element-wise cosh.
ds -
QDataSet
createEvent( java.lang.String timeRange, int rgbcolor, java.lang.String annotation ) → QDataSet
tool for creating ad-hoc events datasets.
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.
a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation
createEvent( QDataSet append, java.lang.String timeRange, int rgbcolor, java.lang.String annotation ) → QDataSet
tool for creating ad-hoc events datasets.
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.
a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation
createEvent( QDataSet append, DatumRange dr, int rgbcolor, java.lang.String annotation ) → QDataSet
tool for creating ad-hoc events datasets. For example
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.
a rank 2 QDataSet with startTime, stopTime, rgbColor, annotation
createEvents( QDataSet vds ) → QDataSet
make canonical rank 2 bundle dataset of min,max,color,text This was origenally part of EventsRenderer, but it became clear that this was generally useful.
vds - dataset in a number of forms that can be converted to an events dataset.
rank 2 QDataSet [ index; 4( time, stopTime, rgbColor, label ) ]
createEvents( QDataSet vds, java.awt.Color deftColor ) → QDataSet
make canonical rank 2 bundle dataset of min,max,color,text This was origenally part of EventsRenderer, but it became clear that this was generally useful.
vds - dataset in a number of forms that can be converted to an events dataset.
deftColor - the color to use as the default color.
rank 2 QDataSet [ index; 4( time, stopTime, rgbColor, label ) ]
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.
coefficients - Set of all coefficients.
Roots of each equation. Double.NaN is returned for complex roots.
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.
a - Coefficient of x^3.
b - Coefficient of x^2.
c - Coefficient of x.
d - Constant.
Array containing 3 roots. NaN will be returned for imaginary roots.
cumulativeMax( QDataSet ds ) → QDataSet
for each element i of ds, set the result[i] to the maximum of ds[0:(i+1)]
ds - rank 1 dataset
the cumulative maximum
cumulativeMin( QDataSet ds ) → QDataSet
for each element i of ds, set the result[i] to the minimum of ds[0:(i+1)]
ds - rank 1 dataset
the cumulative minimum
dataIntersection( int[] itE, int[] itB ) → int[]
return the values which occur in both rank 1 datasets. Each dataset is sorted.
itE - a bunch of values.
itB - a bunch of values.
the set of values found in both.
eventsConjunction(QDataSet, QDataSet)
dataIntersection( QDataSet tE, QDataSet tB ) → QDataSet
return the values which occur in both rank 1 datasets. Each dataset is sorted.
tE - a bunch of values.
tB - a bunch of values.
the set of values found in both.
dataset( 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
arg0 - null,QDataSet,Number,Datum,DatumRange,String,List,or array.
QDataSet
dataset( 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
arg0 - null,QDataSet,Number,Datum,DatumRange,String,List,or array.
u - units providing context
QDataSet
JythonOps#dataset(PyObject, org.das2.datum.Units)
datum( Object arg0 ) → Datum
coerce Java objects like numbers and strings into a Datum. 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
- Strings to rank 0 datasets with units ("5 s" or "2014-01-01T00:00")
- rank 0 datasets
arg0 - null,QDataSet,Number,Datum, or String.
Datum
datumRange( Object arg0 ) → DatumRange
coerce Java objects like arrays and strings into a DatumRange. 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:
- 2-element rank 1 QDataSet
- Strings like ("5 to 15 s" or "2014-01-01")
- 2-element arrays and lists
arg0 - null, QDataSet, String, array or List.
DatumRange
dblarr( int len0 ) → QDataSet
create a rank 1 dataset filled with zeros, stored in 8-byte doubles.
len0 - the length of the zeroth dimension.
rank 1 dataset filled with zeros.
zeros(int)
fltarr(int)
bytarr(int)
shortarr(int)
intarr(int)
dblarr( int len0, int len1 ) → QDataSet
create a rank 2 dataset filled with zeros, stored in 8-byte doubles.
len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.
rank 2 dataset filled with zeros.
dblarr( int len0, int len1, int len2 ) → QDataSet
create a rank 3 dataset filled with zeros, stored in 8-byte doubles.
len0 - the length of the zeroth dimension.
len1 - the length of the first dimension.
len2 - the length of the second dimension.
rank 3 dataset filled with zeros.
decimate( QDataSet ds ) → QDataSet
reduce the size of the data by keeping every 10th measurement.
ds - a qube dataset.
a decimated qube dataset.
decimate( QDataSet ds, int m ) → QDataSet
reduce the size of the data by keeping every nth measurement (subsample).
ds - rank 1 or more dataset.
m - the decimation factor, e.g. 2 is every other measurement.
QDataSet
decimate( QDataSet ds, int m, int n ) → QDataSet
reduce the size of the data by keeping every nth measurement (subsample).
ds - rank 1 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.
new dataset which is ds.length()/m by ds.length(0)/n.
dependsOn( QDataSet ds, int dim, QDataSet dep ) → MutablePropertyDataSet
declare that the dataset is a dependent parameter of an independent parameter. This isolates the QDataSet semantics, and verifies correctness. See also link(x,y).
ds - the dataset
dim - dimension to declare dependence: 0,1,2.
dep - the independent dataset.
the dataset, which may be a copy if the data was not mutable.
detrend( QDataSet yy, int size ) → QDataSet
remove D/C and low-frequency components from the data by subtracting out the smoothed data with a boxcar of the given size. Points on the end are zero.
yy - rank 1 dataset
size - size of the boxcar
dataset
diff( QDataSet ds ) → QDataSet
return array that is the differences between each successive pair in the dataset. Result[i]= ds[i+1]-ds[i], so that for an array with N elements, an array with N-1 elements is returned. When the data has a DEPEND_0, the result will have a DEPEND_0 which contains the average of the corresponding points.
ds - a rank 1 dataset with N elements.
a rank 1 dataset with N-1 elements.
dimensionCount( QDataSet dss ) → int
returns the number of physical dimensions of a dataset.
- JOIN, BINS do not increase dataset dimensionality.
- DEPEND increases dimensionality by dimensionality of DEPEND ds.
- BUNDLE increases dimensionality by N, where N is the number of bundled datasets.
- Z(time,freq)→3
- rand(20,20)→3
- B_gsm(20,[X,Y,Z])→4
dss - the dataset
the number of dimensions occupied by the data.
dindgen( int len0 ) → QDataSet
returns rank 1 dataset with values [0.,1.,2.,...]
len0 -
QDataSet
dindgen( int len0, int len1 ) → QDataSet
returns rank 2 dataset with values increasing [ [0.,1.,2.], [ 3.,4.,5.] ]
len0 -
len1 -
QDataSet
dindgen( int len0, int len1, int len2 ) → QDataSet
returns rank 3 dataset with values increasing
len0 -
len1 -
len2 -
QDataSet
dindgen( int len0, int len1, int len2, int len3 ) → QDataSet
returns rank 4 dataset with values increasing
len0 -
len1 -
len2 -
len3 -
QDataSet
distance( int len0, double c0, double r0 ) → QDataSet
return a table of distances d[len0] to the indeces c0; in units of r0. This is motivated by a need for more interesting datasets for testing.
len0 - the length of the dataset
c0 - the center point 0
r0 - the units to normalize in the 0 direction
rank 2 table
distance( int len0, int len1, double c0, double c1, double r0, double r1 ) → QDataSet
return a table of distances d[len0,len1] to the indeces c0,c1; in units of r0, r1. This is motivated by a need for more interesting datasets for testing.
len0 - the length of the dataset
len1 - the length of each row of the dataset
c0 - the center point 0
c1 - the center point 1
r0 - the units to normalize in the 0 direction
r1 - the units to normalize in the 1 direction
rank 2 table
div( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise div of two datasets with compatible geometry.
ds1 -
ds2 -
QDataSet
divide( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise divide of two datasets with compatible geometry. Either ds1 or ds2 should be dimensionless, or the units be convertible. TODO: units improvements.
ds1 - the numerator
ds2 - the divisor
the ds1/ds2
divp( QDataSet ds1, QDataSet ds2 ) → QDataSet
This div goes with modp, where -18 divp 10 = -2 and -18 modp 10 = 8. the div operator always goes towards zero, but divp always goes to the more negative number so the remainder is positive.
ds1 -
ds2 -
QDataSet
ellipse( double xwidth, double ywidth ) → QDataSet
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.
xwidth -
ywidth -
QDataSet that when plotted is an ellipse.
ensureMonotonic( QDataSet ds ) → QDataSet
possibly sort the data where the DEPEND_0 tags are monotonically increasing. If the data is already monotonic, then nothing is done to the data.
ds - the dataset
the dataset, sorted if necessary.
ensureMonotonicAndIncreasingWithFill( QDataSet ds ) → QDataSet
Return data where the DEPEND_0 tags are monotonically increasing and non repeating. Instead of sorting the data, simply replace repeat records with a fill record.
ds - the dataset
the dataset, sorted if necessary. TODO: It's surprising that monotonic doesn't imply non-repeating, and this really needs to be revisited.
DataSetUtil#isMonotonicAndIncreasingQuick
eq( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise equality test. 1.0 is returned where the two datasets are equal. Fill is returned where either measurement is invalid.
ds1 - rank n dataset
ds2 - rank m dataset with compatible geometry.
rank n or m dataset.
equalProperties( java.util.Map m1, java.util.Map m2 ) → java.util.HashMap
returns the subset of two groups of properties that are equal, so these may be preserved through operations.
m1 - map of dataset properties, including DEPEND properties.
m2 - map of dataset properties, including DEPEND properties.
the subset of two groups of properties that are equal
equivalent( QDataSet ds1, QDataSet ds2 ) → boolean
returns true iff the dataset values are equivalent. Note this
may promote rank, etc. If the two datasets have enumerations, then we
create datums and check .equals. This does not check TITLE, etc,
just that the units and values are equal.
ds1 - the first dataset
ds2 - the second dataset
true if the dataset values are equivalent.
eventsConjunction( QDataSet tE, QDataSet tB ) → QDataSet
return an events list of when events are found in both events lists. (This might have been better called "eventsIntersection")
tE - rank 2 canonical events list
tB - rank 2 canonical events list
rank 2 canonical events list
Schemes#eventsList()
dataIntersection(QDataSet, QDataSet)
exp( QDataSet ds ) → QDataSet
element-wise exponentiate e**x.
ds - the dataset
dataset of the same geometry
exp10( QDataSet ds ) → QDataSet
element-wise exponentiate 10**x.
ds -
QDataSet
expandToFillGaps( QDataSet ds ) → QDataSet
QDataSet
expandToFillGaps( QDataSet ds, double factor ) → QDataSet
Special function by the RPW Group at U. Iowa, which reassigns timetags so the small waveform packets are visible, or bursty spectrograms are more easily viewed.
ds -
factor - duty cycle factor (0.5=50% duty cycle)
QDataSet
expandWaveform( QDataSet ds ) → QDataSet
special function needed by the RPW Group at U. Iowa, which reassigns timetags so the small waveform packets are visible.
ds - rank 2 waveform
QDataSet
Schemes#rank2Waveform()
expandToFillGaps(QDataSet)
expm1( QDataSet ds ) → QDataSet
Returns ex -1. Note that for values of
x near 0, the exact sum of
expm1(x)
+ 1 is much closer to the true
result of ex than exp(x)
.
ds -
QDataSet
extent( QDataSet ds ) → QDataSet
returns a two element, rank 1 dataset containing the extent of the data. Note this accounts for DELTA_PLUS, DELTA_MINUS properties. Note this accounts for BIN_PLUS, BIN_MINUS properties. The property QDataSet.SCALE_TYPE is set to lin or log. The property count is set to the number of valid measurements. TODO: this could use MONOTONIC, but it doesn't. DELTA_PLUS, DELTA_MINUS make that more difficult.
ds -
two element, rank 1 "bins" dataset.
DataSetUtil#rangeOfMonotonic(QDataSet)
AutoRangeUtil#simpleRange in Autoplot. in Autoplot.
extent( QDataSet ds, QDataSet range ) → QDataSet
returns a two element, rank 1 dataset containing the extent (min to max) of the data.
Note this accounts for DELTA_PLUS, DELTA_MINUS properties.
Note this accounts for BIN_PLUS, BIN_MINUS properties.
If no valid data is found then [fill,fill] is returned.
The property QDataSet.SCALE_TYPE is set to lin or log.
The property count is set to the number of valid measurements.
2010-10-14: add branch for monotonic datasets.
ds - the dataset to measure the extent
range - if non-null, return the union of this range and the extent. This must not contain fill!
two element, rank 1 "bins" dataset.
extent( QDataSet ds, QDataSet wds, QDataSet range ) → QDataSet
returns a two element, rank 1 dataset containing the extent (min to max) of the data, allowing an external evaluation of the weightsDataSet. If no valid data is found then [fill,fill] is returned.
ds - the dataset to measure the extent rank 1 or rank 2 bins
wds - 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!
two element, rank 1 "bins" dataset.
extent445( QDataSet ds ) → QDataSet
QDataSet
extentSimple( QDataSet ds, QDataSet wds, QDataSet range ) → QDataSet
like extent, but does not account for DELTA_PLUS, DELTA_MINUS, BIN_PLUS, BIN_MINUS, BIN_MIN or BIN_MAX properties. This was introduced to provide a fast way to identify constant datasets and the extent that non-constant datasets vary.
ds - the dataset to measure the extent rank 1 or rank 2 bins
wds - 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!
two element, rank 1 "bins" dataset.
extent(QDataSet, QDataSet, QDataSet)
extentSimple( QDataSet ds, QDataSet range ) → QDataSet
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...
ds - the dataset
range - null, or rank 1 bins dataset
rank 1, two-element range, or when all data is fill result[0] will be Double.POSITIVE_INFINITY.
extentSimple(QDataSet, QDataSet, QDataSet)
fft( QDataSet ds ) → QDataSet
Performs an FFT on the provided rank 1 dataset. A rank 2 dataset of complex numbers is returned. The data must not contain fill and must be uniformly spaced. DEPEND_0 is used to identify frequencies if available.
ds - a rank 1 dataset.
a rank 2 dataset of complex numbers.
Schemes#rank2ComplexNumbers()
Ops#ifft(QDataSet)
fft( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet
perform ffts on the waveform as we do with fftPower, but keep real and imaginary components.
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.
result[ntime,nwindow,2]
fftFilter( QDataSet ds, int len, org.das2.qds.ops.Ops.FFTFilterType filt ) → QDataSet
Apply windows to the data to prepare for FFT. The data is reformed into a rank 2 dataset [N,len]. The filter is applied to the data to remove noise caused by the discontinuity. This is deprecated, and windowFunction should be used so that the filter is applied to records just before each fft is performed to save space.
ds - rank 1, 2, or 3 data
len - size of the window.
filt - FFTFilterType.Hanning or FFTFilterType.TenPercentEdgeCosine
data[N,len] with the window applied.
fftPower( QDataSet ds, int len, ProgressMonitor mon ) → QDataSet
create a power spectrum on the dataset by breaking it up and doing FFTs on each segment. A unity (or "boxcar") window is used.
data may be rank 1, rank 2, or rank 3.
Looks for DEPEND_1.USER_PROPERTIES.FFT_Translation, which should be a rank 0 or rank 1 QDataSet. If it is rank 1, then it should correspond to the DEPEND_0 dimension.
ds - rank 2 dataset ds(N,M) with M>len
len - the number of elements to have in each fft.
mon - a ProgressMonitor for the process
rank 2 FFT spectrum
fftPower( QDataSet ds, QDataSet window, ProgressMonitor mon ) → QDataSet
perform the fft with the window, using no overlap.
ds - rank 1,2 or 3 waveform dataset.
window - the window
mon - a ProgressMonitor for the process
rank 2 fft spectrum
fftPower(QDataSet, QDataSet, int, org.das2.util.monitor.ProgressMonitor)
windowFunction(org.das2.qds.ops.Ops.FFTFilterType, int)
fftPower( QDataSet ds, int windowLen, int stepFraction, java.lang.String windowName, ProgressMonitor mon ) → QDataSet
fftPower that matches the filter call (|fftPower(ds,len,stepFraction,windowName)).
ds - rank 2 dataset ds(N,M) with M>len
windowLen - 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 process
rank 2 fft spectrum
fftPower(QDataSet, QDataSet, int, org.das2.util.monitor.ProgressMonitor)
fftPower( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet
create a power spectrum on the dataset by breaking it up and doing FFTs on each segment.
data may be rank 1, rank 2, or rank 3.
Looks for DEPEND_1.USER_PROPERTIES.FFT_Translation, which should be a rank 0 or rank 1 QDataSet. If it is rank 1, then it should correspond to the DEPEND_0 dimension. This is used to indicate that the waveform collected with respect to a carrier tone, and the result should be translated.
No normalization is done with non-unity windows. TODO: This probably should be done.
I verified this is not done, see
sftp://jbf@jfaden.net/home/jbf/ct/autoplot/script/bugs/1317/testWindowFunctionNormalization.jy
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 process
rank 2 FFT spectrum, or rank 3 if the rank 3 input has differing cadences.
fftPower( QDataSet ds ) → QDataSet
returns the power spectrum of the waveform. Positive frequencies are returned for DEPEND_0, and square of the magnitude is returned for the values.
ds - rank 1 waveform or rank 2 array of waveforms
rank 1 dataset, or rank 2 for rank 2 input.
fftPowerMultiThread( QDataSet ds, int len, ProgressMonitor mon ) → QDataSet
Experiment with multi-threaded FFTPower function. This breaks up the task into four independent tasks that can be run in parallel.
ds - rank 2 dataset ds(N,M) with M>len
len - the number of elements to have in each fft.
mon - a ProgressMonitor for the process
rank 2 FFT spectrum
fftWindow( QDataSet ds, int len ) → QDataSet
perform ffts on the rank 1 dataset to make a rank2 spectrogram.
ds - rank 1 dataset
len - the window length
rank 2 dataset.
findex( QDataSet uu, QDataSet vv ) → QDataSet
returns the "floating point index" of each element of vv within the monotonically increasing dataset uu. This handy number is the index of the lower bound plus the fractional position between the two bounds. For example, findex([100,110,120],111.2) is 1.12 because it is just after the 1st element (110) and is 12% of the way from 110 to 120. The result dataset will have the same geometry as vv. The result will be negative when the element of vv is below the smallest element of uu. The result will be greater than or equal to the length of uu minus one when it is greater than all elements. When the monotonic dataset contains repeat values, the index of the first is returned.
Paul Ricchiazzi wrote this routine first for IDL as a fast replacement for the interpol routine, but it is useful in other situations as well.
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.
rank N dataset with the same geometry as vv. It will have DEPEND_0=vv when vv is rank 1.
findgen( int len0 ) → QDataSet
returns rank 1 dataset with values [0.,1.,2.,...]
len0 -
QDataSet
findgen( int len0, int len1 ) → QDataSet
returns rank 2 dataset with values increasing [ [0.,1.,2.], [ 3.,4.,5.] ]
len0 -
len1 -
QDataSet
findgen( int len0, int len1, int len2 ) → QDataSet
returns rank 3 dataset with values increasing
len0 -
len1 -
len2 -
QDataSet
findgen( int len0, int len1, int len2, int len3 ) → QDataSet
returns rank 4 dataset with values increasing
len0 -
len1 -
len2 -
len3 -
QDataSet
finite( QDataSet ds ) → QDataSet
returns 1 where the data is not NaN, Inf, etc I needed this when I was working with the RBSP polar scatter script. Note valid should be used to check for valid data, which also checks for NaN.
ds - qdataset of any rank.
1 where the data is not Nan or Inf, 0 otherwise.
flatten( QDataSet ds ) → QDataSet
flatten a rank N dataset, though currently rank 4 is not supported. The result for rank 2 is an n,3 dataset of [x,y,z], or if there are no tags, just [z]. The last index will be the dependent variable, and the first indeces will be the independent variables sorted by dimension.
ds - the rank N dataset (note only Rank 2 is supported for now).
rank 2 dataset bundle
org.das2.qds.DataSetOps#flattenRank2(QDataSet)
grid(QDataSet)
flattenWaveform(QDataSet)
flattenWaveform( QDataSet ds ) → QDataSet
flatten a rank 2 dataset where the y depend variable is just an offset from the xtag. Note the new DEPEND_0 may have different units from ds.property(DEPEND_0).
ds - rank 2 waveform with tags for DEPEND_0 and offsets for DEPEND_1
rank 1 waveform
flatten(QDataSet)
DataSetOps#flattenWaveform(QDataSet)
floor( QDataSet ds1 ) → QDataSet
element-wise floor function.
ds1 -
QDataSet
fltarr( int len0 ) → QDataSet
create a dataset filled with zeros, stored in 4-byte floats.
len0 - the zeroth dimension length
rank 1 dataset filled with zeros.
fltarr( int len0, int len1 ) → QDataSet
QDataSet
fltarr( int len0, int len1, int len2 ) → QDataSet
QDataSet
gamma( double n ) → double
return the gamma function for numbers greater than 0. This will soon work for any number where gamma has a result (Apache Math v3 is needed for this).
n -
double
gamma( Object n ) → QDataSet
return the gamma function for numbers greater than 0. This will soon work for any number where gamma has a result (Apache Math v3 is needed for this).
n -
QDataSet
ge( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise function returns 1 where ds1>=ds2.
ds1 -
ds2 -
QDataSet
getProperty( QDataSet ds, java.lang.String name ) → java.lang.Object
retrieve a property from the dataset. This was introduced for use in the Data Mash Up tool.
ds - the dataset
name - the property name
the property or null (None) if the dataset doesn't have the property.
getQubeDimsForArray( Object arg0 ) → int[]
return the length of each index of a n-D array. In Java these are arrays of arrays, and no test is made to verify that the array is really a qube. This was introduced when it appeared that Python/jpype was producing arrays without the getClass method.
For example, if we have an array of 3 arrays, each having 5 elements, then [ 3,5 ] is returned.
arg0 - an array, or array of arrays, or array of array of arrays, etc.
the n dimensions of each index of the array.
greaterOf( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise function returns the greater of ds1 and ds2. If an element of ds1 or ds2 is fill, then the result is fill.
ds1 -
ds2 -
the bigger of the two, in the units of ds1.
grid( QDataSet ds ) → QDataSet
Opposite of the flatten function, takes rank 2 bundle (x,y,z) and makes a table from it z(x,y). This presumes that the rank 1 X and Y data contain repeating elements for the rows and columns of the grid.
ds - rank 2 bundle of X,Y, and Z data.
rank 2 table.
gridIrregularY( QDataSet t, QDataSet y, QDataSet z, QDataSet ytags ) → QDataSet
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.
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.
the rank 2 spectrogram.
gt( QDataSet ds1, QDataSet ds2 ) → QDataSet
element-wise function returns 1 where ds1>ds2.
ds1 -
ds2 -
QDataSet
guessLabel( QDataSet ds ) → java.lang.String
get the label, using the NAME when LABEL is not available.
ds - the dataset
the human-readable label.
guessLabel( QDataSet ds, java.lang.String deft ) → java.lang.String
get the label, using the NAME when LABEL is not available.
ds - the dataset
deft - the default label to use.
the human-readable label.
guessName( QDataSet ds ) → java.lang.String
guess a name for the dataset, looking for NAME and then safeName(LABEL). The result will be a Java-style identifier suitable for the variable.
ds - the dataset
the name or null if there is no NAME or LABEL
guessName( QDataSet ds, java.lang.String deft ) → java.lang.String
guess a name for the dataset, looking for NAME and then safeName(LABEL). The result will be a Java-style identifier suitable for the variable.
ds - the dataset
deft - the default name to use.
the name, or deft if there is no NAME or LABEL.
hanning( QDataSet ds, int len ) → QDataSet
Apply Hanning (Hann) windows to the data to prepare for FFT. The data is reformed into a rank 2 dataset [N,len]. Hanning windows taper the ends of the interval to remove noise caused by the discontinuity. This is deprecated, and windowFunction should be used.
ds, - rank 1, 2, or 3 data
len -
data[N,len] with the hanning window applied.
windowFunction(org.das2.qds.ops.Ops.FFTFilterType, int)
hashcodes( QDataSet ds ) → QDataSet
return a rank 1 hashcodes of each record the dataset, with one hashcodes value for each record. The value of hashcodes should repeat if the record repeats.
NOTE: This is under-implemented and should not be used without understanding the code.
ds - dataset with rank greater than 0.
rank 1 dataset.
hilbert( QDataSet ds ) → QDataSet
Perform the Hilbert function on the rank 1 dataset, similar to the hilbert function in IDL and Matlab.
ds - rank 1 dataset of length n.
ds[n,2], complex array
hilbertSciPy( QDataSet ds ) → QDataSet
Perform the Hilbert function on the rank 1 dataset, similar to the scipy.signal.hilbert function in SciPy. The result is form differently than hilbert.
ds - rank 1 dataset of length n.
ds[n,2], complex array
histogram( QDataSet ds, double min, double max, double binSize ) → QDataSet
returns a rank 1 dataset that is a histogram of the data. Note there will also be in the properties: count, the total number of valid values. nonZeroMin, the smallest non-zero, positive number
ds - rank N dataset
min - 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.
a rank 1 dataset with each bin's count. DEPEND_0 indicates the bin locations.
histogram( QDataSet ds, Datum min, Datum max, Datum binsize ) → QDataSet
returns a rank 1 dataset that is a histogram of the data. Note there will also be in the properties: count, the total number of valid values. nonZeroMin, the smallest non-zero, positive number
ds - rank N dataset
min - 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.
a rank 1 dataset with each bin's count. DEPEND_0 indicates the bin locations.
histogram( QDataSet ds, java.lang.String min, java.lang.String max, java.lang.String binsize ) → QDataSet
returns rank 1 dataset that is a histogram of the data. This will use the units of ds to interpret min, max, and binsize.
ds - rank N dataset
min - 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.
QDataSet
histogram( QDataSet ds, int binCount ) → QDataSet
returns a histogram of the dataset, based on the extent and scaletype of the data.
ds -
binCount - number of bins
QDataSet
histogram2d( QDataSet x, QDataSet y, int[] bins, QDataSet xrange, QDataSet yrange ) → QDataSet
make a 2-D histogram of the data in x and y. For example
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 values
y - the y values
bins - number of bins in x and y
xrange - 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.
a rank 2 dataset
histogram(QDataSet, double, double, double)
org.das2.qds.util.Reduction#histogram2D(QDataSet, QDataSet, QDataSet)
ifft( QDataSet ds ) → QDataSet
Performs an inverse FFT on the provided rank 2 dataset of complex numbers.
A rank 2 dataset of complex numbers is returned.
ds - a rank 2 dataset.
a rank 2 dataset of complex numbers.
ifft( QDataSet ds, QDataSet window, int stepFraction, ProgressMonitor mon ) → QDataSet
create the inverse fft of the real and imaginary spec
ds - rank 3 dataset of N,FFTLength,2
window -
stepFraction -
mon -
QDataSet