Functions which operate on array-valued cells. The array parameters of these functions can only be used on values which are already arrays (usually, numeric arrays). In most cases that means on values in table columns which are declared as array-valued. FITS and VOTable tables can have columns which contain array values, but other formats such as CSV cannot.
If you want to calculate aggregating functions like sum, min, max etc
on multiple values which are not part of an array,
it's easier to use the functions from the Lists class.
Note that none of these functions will calculate statistical functions over a whole column of a table.
The functions fall into a number of categories:
size,
count,
countTrue,
maximum,
minimum,
sum,
mean,
median,
quantile,
stdev,
variance,
join.
add,
subtract,
multiply,
divide,
reciprocal,
condition.
array,
which lets you assemble an array value from a list of scalar numbers.
This can be used with the aggregating functions here,
but it's generally easier to use the corresponding functions from
the Lists class.
sum( array )array is not a numeric array, null
is returned.
array (Object): array of numbers
arraymean( array )array is not a numeric array, null
is returned.
array (Object): array of numbers
arrayvariance( array )array is not a numeric array,
null is returned.
array (Object): array of numbers
arraystdev( array )array is not a numeric array,
null is returned.
array (Object): array of numbers
arrayminimum( array )array is not a numeric array, null
is returned.
array (Object): array of numbers
arraymaximum( array )array is not a numeric array, null
is returned.
array (Object): array of numbers
arraymedian( array )array is not a numeric array, null
is returned.
array (Object): array of numbers
arrayquantile( array, quant )quant value;
values of 0, 0.5 and 1 give the minimum, median and maximum
respectively. A value of 0.99 would give the 99th percentile.
array (Object): array of numbers
quant (floating point): number in the range 0-1 deterining which quantile
to calculate
quantsize( array )array is not an array, zero is returned.
array (Object): array
arraycount( array )array is not an array, zero is returned.
array (Object): array (may or may not be numeric)
arraycountTrue( array )array (array of boolean): array of true/false values
arrayjoin( array, joiner )array is not an array, null is returned.
array (Object): array of numbers or strings
joiner (String): text string to interpose between adjacent elements
array elements separated by
joiner strings
add( array1, array2 )null is returned.
The types of the arrays do not need to be the same,
so for example it is permitted to add an integer array
to a floating point array.
array1 (Object): first array of numeric values
array2 (Object): second array of numeric values
array1 and array2,
the same length as the input arrays
add( array, constant )array argument is not a numeric array,
null is returned.
array (Object): array input
constant (floating point): value to add to each array element
array parameter
subtract( array1, array2 )null is returned.
The types of the arrays do not need to be the same,
so for example it is permitted to subtract an integer array
from a floating point array.
array1 (Object): first array of numeric values
array2 (Object): second array of numeric values
array1 and array2,
the same length as the input arrays
multiply( array1, array2 )null is returned.
The types of the arrays do not need to be the same,
so for example it is permitted to multiply an integer array
by a floating point array.
array1 (Object): first array of numeric values
array2 (Object): second array of numeric values
array1 and array2,
the same length as the input arrays
multiply( array, constant )array argument is not a numeric array,
null is returned.
array (Object): array input
constant (floating point): value by which to multiply each array element
array parameter
divide( array1, array2 )null is returned.
The types of the arrays do not need to be the same,
so for example it is permitted to divide an integer array
by a floating point array.
array1 (Object): array of numerator values (numeric)
array2 (Object): array of denominator values (numeric)
array1[i]/array2[i]
the same length as the input arrays
reciprocal( array )array argument is not a numeric array,
null is returned.
array (Object): array input
array parameter
condition( flagArray, trueValue, falseValue )This has the same effect as applying the expression
outArray[i] = flagArray[i] ? trueValue : falseValue.
flagArray (array of boolean): array of boolean values
trueValue (floating point): output value corresponding to an input true value
falseValue (floating point): output value corresponding to an input false value
flagArrayarray( values, ... )values (floating point, one or more): one or more array elements
intArray( values, ... )values (integer, one or more): one or more array elements
stringArray( values, ... )values (String, one or more): one or more array elements