ceil

ceil( QDataSet ds1 ) → QDataSet

element-wise ceil function.

Parameters

ds1 - a QDataSet

Returns:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]

ceil( double x ) → double
ceil( Object x ) → QDataSet

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:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]


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

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

Returns:

QDataSet that when plotted is a circle.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

circle( double radius, double x, double y ) → QDataSet
circle( QDataSet radius ) → QDataSet
circle( double dradius ) → QDataSet
circle( String sradius ) → QDataSet

cleanData

cleanData( QDataSet ds ) → QDataSet

remove the data which is 3 sigmas from the mean of the data.

Parameters

ds - rank 1 dataset.

Returns:

cleaned dataset of the same geometry.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

cleanData( QDataSet ds, int size ) → QDataSet
cleanData( QDataSet ds, double nsigma, int size ) → QDataSet

clearWritable

clearWritable( org.das2.qds.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 - a WritableDataSet

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


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 - a QDataSet
st - the start index
en - the non-inclusive end index

Returns:

the averaged dataset

[search for examples] [view on GitHub] [view on old javadoc] [view source]

collapse0( QDataSet fillDs ) → QDataSet

collapse0R4

collapse0R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the zeroth index.

Parameters

ds - rank 4 dataset
mon - a ProgressMonitor

Returns:

rank 3 dataset

See Also:

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


[search for examples] [view on GitHub] [view on old javadoc] [view source]


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 - a QDataSet

Returns:

the averaged dataset

[search for examples] [view on GitHub] [view on old javadoc] [view source]


collapse1R4

collapse1R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the first index.

Parameters

ds - rank 4 dataset
mon - a ProgressMonitor

Returns:

rank 3 dataset

See Also:

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


[search for examples] [view on GitHub] [view on old javadoc] [view source]


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 - a QDataSet

Returns:

the averaged dataset

[search for examples] [view on GitHub] [view on old javadoc] [view source]


collapse2R4

collapse2R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the second index.

Parameters

ds - rank 4 dataset
mon - a ProgressMonitor

Returns:

rank 3 dataset

See Also:

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


[search for examples] [view on GitHub] [view on old javadoc] [view source]


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 - a QDataSet

Returns:

the averaged dataset

[search for examples] [view on GitHub] [view on old javadoc] [view source]


collapse3R4

collapse3R4( QDataSet ds, ProgressMonitor mon ) → QDataSet

Collapse the rank 4 dataset on the third index.

Parameters

ds - rank 4 dataset
mon - a ProgressMonitor

Returns:

rank 3 dataset

See Also:

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


[search for examples] [view on GitHub] [view on old javadoc] [view source]


colorFromString

colorFromString( String sval ) → Color

return the color encoded as one of:

Parameters

sval - the string representation

Returns:

the color

[search for examples] [view on GitHub] [view on old javadoc] [view source]


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(QDataSet, QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


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()


[search for examples] [view on GitHub] [view on old javadoc] [view source]


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(QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


concatenate

Deprecated: use append instead. concatenate( Object ds1, Object ds2 ) → 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:

a QDataSet

[search for examples] [view on GitHub] [view on old javadoc] [view source]

contour( Object tds, Object vv ) → QDataSet

convertPropertyValue

convertPropertyValue( QDataSet context, String name, Object value ) → 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


[search for examples] [view on GitHub] [view on old javadoc] [view source]


convertToString

convertToString( QDataSet bytes ) → String

convert the bytes (or unicode up to 2**16) to a string.

Parameters

bytes - a QDataSet containing the data.

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]


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.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

convertUnitsTo( DatumRange dr, Units u ) → DatumRange
convertUnitsTo( Datum d, Units u ) → Datum

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 - a QDataSet

Returns:

a copy of src.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


copyIndexedProperties

copyIndexedProperties( QDataSet srcds, org.das2.qds.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 (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


copyProperties

copyProperties( QDataSet ds ) → 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(QDataSet)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


copysign

copysign( QDataSet magnitude, QDataSet sign ) → QDataSet

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

Parameters

magnitude - a QDataSet
sign - a QDataSet

Returns:

a QDataSet

See Also:

signum
negate


[search for examples] [view on GitHub] [view on old javadoc] [view source]

copysign( double x, double y ) → double
copysign( Object x, Object y ) → QDataSet

cos

cos( QDataSet ds ) → QDataSet

element-wise cos.

Parameters

ds - the angles in radians or degrees, and data without units are treated as radians.

Returns:

the cos of the angles

[search for examples] [view on GitHub] [view on old javadoc] [view source]

cos( double ds ) → double
cos( Object ds ) → QDataSet

cosh

cosh( QDataSet ds ) → QDataSet

element-wise hyperbolic cosine

Parameters

ds - the data

Returns:

the hyperbolic cosine of each element of ds

See Also:

Math#cosh(double)


[search for examples] [view on GitHub] [view on old javadoc] [view source]

cosh( double ds ) → double
cosh( Object ds ) → QDataSet

createEvent

createEvent( String timeRange, int rgbcolor, 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 ]]

See Also:

eventsComplement(QDataSet, int, java.lang.String)


[search for examples] [view on GitHub] [view on old javadoc] [view source]

createEvent( QDataSet append, String timeRange, int rgbcolor, String annotation ) → QDataSet
createEvent( DatumRange dr, int rgbcolor, String annotation ) → QDataSet
createEvent( QDataSet append, DatumRange dr, int rgbcolor, String annotation ) → 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 ) ]

[search for examples] [view on GitHub] [view on old javadoc] [view source]

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

createPolyMesh

createPolyMesh( QDataSet append, QDataSet xy ) → QDataSet

create or append to a polyMesh, adding the points from rank 2 bundle xy. The polyMesh scheme will assume that point xy[0] can be connected to point xy[-1].

Parameters

append - a QDataSet
xy - the rank 2 bundle of x and y values

Returns:

a polyMesh

See Also:

createEvent(QDataSet, org.das2.datum.DatumRange, int, java.lang.String)


[search for examples] [view on GitHub] [view on old javadoc] [view source]


crossProduct

crossProduct( QDataSet a, QDataSet b ) → QDataSet

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. In the case where only X and Y are provided (two-element vectors instead of three), then Z is automatically assumed to be zero.

Parameters

a - rank 1 ds[3] or rank 2 ds[n,3]
b - rank 1 ds[3] or rank 2 ds[n,3]

Returns:

ds[3] or rank 2 ds[n,3]

[search for examples] [view on GitHub] [view on old javadoc] [view source]


cubicRoot

cubicRoot( QDataSet coefficients ) → QDataSet

Solves each of a set of cubic equations of the form: a*x^3 + b*x^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.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

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

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

[search for examples] [view on GitHub] [view on old javadoc] [view source]


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

[search for examples] [view on GitHub] [view on old javadoc] [view source]