Chandra X-Ray Observatory
	(CXC)
Skip to the navigation links
Last modified: December 2009

URL: http://cxc.harvard.edu/ciao/ahelp/mksubbgreg.html
AHELP for CIAO 4.9

mksubbgreg

Context: tools

Synopsis

Subtracts source regions from background regions

Description

The mkSubBgReg.pl script takes input source and background lists and subtracts the corresponding source region from each background region.

The script works on CIAO format region files for circular and elliptical regions in physical coordinates. The output region file cannot be displayed in ds9 due to the subtracted regions.

This script is used in conjunction with mkBgReg.pl ("ahelp mkbgreg") in the Create an Image of Diffuse Emission thread.

Example

unix% mkSubBgReg.pl
ASCII source region file (CIAO format): sources_mod.reg
ASCII background region file (CIAO format): bkg_mod.reg
Output filename: bkg_sub.reg

Subtract the corresponding source region in "sources_mod.reg" from each background region in "bkg_mod.reg". The output region file, "bkg_sub.reg", contains the results:

unix% less bkg_sub.reg
ellipse(4055.19,3893.76,7.99,5.71,39.83)-ellipse(4055.19,3893.76,2.94,2.35,39.83)
ellipse(4098.84,3656.79,13.02,7.07,51.12)-ellipse(4098.84,3656.79,6.51,3.53,51.12)
...

Note that the script always prompts for the inputs, even if they are supplied on the command line.

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.

Bugs

See the bugs page for this script 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

concept
subspace
dm
dmregions
tools
dither_region, dmcontour, dmgroupreg, dmimgdist, dmimgfilt, dmimghull, dmimglasso, dmmakereg, get_src_region, mkbgreg, roi, splitroi, tg_create_mask

Last modified: December 2009
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:   cxchelp@head.cfa.harvard.edu Smithsonian Institution, Copyright © 1998-2017. All rights reserved.