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.
The functions fall into a number of categories:
size
,
count
,
maximum
,
minimum
,
sum
,
mean
,
median
,
quantile
,
stdev
,
variance
,
join
.
add
,
subtract
,
multiply
,
divide
,
reciprocal
,
condition
.
array
with various
numbers of arguments, which let you assemble an array value from a list
of scalar numbers. This can be used for instance to get the mean of
a set of three magnitudes by using an expression like
"mean(array(jmag, hmag, kmag))
".
sum( array )
array
is not a numeric array, null
is returned.array
(Object): array of numbersarray
mean( array )
array
is not a numeric array, null
is returned.array
(Object): array of numbersarray
variance( array )
array
is not a numeric array,
null
is returned.array
(Object): array of numbersarray
stdev( array )
array
is not a numeric array,
null
is returned.array
(Object): array of numbersarray
minimum( array )
array
is not a numeric array, null
is returned.array
(Object): array of numbersarray
maximum( array )
array
is not a numeric array, null
is returned.array
(Object): array of numbersarray
median( array )
array
is not a numeric array, null
is returned.array
(Object): array of numbersarray
quantile( 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 numbersquant
(floating point): number in the range 0-1 deterining which quantile
to calculatequant
size( array )
array
is not an array, zero is returned.array
(Object): arrayarray
count( array )
array
is not an array, zero is returned.array
(Object): array (may or may not be numeric)array
join( array, joiner )
array
is not an array, null is returned.array
(Object): array of numbers or stringsjoiner
(String): text string to interpose between adjacent elementsarray
elements separated by
joiner
stringsadd( 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 valuesarray2
(Object): second array of numeric valuesarray1
and array2
,
the same length as the input arraysadd( array, constant )
array
argument is not a numeric array,
null
is returned.array
(Object): array inputconstant
(floating point): value to add to each array elementarray
parametersubtract( 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 valuesarray2
(Object): second array of numeric valuesarray1
and array2
,
the same length as the input arraysmultiply( 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 valuesarray2
(Object): second array of numeric valuesarray1
and array2
,
the same length as the input arraysmultiply( array, constant )
array
argument is not a numeric array,
null
is returned.array
(Object): array inputconstant
(floating point): value by which to multiply each array elementarray
parameterdivide( 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 arraysreciprocal( array )
array
argument is not a numeric array,
null
is returned.array
(Object): array inputarray
parametercondition( 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 valuestrueValue
(floating point): output value corresponding to an input true valuefalseValue
(floating point): output value corresponding to an input false valueflagArray
array( x1 )
x1
(floating point): array element 1array( x1, x2 )
x1
(floating point): array element 1x2
(floating point): array element 2array( x1, x2, x3 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3array( x1, x2, x3, x4 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3x4
(floating point): array element 4array( x1, x2, x3, x4, x5 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3x4
(floating point): array element 4x5
(floating point): array element 5array( x1, x2, x3, x4, x5, x6 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3x4
(floating point): array element 4x5
(floating point): array element 5x6
(floating point): array element 6array( x1, x2, x3, x4, x5, x6, x7 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3x4
(floating point): array element 4x5
(floating point): array element 5x6
(floating point): array element 6x7
(floating point): array element 7array( x1, x2, x3, x4, x5, x6, x7, x8 )
x1
(floating point): array element 1x2
(floating point): array element 2x3
(floating point): array element 3x4
(floating point): array element 4x5
(floating point): array element 5x6
(floating point): array element 6x7
(floating point): array element 7x8
(floating point): array element 8