Chandra X-Ray Observatory (CXC)
Skip to the navigation links
Last modified: 5 April 2012

URL: http://cxc.harvard.edu/ciao4.4/bugs/specextract.html

Bugs: specextract


Table of Contents

Caveats


Caveats

The same asp, pbkfile, and mask files are used for source and background responses  (28 Dec 2010)

The script assumes that corresponding items in the source and background stack are defined from the same event file, and uses the specified asp, pbkfile, and mskfile files for creating both the source and background responses.

For example, if the input command includes:

specextract infile="file1.fits[sky=region(i.reg)],file2.fits[sky=region(i.reg)]" \
bkgfile="file1.fits[sky=region(bg.reg)],file2.fits[sky=region(bg.reg)]" \
asp="asphist1.fits,asphist2.fits" outroot="src_i" 

The "asphist1.fits" file is used in creating both the source and background WMAP files:

sky2tdet
"file1.fits[sky=region(i.reg)][energy=300:2000][bin
sky=1]" asphist1.fits "src1_tdet.fits[wmap]" clobber=yes

sky2tdet
"file1.fits[sky=region(bg.reg)][energy=300:2000][bin
sky=1]" asphist1.fits "bkg1_tdet.fits[wmap]" clobber=yes

Users who wish to define the source and background from different event files will need to run the script twice to do so.

Remember that if you plan on subtracting the background, then you do not need to create a background RMF and ARF. You may simply use dmextract to create the spectrum. In this case, leave the bkgfile parameter blank so that specextract will only create the source spectrum and responses.

The mkwarf tool may run out of memory for large regions.
# mkwarf (CIAO): dsALLOCERR -- ERROR: Could not allocate memory. [Updated] (15 Dec 2011)

If a weighted ARF is being created for a large region, on order of a full chip (or larger), mkwarf may hit the intrinsic memory limit of a 32-bit application.

Workaround:

In CIAO 4.4, there is a new specextract parameter - binarfwmap - that specifies the binning of the sky2tdet WMAP, which is used as input to mkwarf.

If you encounter this error, increase the binarfwmap value to create a coarser WMAP.

# specextract (<date>): ERROR An error occurred while running 'sky2tdet':
# sky2tdet (CIAO): ERROR: no non-null/0/nan pixels are in the input image
 (02 Mar 2012)

The most likely cause of this error is that the region and energy filter set in the energy_wmap parameter do not select any events:

unix% dmlist "evt2.fits[sky=region(ciao.reg)][energy=300:2000]" counts
0 

Workaround:

Adjust the energy_wmap value to match that of your events. The range of event energies in the region can be found with dmstat:

unix% dmstat "evt2.fits[sky=region(ciao.reg)][cols energy]"
energy[eV]
min: 2231.7507324 @: 61
max: 7980.6259766 @: 35
mean: 4012.0070413
sigma: 1252.6216735
sum: 429284.75342
good: 107
null: 0

16 Feb 2012 Bug Fixes

The following is a list of bugs that were fixed in version 16 Feb 2012.

Script fails if outroot is a stack, weight=no, and correct=yes [New] (08 Feb 2012)

If this combination of parameters is used, specextract will fail on the dmmakereg step:

unix% specextract infile=@in.txt out=@outroots.txt weight=no correct=yes mode=h

Running: specextract
Version: 5 December 2011

Setting bad pixel file for item 1 of 22 in input list


Converting source region to physical coordinates for item 1 of 22 in
input list.


Extracting src spectra for item 1 of 22 in input list

# specextract (5 December 2011): ERROR File
acis_evt2.fits[sky=region(@outroots.txt_phys_coords_reg_file1.reg)]
does not exist. 

Workaround:

Set the outroot to a string, e.g.

unix% pset specextract outroot=3c294

and specextract will autoname the output files to match each row of the input:

3c294_src1.arf
3c294_src1_asphist7.fits
3c294_src1.corr.arf
3c294_src1_grp.pi
3c294_src1.pi
3c294_src1.rmf
3c294_src2.arf
3c294_src2_asphist7.fits
3c294_src2.corr.arf
3c294_src2_grp.pi
3c294_src2.pi
3c294_src2.rmf
.etc.

Last modified: 5 April 2012
CXC logo

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-2012. All rights reserved.