find_counterparts.py

find_counterparts.py is a script to query HEASARC tables. To use it, a working Python installation is required (probably version >= 1.5). Most Linux systems already have Python installed.

Download:

Get it from http://xassist.pha.jhu.edu/xassist/find_counterparts/find_counterparts_v1.1.tar.gz or ftp://xassist.pha.jhu.edu/pub/find_counterparts/find_counterparts_v1.1.tar.gz

Installation:

Untar the tar file, and then add the directory created to your PATH system variable. E.g., if you are working in your home directory:
$ gunzip -c find_counterparts_v1.1.tar.gz | tar xvf -
$ setenv PATH $HOME/find_counterparts:$PATH

Usage:

find_counterparts.py with no params print out the following help screen:
Usage: find_counterparts.py csvfile outfile (table=table regfile=regfile 
            tableroot=tableroot make_src_tables= aspunc=0. maxtime=600. 
            tableregionsize=2. ndatacols=5 verbose=1))
      or: find_counterparts.py tableroot ra=ra dec=dec radius=radius (table=table
           maxtime=600. tableregionsize=2. ndatacols=5 verbose=1)
Reads source list csvfile generated by XAssist and searches
HEASARC tables (listed below) for matches, saved in the form of a new 
comma-seperated values (csv) file and optionally also a ds9 region file
Alternate usage is to just download the catalog sources within a given radius 
(in arcmin.) of a position.
table = name of HEASARC table to query, e.g.,
                  USNO stars:     usnoa2
               USNO-B1 stars:      I/284
                  GSC2 stars:      I/271
                       2mass:    B/2mass
             Veron 2001 QSOs:  veron2001
        CfA Redshift Catalog:       zcat
          RC3 Galaxy Catalog:        rc3
                  FIRST 20cm:      first
if no table is specified, all of the above will be queried
tableroot = root file name for the HEASARC table
If tableroot+catname.dat exists, it won't be re-created
If make_src_tables=yes, a separate csv output file will be created for each 
(X-ray) source, with filename basename(outfile) + _srcX.csv, basename(outfile)
 = outfile up to last '.'
tableregionsize = 2., if > 0 then ds9 region files are created with
names tableroot+catname.reg, containing a circle region for each table
object and radius=tableregionsize in arcsecs.
Set ascunc to uncertainty for positions in csvfile (in arcsecs.)
maxtime = maximum time to wait for a response from HEASARC, in secs.
ndatacols = number of columns in output csv file for data returned from catalog

Example:
find_counterparts.py testy ra="10 01 57.8" dec="+55 40 47" radius=5. table="usnoa2"

XAssist Home Page


Andrew Ptak
Last modified: Wed May 15 10:29:06 EDT 2002