oph_sum_scalar2

Description

Behaviour

It sums the scalar value to each element of the measure array. It can operate also with complex numbers. In case of real numbers, it adds to each element in the input array the value of scalar value (real), if specified (default is 0). In case of complex numbers, it adds to each element in the input array the complex number with real part equal to scalar value (real) and imaginary part equal to scalar value (imaginary), if available (default is 0).

Parameters

  • input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’; ‘oph_complex_double’; ‘oph_complex_float’; ‘oph_complex_int’; ‘oph_complex_long’.
  • output measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’; ‘oph_long’; ‘oph_int’; ‘oph_short’; ‘oph_byte’; ‘oph_complex_double’; ‘oph_complex_float’; ‘oph_complex_int’; ‘oph_complex_long’.
  • measure: input measure.
  • scalar value (real): in case of real numbers, it is the number to be added to each element of the input measure. In case of complex numbers, it is the real part of the complex number to be added to each element of the input measure. Default is 0.
  • scalar value (imaginary): considered only in case of complex numbers, it is the imaginary part of the complex number to be added to each element of the input measure. Default is 0.

Return type

Binary-array.

Examples

Add 2+2i to each element of the input array.

oph_sum_scalar2('OPH_COMPLEX_DOUBLE','OPH_COMPLEX_DOUBLE',measure,2,2)

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’|’oph_ complex_double’|’oph_complex_float’|’oph_complex_int’|’oph_complex_long’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’|’oph_int’|’oph_long’|’oph_short’|’oph_byte’|’oph_ complex_double’|’oph_complex_float’|’oph_complex_int’|’oph_complex_long’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
scalar value (real) “double” “no”   “0”   “0” / “1”
scalar value (imaginary) “double” “no”   “0”   “0” / “1”