oph_affine

Description

Behaviour

Apply an affine transformation to each element of the measure array: each item is multiplied by a scalar value and, then, the result is summed to a translation value.

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • output measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’.
  • measure: input measure.
  • scalar value: number to be multiplied by each element of the input measure. Default is 1.
  • translation value: number to be summed to output measure after the multiplication. Default is 0.
  • missingvalue : value to be considered as missing value; by default it is NAN (for ‘oph_double’ and ‘oph_float’).

Return type

Binary-array.

Examples

Multiply each element of the input array by 2 and sum 10 to the results.

oph_affine('OPH_DOUBLE','OPH_DOUBLE',measure,2,10)

Operation type

Simple.

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’ |’oph_int’|’oph_long’|’oph_short’|’oph_byte’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
scalar value “double” “no”   “1”   “0” / “1”
translation value “double” “no”   “0”   “0” / “1”
missingvalue “double” “no”   “NAN”   “0” / “1”