Event filtering allows you to select rows from an FITS binary table (e.g., an X-ray event list) by checking each event row against an expression involving the columns in the table. When a table is filtered, only valid rows satisfying these expressions are used to make the image.
A filter expression consists of an arithmetic or logical operation involving one or more column values from a table. Columns can be compared to other columns or to numeric constants. Standard JavaScript math functions can be applied to columns. JavaScript (or C) semantics are used when constructing expressions, with the usual precedence and associativity rules holding sway:
Operator Associativity -------- ------------- () left to right ! (bitwise not) - (unary minus) right to left * / left to right + - left to right < <= > >= left to right == != left to right & (bitwise and) left to right ^ (bitwise exclusive or) left to right | (bitwise inclusive or) left to right && (logical and) left to right || (logical or) left to right = right to leftFor example, if energy and pha are columns in a table, then the following are valid expressions:
pha > 1 energy == pha pha > 1 && energy <= 2 max(pha,energy)>=2.5
In addition to the standard JavaScript/C syntax, filter expressions can make use of IRAF-style range lists which specify a range of values. The syntax requires that the column name be followed by an '=' sign, which is followed by a range expression of the form:
col = v1:v2 # v1 <= col <= v2 in rangeThe v values above must be numeric constants.