Last modified: May 2026

URL: https://cxc.cfa.harvard.edu/ciao/ahelp/parse_wcs_match_log.html
AHELP for CIAO 4.18

parse_wcs_match_log


Synopsis

Parse the output from the wcs_match tool

Syntax

parse_wcs_match_log  infile refsrcfile logfile outfile [clobber]
[verbose]

Description

'parse_wcs_match_log' is a utility script designed to extract and structure data from the verbose output of the 'wcs_match' tool. While 'wcs_match' computes the transformation between two source lists, much of the diagnostic information—such as individual source residuals and aggregate statistics—is typically only available in the tool's verbose log output.

This tool parses that log file and creates a FITS binary table containing the cross-match results. The output includes source positions from both the input and reference lists, the residuals (X, Y, and RSS) before and after the transformation was applied, the residual ratios, and a flag indicating whether each source was included in the final transformation solution. Additionally, summary statistics (Average, Maximum, and RMS residuals) are recorded as header keywords in the output file.


Example

parse_wcs_match_log infile="src.fits" refsrcfile="ref.fits"
logfile="wcs_match.log" outfile="match_stats.fits"

In this example, the user provides the original source list (infile), the reference list (refsrcfile), and the log file captured from a previous 'wcs_match' run (logfile). The tool parses the log and saves the structured results into 'match_stats.fits'.


Parameters

name type ftype def min max reqd
infile file input       yes
refsrcfile file input       yes
logfile file input       yes
outfile file output       yes
clobber boolean   no      
verbose integer   1 0 5  

Detailed Parameter Descriptions

Parameter=infile (file required filetype=input)

Input file with duplicate/source candidates

The source list that was used as the 'infile' for the 'wcs_match' tool. This file is used to retrieve the original RA and Dec coordinates for the sources.

Parameter=refsrcfile (file required filetype=input)

Input file with reference sources

The reference source list that was used as the 'refsrcfile' for the 'wcs_match' tool. This is used to retrieve the reference coordinates (RA_REF, DEC_REF) for the matched pairs.

Parameter=logfile (file required filetype=input)

wcs_match debug log file

The ASCII log file containing the verbose output from the 'wcs_match' tool. This log must contain the "Source Residuals" table and summary statistics blocks produced when 'wcs_match' is run with verbose=1.

Parameter=outfile (file required filetype=output)

Output cross match table file name

The name of the output FITS binary table to be created.

Parameter=clobber (boolean default=no)

Overwrite existing files?

If set to "yes", an existing file with the same name as 'outfile' will be overwritten.

Parameter=verbose (integer default=1 min=0 max=5)

Output verbosity.

Controls the amount of information printed to the screen during execution.


Output Table Columns

The output FITS table contains the following columns for each matched source:

Summary Statistics Keywords

Summary statistics are added as keywords to the FITS header of the output file. These include:

About Contributed Software

This script is not an official part of the CIAO release but is made available as "contributed" software via the CIAO scripts page. Please see this page for installation instructions.


Bugs

See the bug pages on the CIAO website for an up-to-date listing of known bugs.

Refer to the CIAO bug pages for an up-to-date listing of known issues.

See Also

tools::coordinates
fine_astro, reproject_aspect, reproject_events, sso_freeze, wcs_match, wcs_update