| afiltcat | astcat | afiltcat |
afiltcat -- filter astrometry files
afiltcat input output
Afiltcat filters the list of input astrometry files input and writes the results to the output files output . The number of input astrometry files must equal the number of output astrometry files.
The format of the input astrometry files is defined by the file header if the file was written by an astcat package task, or by the acatpars parameter set. The acatpars parameters ftype and csystem define the input astrometry file type and coordinate system. The position, size, and units of the standard astrometry file fields the associated error fields are defined by the parameters: id , ra , dec , pmra , pmdec , catsystem , equinox , epoch , px , rv , mag , color , xp , yp , xc , yc , and imag , and: era , edec , epmra , epmdec , epx , erv , emag , ecolor , exc , eyc , eimag . More detailed information on astrometry files and the acatpars parameters can be found by typing "help files" and "help acatpars".
If filter = yes, the input astrometry file is filtered before being written to the outputfile. The filtering parameters are defined by the filtering parameter set afiltpars . The afilterpars parameters permit the user to sort the query results by setting the sort field parameter fsort , select or reject catalog records by setting the selection expression parameter fexpr , select or reject fields for output by setting the output field list parameter afields , and change the coordinate system, units, and format of the output coordinates by setting the fosystem , foraunits , fodecunits , foraformat , and fodecformat parameters. A more detailed description of the filtering parameters can be obtained by typing "help afiltpars".
If standard = yes a header is written to the output file which defines the contents and format of the output astrometry file. The astcat tasks use this header to decode the astrometry files. If the header is missing or has been modified by non-astcat tasks the user must set standard = no, and use the acatpars parameters to define the astrometry file format. Most non-astcat tasks will interpret the catalog header as documentation and skip it.
If update = yes the values of the acatpars and afiltpars parameters are updated at task termination. If verbose = yes then detailed status reports are issued as the task executes.
1. Sort the input astrometry file using the value of the magnitude field.
cl> page reg001.cat.1 ... examine catalog header to determine name of magnitude field cl> afiltcat reg001.cat.1 reg001.cat.2 fsort=mag1
2. Repeat example 1 but but only output records for which mag1 <= 16.0.
cl> afiltcat reg001.cat.1 reg001.cat.3 fsort=mag1 fexpr="mag1 <= 16.0"
3. Repeat example 2 but since the input astrometry file has 2 magnitude columns output a new color field equal to "mag2 - mag1".
cl> afiltcat reg001.cat.1 reg001.cat.4 fsort=mag1 fexpr="mag1 <= 16.0" \ fields="f[*],mag2-mag1"
4. Repeat example 1 but overwrite the input astrometry file.
cl> page reg001.cat.1 ... examine catalog header to determine name of magnitude field cl> afiltcat reg001.cat.1 reg001.cat.1 fsort=mag1
5. Filter a list of input astrometry files by extracting columns 1-4 but reversing the order of fields 3 and 4. Overwrite the input files.
cl> afiltcat @inlist @inlist fields="f[1-2],f4,f3"
6. Repeat the previous example for a list of text files which have no catalog headers but contain the ras and decs in hours and degrees in J2000 coordinates of a list of source in columns 1 and 2 of a simple text file.
cl> afiltcat @inlist @inlist ftype="stext" csystem=j2000 ra="1 hours" \
dec="2 degrees" mag="3-4" fields="f[1-2],f4,f3"
aclist, agetcat, acatpars, afiltpars