Chandra X-Ray Observatory
Skip to the navigation links
Last modified: November 2012

AHELP for CIAO 4.9


Context: tools


Convert the output of roi into a format usable by dmfilth


splitroi infiles outhead


This script takes the output of the roi tool - a set of FITS files, one per source, each with a SRCREG and BKGREG block - and converts them into ASCII region files that can be used by dmfilth. Please see the An Image of Diffuse Emission thread for more information.

Unlike most CIAO scripts and tools, this script does not have a parameter file. It will also over-write any existing file; those called outhead + ".src.reg" and outhead + ".bg.reg".

Viewing the output in ds9

The script creates two ASCII region files: outhead.src.reg and In all but the most-simple cases these files can not be directly viewed by ds9. The dmmakereg tool can be used to convert to a FITS region file, and that can then be read by ds9. For example, assuming that splitroi has been run with the outhead argument set to sources, then

unix% punlearn dmmakereg
unix% dmmakereg "region("
unix% ds9 img.fits -region

Example 1

unix% roi ... outsrcfile=src%d.fits ...
unix% splitroi src\*fits sources

Here we convert the src*fits files created by roi into two ASCII region files - sources.src.reg and - which can then be used as the values of the srclist and bkglist parameters of dmfilth. For example:

unix% pset dmfilth srclist=@sources.src.reg
unix% pset dmfilth

The \ in src\*fits is needed to ensure that the script, rather than the shell, does the file search. The following example shows other ways that multiple files can be passed through to the script.

Example 2

unix% splitroi src1.fits,src2.fits,src3.fits sources

The first argument supports the CIAO stack syntax, so here we use a comma-separated list of files. An alternative is to use the "@" syntax to read in the names from a file, e.g.

unix% ls -1 sources/src*fits > srcs.dat
unix% splitroi @srcs.dat sources

Changes in the December 2012 Release

The script has been updated to work in CIAO 4.5.

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 the installation instructions page for help on installing the package.

See Also

celldetect, create_bkg_map, dither_region, dmcontour, dmgroupreg, dmimgdist, dmimgfilt, dmimghull, dmimglasso, dmmakereg, get_src_region, mkbgreg, mksubbgreg, roi, tg_create_mask, tgdetect, tgidselectsrc, tgmatchsrc, vtpdetect, wavdetect, wrecon, wtransform

Last modified: November 2012
Smithsonian Institute Smithsonian Institute

The Chandra X-Ray Center (CXC) is operated for NASA by the Smithsonian Astrophysical Observatory. 60 Garden Street, Cambridge, MA 02138 USA.   Email: Smithsonian Institution, Copyright © 1998-2017. All rights reserved.