oph_predicate

Description

Behaviour

It evaluates a predicate. If ‘expression0’ satisfies ‘comparison’, then ‘expression1’ is executed, else ‘expression2’ is executed.

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.
  • expression 0: first expression.
  • comparison: condition to be verified.
  • expression 1: expression executed if expression 0 satisfies comparison.
  • expression 2: expression executed if expression 0 does not satisfy comparison.

Return type

Binary-array.

Examples

Extract measures with temperature values greater than 300 K.

oph_predicate('OPH_DOUBLE','OPH_DOUBLE',measure,'x-300','>0','1','0')

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”
expression 0 “string” “yes”       “1” / “1”
comparison “string” “yes”       “1” / “1”
expression 1 “string” “yes”       “1” / “1”
expression 2 “string” “yes”       “1” / “1”