## taggen

taggen( double base, double dcadence, int len0, Units units ) → org.das2.qds.MutablePropertyDataSet

creates tags. First tag will be start and they will increase by cadence. Units specifies the units of each tag.

### Parameters

base - a double
dcadence - a double
len0 - an int
units - an Units

### Returns:

an org.das2.qds.MutablePropertyDataSet
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## tan

tan( QDataSet ds ) → QDataSet

element-wise trigonometric tangent (tan) function

### Parameters

ds - the angles for the values in radians or degrees

### Returns:

the tangent of each angle

### See Also:

Math#tan(double)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## tan

tan( double ds ) → double

return the trigonometric tangent of the real number in radians.

### Parameters

ds - the angle in radians

### Returns:

the tan in radians
[search for examples] [view on GitHub] [view on old javadoc] [view source]
tan( Object ds ) → QDataSet [view source]

## tanh

tanh( QDataSet ds ) → QDataSet

element-wise tanh.

### Parameters

ds - a QDataSet

### Returns:

a QDataSet
[search for examples] [view on GitHub] [view on old javadoc] [view source]
tanh( double ds ) → double [view source]
tanh( Object ds ) → QDataSet [view source]

## timeShift

timeShift( QDataSet ds, Datum delta ) → QDataSet

Shift the DEPEND_0 or the time column of a rank 2 dataset by the amount. For example, to compare two time series recorded with times from different time zones.

### Parameters

ds - the data which is a time series.
delta - the amount to add to each timetag.

### Returns:

data in the same form but with the times shifted.

### See Also:

Schemes#isTimeSeries(QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## timegen

timegen( String baseTime, String cadence, int len0 ) → QDataSet

returns rank 1 dataset with values that are times.

### Parameters

baseTime - e.g. "2003-02-04T00:00"
cadence - e.g. "4.3 sec" "1 day"
len0 - the number of elements.

### Returns:

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

## toDegrees

toDegrees( QDataSet ds ) → QDataSet

convert the data to degrees by multiplying each element by 180/PI. This does not check the units of the data, but a future version might.

### Parameters

ds - values in radians

### Returns:

the data in degrees
[search for examples] [view on GitHub] [view on old javadoc] [view source]
toDegrees( Object ds ) → QDataSet [view source]

## toRadians

toRadians( QDataSet ds ) → QDataSet

convert the data to radians by multiplying each element by PI/180. This does not check the units of the data, but a future version might.

### Parameters

ds - data values in degrees

### Returns:

the data in radians
[search for examples] [view on GitHub] [view on old javadoc] [view source]
toRadians( Object ds ) → QDataSet [view source]

## toTimeDataSet

toTimeDataSet( QDataSet years, QDataSet mons, QDataSet days, QDataSet hour, QDataSet minute, QDataSet second, QDataSet nano ) → QDataSet

return a rank 1 dataset of times. All inputs should be rank 1 dataset, rank 0 (number) or null (None).

### Parameters

years - the years. (2010) Less than 100 is interpreted as 19xx.
mons - the months (1..12), or null. If null, then days are day of year. These are interpreted as integers
days - the day of month (1..28) or day of year. This may be fractional.
hour - null or the hours of the day.
minute - null or the minutes of the day
second - null or the seconds of the day
nano - null or the nanoseconds (1e-9) of the day

### Returns:

rank 1 time data set.

### See Also:

rgbColorDataset(QDataSet, QDataSet, QDataSet)
https://github.com/autoplot/dev/blob/master/bugs/2025/20250714/demoBugToTimeDataSet.jy
[search for examples] [view on GitHub] [view on old javadoc] [view source]
toTimeDataSet( Object years, Object mons, Object days, Object hour, Object minute, Object second, Object nano ) → QDataSet [view source]

## total

total( QDataSet ds ) → double

return the total of all the elements in the dataset. If there are invalid measurements, then fill is returned. Does not support BINS or BUNDLE dimensions.

### Parameters

ds - a QDataSet

### Returns:

the unweighted total of the dataset, or -1e31 if fill was encountered.

### See Also:

total(QDataSet, int) total, which should be used instead.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## total

total( QDataSet ds, ProgressMonitor mon ) → double

return the total of all the elements in the dataset. If there are invalid measurements, then fill is returned. Does not support BINS or BUNDLE dimensions.

### Parameters

ds - a QDataSet
mon - progress monitor

### Returns:

the unweighted total of the dataset, or -1e31 if fill was encountered.

### See Also:

total(QDataSet, int, org.das2.util.monitor.ProgressMonitor) total, which should be used instead.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## total

total( Object ds1 ) → double

return the total of all the elements in the object which can be converted to a dataset.

### Parameters

ds1 - the object which can be converted to a dataset.

### Returns:

a double

### See Also:

