Powers and Exponents Filter

The powers and exponents filter applies a unary operation (such as performing exponentiation) to all individual coefficients of a data set.

Category

category_math Math

Node

unaryarithmetic_node

Parameters

Operation Type: which operation to perform (see below)

X: a number that is used as a parameter for some operations

Inputs

Input: the input of the operation

Outputs

Output: the result of the operation

Effect of the Filter

The filter performs one of the following operations on each individual scalar value of the input:

  • Negate: inverts the sign of the value (f(v) = -v), e.g. 3 becomes -3 and -0.5 becomes 0.5.

  • Invert: calculates the inverse value (f(v) = \frac{1}{v}), e.g. 3 becomes 1/3 and -0.5 becomes -2.

  • Natural Log: calculates the natural logartihm (basis e; f(v) = \mathrm{ln}(v)), e.g. 1 becomes 0, and 10 becomes approximately 2.303.

  • Natural Exp: calculates the exponential function (f(v) = \mathrm{e}^v), i.e. 1 becomes approximately 2.718 and 10 becomes approximately 22026.

  • Decimal Log: calculates the logartihm of basis 10 (f(v) = \mathrm{log}_{10}(v)), e.g. 10 becomes 1, and 1 becomes 0.

  • Decimal Exp: calculates 10 to the power of the input (f(v) = 10^v), e.g. 1 becomes 10 and -3 becomes 0.001.

  • Negative Decimal Log: calculates the negation of the logartihm of basis 10 (-\mathrm{log}_{10}(v)), e.g. 10 becomes -1, and 0.01 becomes 2. (This can be used to convert reflectances into abundances.)

  • Decimal Exp of Negative: calculates 10 to the power of the input negated (f(v) = 10^{-v}), e.g. 1 becomes 0.1 and -3 becomes 1000. (This can be used to convert abundances into reflectances.)

  • Binary Log: calculates the logartihm of basis 2 (f(v) = \mathrm{log}_{2}(v)), e.g. 2 becomes 1, and 1 becomes 0.

  • Binary Exp: calculates 2 to the power of the input (f(v) = 2^v), e.g. 1 becomes 2 and -3 becomes 0.125.

  • Square: calculates the square of the input (f(v) = v^2), e.g. 3 becomes 9 and 5 becomes 25.

  • Square Root: calculates the square root of the input (f(v) = \sqrt{v}), e.g. 16 becomes 4, and 100 becomes 10.

  • Generic Log: calculates a generic logartihm to the basis of the supplied parameter X of the input (X must be positive and not equal to 1, f(v) = \mathrm{log}_X(v)), e.g. 9 becomes 2 if X is 3.

  • Generic Exp: calculates the supplied parameter X raised to the power of the input (X must be non-negative, f(v) = X^v), e.g. 2 becomes 0.25 if X is 0.5.

  • Generic Power: calculates the input raised to the power of the supplied parameter X (f(v) = v^X), e.g. 2.5 becomes 15.625 if X is 3.

Note

The result of this operation may be NaN (not a number) or infinity if the input data has certain values. Notably, a fractional power of a negative input will give NaN (this includes the square root operation); the inverse of 0 will give infinity.