CCfits
2.6
|
This function demonstrates the operation of filtering a table by selecting rows that satisfy a condition and writing them to a new file, or overwriting a table with the filtered data. A third mode, where a filtered dataset is appended to the file containing the source data, will be available shortly, but is currently not supported by cfitsio.
The expression syntax for the conditions that may be applied to table data are described in the cfitsio manual. In the example below, we illustrate filtering with a boolean expression involving one of the columns.
The two flags at the end of the call to FITS::filter are an `overwrite' flag - which only has meaning if the inFile and outFile are the same, and a 'read' flag. overwrite defaults to true. The second flag is a 'read' flag which defaults to false. When set true the user has immediate access to the filtered data.
(Also see the section "Reading with Extended File Name Syntax")