Next: Examples
Up: Quality in IRAS90
Previous: Quality Names
Quality names may be combined together using Boolean operators
into complex ``quality expressions''. The quality expression is
evaluated at each element within the NDF by substituting a value
of true or false for each quality name used in the expression,
depending on whether or not that element holds the specified
quality. Elements are used if the quality expression evaluates
to a true value. Boolean operators are delimited on each side by
a period (eg ``.AND.'' ). The operands on which these operators
act must be either a quality name (which must be defined within
the NDF), or one of the Boolean constants .TRUE and .FALSE.
Parentheses can be used to nest expressions.
Quality expressions can be up to 254 characters long, and must
not contain more than 40 symbols (Boolean operators, constants,
or quality names). Some attempts are made to simplify a quality
expression to reduce the run time needed to evaluate the
expression for every data value.
The precedence of the Boolean operators decreases in the following
order; .NOT., .AND., .OR., .XOR., .EQV. (the final two have equal
precedence). In an expression such as ( A .XOR. B .EQV. C .XOR. D ) in
which all operators have equal precedence, the evaluation proceeds from
left to right., i.e. the expression is evaluated as ( ( ( A .XOR. B )
.EQV. C ) .XOR. D ). If there is any doubt about the order in which an
expression will be evaluated, parentheses should be used to ensure the
required order of evaluation.
- .NOT.
- -
The expression (.NOT.A) is true only if A is false.
- .AND.
- -
The expression (A.AND.B) is true only if A and B are both true.
- .OR.
- -
The expression (A.OR.B) is true if either (or both) of A or B are
true.
- .XOR.
- -
The expression (A.XOR.B) is true if either A is true and B is
false, or A is false and B is true.
- .EQV.
- -
The expression (A.EQV.B) is true if either A is true and B is
true, or A is false and B is false.
Next: Examples
Up: Quality in IRAS90
Previous: Quality Names
IRAS90 --- IRAS Survey and PO Data Analysis Package --- Reference Guide
Starlink User Note 163
David S. Berry, W Gong, D C Parsons
19 February 1995
E-mail:ussc@star.rl.ac.uk
Copyright © 2008 Science and Technology Facilities Council