Introduction to Filtering

Rows (e.g., X-ray events) in column-based data (i.e., FITS Binary tables and raw event files) can be filtered or selected based on a flexible set of user-specified criteria that allows column values to be compared with numeric values, header parameters, functions, or other column values. Both image and tables can be filtered using ASCII spatial region filters.

To filter tables and images, the filter specification is added to the FITS filename using bracket notation:

The filter specification comes after the extension and image sections and may optionally be enclosed in its own set of brackets. Thus:
define filters on an image section of size 200x200 defined on the FITS EVENTS (binary table) and BKGD (image) extensions. Order is important here: extension name is followed by section, which is followed by filters.

To implement both row and spatial filtering, funtools utilizes a technique in which the filter specification is converted into a small C program, which is compiled and linked automatically so that table rows or image sections can be fed to this program and filter results returned to the calling program. The power of the technique lies in these considerations:

Three variations on this scheme of dynamic filters are supported:

These choices are explored automatically by the filter init routines.

Table Filtering can be performed on columns in a FITS binary table file by comparing the value of a column to other columns, header values, constant values or function values. Table columns and image pixels also can be filtered with geometric Spatial Region Filters.

Index to the Funtools Help Pages
Last updated: March 30, 2001