total(QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## total

total( QDataSet ds, int dim ) → QDataSet

reduce the dataset's rank by totaling all the elements along a dimension. Only QUBEs are supported presently.

### Parameters

ds - rank N qube dataset. N=1,2,3,4
dim - zero-based index number.

### Returns:

rank N-1 dataset.

### See Also:

total(QDataSet) total(ds) total, which is an earlier deprecated routine.
reduceSum(QDataSet, int) reduceSum, which skips invalid data.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## total

total( QDataSet ds, int dim, ProgressMonitor mon ) → QDataSet

reduce the dataset's rank by totaling all the elements along a dimension. Only QUBEs are supported presently.

### Parameters

ds - rank N qube dataset. N=1,2,3,4
dim - zero-based index number.
mon - progress monitor.

### Returns:

the rank N-1 qube dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## transpose

transpose( QDataSet ds ) → QDataSet

transpose the rank 2 or rank 1 dataset. result[i,j]= ds[j,i] for each i,j; or in the case of rank 1, the DEPEND_0 (x) becomes a dependent on the data (y).

### Parameters

ds - rank 2 dataset

### Returns:

rank 2 dataset
[search for examples] [view on GitHub] [view on old javadoc] [view source]
transpose( Object ds ) → QDataSet [view source]

## triangulate

triangulate( QDataSet xx, QDataSet yy ) → QDataSet

return a triangle tesselation of the space identified by rank 1 xx and yy.

### Parameters

xx - rank 1 dataset
yy - rank 1 dataset

### Returns:

rank 2 ds[n,3] dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim

trim( QDataSet ds, int st, int en ) → QDataSet

trim the dataset to the indices on the zeroth dimension. Note the trim function can also be called directly.

### Parameters

ds - the dataset to be trimmed.
st - the start index
en - the non-inclusive end index

### Returns:

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

## trim

trim( QDataSet ds, DatumRange dr ) → QDataSet

return the trim of the dataset ds where its DEPEND_0 (typically xtags) are within the range dr.

### Parameters

ds - a rank 1 or greater dataset
dr - a range in the same units as ds

### Returns:

the subset of the data.

### See Also:

trim(QDataSet, QDataSet, QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim

trim( QDataSet ds, Object odr ) → QDataSet

return the trim of the dataset ds where its DEPEND_0 (typically xtags) are within the range dr.

### Parameters

ds - a rank 1 or greater dataset
odr - an object which can be interpretted as a range.

### Returns:

the subset of the data.

### See Also:

trim(QDataSet, QDataSet, QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim

trim( QDataSet ds, QDataSet st, QDataSet en ) → QDataSet

return the trim of the dataset ds where its DEPEND_0 (typically xtags) are within the range dr. For example, if ds was 7-days from 2014-01-01 through 2014-01-07, and st=2014-01-02 and en=2014-01-03 then just the records collected on this one day would be returned.

### Parameters

ds - the dataset to be trimmed, with a rank 1 monotonic DEPEND_0.
st - rank 0 min value
en - rank 0 max value

### Returns:

the subset of the data.

### See Also:

slice0(QDataSet, QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim

trim( int dim, QDataSet ds, int st, int en ) → QDataSet

trim the qube dataset on any of its indices, for example ds[:,:,5:10] would use this operation.

### Parameters

dim - the index (0, 1, 2, 3, or 4) on which to trim.
ds - the dataset, which must be a qube.
st - the first index, inclusive
en - the last index, exclusive

### Returns:

the trimmed dataset with same number of dimensions and fewer indices in one dimension.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim

trim( int dim, QDataSet ds, QDataSet st, QDataSet en ) → QDataSet

trim the qube dataset on any of its indices, for example ds[:,:,5:10] would use this operation.

### Parameters

dim - the index (0, 1, 2, 3, or 4) on which to trim.
ds - the dataset, which must be a qube.
st - rank 0 min value
en - rank 0 max value

### Returns:

the trimmed dataset with same number of dimensions and fewer indices in one dimension.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim1

trim1( QDataSet ds, QDataSet st, QDataSet en ) → QDataSet

return the trim of the dataset ds where its DEPEND_1 (typically ytags) are within the range dr. For example, if ds was frequencies from 10 Hz to 1e8 Hz, trim1( ds, 100Hz, 1000Hz ) would return just the data in this range.

### Parameters

ds - the dataset to be trimmed, with a rank 1 monotonic DEPEND_1.
st - rank 0 min value
en - rank 0 max value

### Returns:

the subset of the data.

### See Also:

slice1(QDataSet, QDataSet)
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## trim1

trim1( QDataSet ds, int st, int en ) → QDataSet

trim on the first (not zeroth) dimension. This is to help with unbundling the timeranges from an events dataset.

### Parameters

ds - the dataset, rank 2 or greater
st - the first index
en - the last index, exclusive.

### Returns:

the trimmed dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]