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.
(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.
# specextract (<date>): ERROR An error occurred while running 'sky2tdet': # sky2tdet (CIAO): ERROR: no non-null/0/nan pixels are in the input image
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

![[CIAO Logo]](../imgs/ciao_logo_navbar.gif)