About Chandra Archive Proposer Instruments & Calibration Newsletters Data Analysis HelpDesk Calibration Database NASA Archives & Centers Chandra Science Links

Skip the navigation links
Last modified: March 2007

URL: http://cxc.harvard.edu/ciao3.4/mksubbgreg.html
Hardcopy (PDF): A4 | Letter
AHELP for CIAO 3.4 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.

NOTES

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.

Hardcopy (PDF): A4 | Letter
Last modified: March 2007



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