The Binary Series in DADiSP is a powerful tool for identification of events, conditions, and outliers among other things. A binary series consists of the values 0.0 or 1.0. The easiest way to construct a binary series is to use one of the relational or logical operators, i.e. the >, >=, <, <=, ==, !=, !, ||, &&, XOR, and NOT functions.
For example, if W1 contained the series {2, 4, 6, 8, 10}, then the expression
W1 > 6.0
would return a series, with the same number of points as the series in W1, that is 1.0 everywhere W1 exceeds 6.0, and 0.0 everywhere W1 is less than or equal to 6.0; that is, 1.0 everywhere the condition is true, and 0.0 everywhere the condition is false:
{0, 0, 0, 1, 1}.
To create a series that is equal to W1 where W1 exceeds 6.0, and zero elsewhere, just multiply the previous expression by W1:
(W1 > 6.0) * W1
You can also identify a particular range of values by using the logical AND function:
((W1 >2.0) && (W1 <= 9.0)) * W1
This expression sets any values of W1 which do not fall between 2.0 and 9.0 to the value 0.0.
The DELETE function accepts a binary series as one of its arguments. For example, to delete all the values from W1 that are larger than 6.0, try:
delete(W1, W1 > 6.0)
To retain those values from W1 that are greater than or equal to 6.0, use the NOT function:
delete(W1, NOT(W1 > 6.0))