## polarToCartesian

polarToCartesian( QDataSet ds ) → QDataSet

converts a rank 2 bundle of polar data, where ds[:,0] are the radii and ds[:,1] are the angles. Any additional bundled datasets are left alone.

### Parameters

ds - where ds[:,0] are the radii, and ds[:,1] are the angles

### Returns:

bundle of X, Y, and remaining data.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## polyCenters

polyCenters( QDataSet polyMesh ) → QDataSet

return an array of the centers of each triangle in the triangle mesh.

### Parameters

polyMesh - a QDataSet

### Returns:

rank 2 ds[n,2].

### See Also:

Schemes#triangleMesh()
Schemes#polyMesh()
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pow

pow( QDataSet ds1, QDataSet pow ) → QDataSet

element-wise pow (** in FORTRAN, ^ in IDL) of two datasets with the compatible geometry.

### Parameters

ds1 - the base
pow - the exponent

### Returns:

the value ds1**pow
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pow

pow( long x, long y ) → long

for Jython, we define this because the doubles aren't coerced. Note that pow(2,4) returns a long, not an int like Python 2.6.5

### Parameters

x - the base
y - the exponent

### Returns:

the value x**y
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pow

pow( double x, double y ) → double

for Jython, we define this because the doubles aren't coerced. Note that pow(2,4) returns a long, not an int like Python 2.6.5

### Parameters

x - the base
y - the exponent

### Returns:

the value x**y
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## pow

pow( Object ds1, Object pow ) → QDataSet

element-wise pow (** in FORTRAN, ^ in IDL) of two datasets with the same geometry.

### Parameters

ds1 - the base
pow - the exponent

### Returns:

the value ds1**pow
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## putBundleProperty

putBundleProperty( QDataSet ds, String name, int index, Object value ) → org.das2.qds.MutablePropertyDataSet

Like putIndexedProperty, but manages the bundle for the client. This was introduced to make it easier to work with bundles. This converts types often seen in Jython and Java codes to the correct type. For example, ds= putBundleProperty( ds, 'UNITS', 0, 'seconds since 2012-01-01'). The dataset may be copied to make it mutable. If the bundle descriptor dataset is not found, it is added, making the rank 2 dataset a bundle.

### Parameters

ds - the rank 1 or rank 2 bundle dataset to which the property is to be set.
name - the property name
index - the property index
value - the property value, which can converted to the proper type.

### Returns:

the dataset, possibly converted to a mutable dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## putIndexedProperty

putIndexedProperty( QDataSet ds, String name, int index, Object value ) → org.das2.qds.MutablePropertyDataSet

Like putProperty, but this inserts the value at the index. This was introduced to make it easier to work with bundles. This converts types often seen in Jython and Java codes to the correct type. For example, bds= putProperty( bds, 'UNITS', 0, 'seconds since 2012-01-01'). The dataset may be copied to make it mutable.

### Parameters

ds - the dataset to which the property is to be set.
name - the property name
index - the property index
value - the property value, which can converted to the proper type.

### Returns:

the dataset, possibly converted to a mutable dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## putProperty

putProperty( Object ds, String name, Object value ) → org.das2.qds.MutablePropertyDataSet

converts types often seen in Jython and Java codes to the correct type. For example,

    ds= putProperty( [1400,2800], 'UNITS', 'seconds since 2012-01-01')

will convert the string 'seconds since 2012-01-01' into a Unit before assigning it to the dataset.

### Parameters

ds - the object which can be interpreted as a dataset, such as a number or array of numbers.
name - the property name
value - the property value, which can converted to the proper type.

### Returns:

the dataset, possibly converted to a mutable dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## putProperty

putProperty( QDataSet ds, String name, Object value ) → org.das2.qds.MutablePropertyDataSet

converts types often seen in Jython and Java codes to the correct type. For example, ds= putProperty( ds, 'UNITS', 'seconds since 2012-01-01'). The dataset may be copied to make it mutable.

### Parameters

ds - the dataset to which the property is to be set.
name - the property name
value - the property value, which can converted to the proper type.

### Returns:

the dataset, possibly converted to a mutable dataset.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## putValues

putValues( Object ds, Object indices, Object values ) → org.das2.qds.WritableDataSet

like putProperty, but this inserts values into the dataset. If the dataset is not mutable, then this will make a copy of the data and return the copy.

### Parameters

ds - the rank 1 or greater dataset
indices - rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.
values - null for fill, or the rank 0 value or rank 1 values to assign.

### Returns:

the dataset with the indices assigned new values.

### See Also:

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

## putValues

putValues( QDataSet ds, QDataSet indices, QDataSet value ) → org.das2.qds.WritableDataSet

like putProperty, but this inserts values into the dataset. If the dataset is not mutable, then this will make a copy of the data and return the copy.

### Parameters

ds - the rank 1 or greater dataset
indices - rank 1 indices when ds is rank 1, or rank 2 [:,m] indices for a rank m dataset.
value - null for fill, or the rank 0 value or rank 1 values to assign.

### Returns:

the dataset with the indices assigned new values.

### See Also:

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