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

ceil( double x ) → double

Parameters

x - a double

Returns:

double

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


ceil

ceil( Object x ) → QDataSet

Parameters

x - an Object

Returns:

org.das2.qds.QDataSet

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


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

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

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

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.

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


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 - a real number representing the dimensionless radius

Returns:

QDataSet that when plotted is a circle.

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


circle

circle( 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.

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


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

cleanData( QDataSet ds, int size ) → QDataSet

remove the data which is N sigmas (stddev) from the mean. This is to replicate the "clean_data" function used by CDAWeb at NASA/Goddard.

Parameters

ds - rank 1 dataset.
size - size for a boxcar, or -1 for the whole dataset.

Returns:

cleaned dataset of the same geometry.

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


cleanData

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

remove the data which is N sigmas (stddev) from the mean.

Parameters

ds - rank 1 dataset.
nsigma - remove data more than this many stddevs from mean.
size - size for a boxcar, or -1 for the whole dataset.

Returns:

cleaned dataset of the same geometry.

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


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

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

Returns:

the averaged dataset

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


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 ) → java.awt.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] or ds[n,m,2]

Returns:

ds[2] or ds[n,2] or ds[n,m,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

concatenate( Object ds1, Object ds2 ) → QDataSet

Parameters

ds1 - an Object
ds2 - an Object

Returns:

org.das2.qds.QDataSet

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


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

contour( Object tds, Object vv ) → QDataSet

Parameters

tds - an Object
vv - an Object

Returns:

org.das2.qds.QDataSet

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


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. y= ytags(spectrogramds) y= convertUnitsTo( y, Units.Hz ) spectrogramDs= link( xtags( spectrogramDs ), y, spectrogramDs )

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

convertUnitsTo( DatumRange dr, Units u ) → DatumRange

convert the datumRange to the given units, which must be convertible. For example: y= ytags(spectrogramds) y= convertUnitsTo( y, Units.Hz ) spectrogramDs= link( xtags( spectrogramDs ), y, spectrogramDs )

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'

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


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'

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


copy

copy( QDataSet src ) → org.das2.qds.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 ) → 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(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

copysign( double x, double y ) → double

Parameters

x - a double
y - a double

Returns:

double

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


copysign

copysign( Object x, Object y ) → QDataSet

Parameters

x - an Object
y - an Object

Returns:

org.das2.qds.QDataSet

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


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

cos( double ds ) → double

return the cos of the real number, which is to be in radians.

Parameters

ds - the angle in radians

Returns:

the cos of the angle

See Also:

Math#cos(double)


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


cos

cos( Object ds ) → QDataSet

Parameters

ds - an Object

Returns:

org.das2.qds.QDataSet

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


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

cosh( double ds ) → double

Parameters

ds - a double

Returns:

double

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


cosh

cosh( Object ds ) → QDataSet

Parameters

ds - an Object

Returns:

org.das2.qds.QDataSet

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


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

createEvent( QDataSet append, String timeRange, int rgbcolor, 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" or "64-96"
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 ]]

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


createEvent

createEvent( DatumRange dr, int rgbcolor, String annotation ) → QDataSet

tool for creating ad-hoc events datasets.

Parameters

dr - a datum range like "1496 to 1627"
rgbcolor - and RGB color like 0xFF0000 (red), 0x00FF00 (green), or 0x0000FF (blue),
annotation - label for event, possibly including granny codes.

Returns:

a rank 2 QDataSet with [[ start, stop, rgbColor, annotation ]]

See Also:

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


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


createEvent

createEvent( QDataSet append, DatumRange dr, int rgbcolor, 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 ]]

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


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

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; time, stopTime, rgbColor, label ]

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


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] or rank 3 ds[m,n,3]
b - rank 1 ds[3] or rank 2 ds[n,3] or rank 3 ds[m,n,3]

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

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

Enter the coefficients for a cubic of the form: a*x^3 + b*x^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.

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


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]