imax
imax( QDataSet ds ) → int
return the index of the maximum value. This is to avoid inefficient
code like "where(slice.eq( max(slice) ))[0]"
Parameters
ds - rank 1 dataset
Returns:
the index of the maximum value, or -1 if the data is all fill.
search for examples
view on GitHub
view source
imin
imin( QDataSet ds ) → int
return the index of the minimum value. This is to avoid inefficient
code like "where(slice.eq( min(slice) ))[0]"
Parameters
ds - rank 1 dataset
Returns:
the index of the maximum value, or -1 if the data is all fill.
search for examples
view on GitHub
view source
indgen
indgen( int len0 ) → QDataSet
returns rank 1 dataset with values [0,1,2,...]
This returns an immutable dataset, so that it can
be used in Jython like so: for i in indgen(200000). Note before
February 2018, this would return a mutable dataset, and now
this returns an IndexGenDataSet, which is immutable.
Parameters
len0 -
Returns:
org.das2.qds.QDataSet
search for examples
view on GitHub
view source
intarr
intarr( int len0 ) → QDataSet
create a dataset filled with zeros, stored in 4-byte ints.
Parameters
len0 - the zeroth dimension length
Returns:
rank 1 dataset filled with zeros.
See Also:
Ops_z.md#zeros(int)
Ops_d.md#dblarr(int)
search for examples
view on GitHub
view source
interpolateGrid
interpolateGrid( QDataSet vv, QDataSet findex0, QDataSet findex1 ) → QDataSet
interpolate values from rank 2 dataset vv using fractional indeces
in rank N findex, using bilinear interpolation. Here the two rank1
indexes form a grid and the result is rank 2.
Parameters
vv - rank 2 dataset.
findex0 - rank 1 dataset of fractional indeces for the zeroth index.
findex1 - rank 1 dataset of fractional indeces for the first index.
Returns:
rank 2 dataset
See Also:
Ops_f.md#findex findex, the 1-D findex command findex, the 1-D findex command
search for examples
view on GitHub
view source
interpolateMod
interpolateMod( QDataSet vv, QDataSet mod, QDataSet findex ) → QDataSet
like interpolate, but the findex is recalculated when the two bracketed points are closer in the
modulo space than they would be in the linear space.
Parameters
vv - rank 1 dataset that is the data to be interpolated. (e.g. longitude from 0 to 360deg)
mod - rank 0 dataset that is the mod of the space (e.g. 360deg), or rank 1 where the range is specified (e.g. -180 to 180).
findex - rank N dataset of fractional indeces. This must be dimensionless and is typically calculated by the findex command.
Returns:
the result, a rank 1 dataset with one element for each findex.
See Also:
interpolate(QDataSet,QDataSet)
search for examples
view on GitHub
view source
isAngleRange
isAngleRange( QDataSet ds, boolean strict ) → Double
return true if the dataset can be interpreted as radian degrees from 0 to PI or from 0 to 2*PI.
Parameters
ds - any QDataSet.
strict - return null if it's not clear that the units are degrees.
Returns:
the multiplier to make the dataset into radians, or null.
search for examples
view on GitHub
view source
isSafeName
isSafeName( String name ) → boolean
returns true if the name is a Java-style identifier, starting
with one of a-z, A-Z, or _; followed by a-z, A-Z, 0-9, or _; and
note that only ASCII characters are allowed.
Parameters
name -
Returns:
true if the name is a safe identifier name.
search for examples
view on GitHub
view source