This page contains the source code for the Direct Spectral Deprojection code described in the appendix of Sanders & Fabian (2007), and tested and detailed further by Russell, Sanders & Fabian (2008).
Download the latest version (1.1 as of
2008-07-06), here. The program is a
Python script, so requires Python
to be installed. It also depends on
the numpy
and pyfits
libraries to be present. Download the script somewhere and mark it as
executable (chmod +x deproject_spectra.py).
You need to have numbered ungrouped spectra for each shell. Assign background files to the spectra with the BACKSCAL keyword. The XFLTxxxx header keywords in the spectrum need to be defined as for projct:
XFLT0001 = outer radius of shell in some units
XFLT0002...0003 are ignored
XFLT0004 = starting angle (optional)
XFLT0005 = stopping angle (optional)
XLFT.... = more starting and stopping angles as required
(assumes 360 degrees if no angles are specified)
Only spherical geometry is currently allowed.
Just run the script as
deproject_spectra.py ann_ .spec 1 10 0. ann_ .deproj
If the input spectra are called ann_1.spec to ann_10.spec, writing ann_1.deproj to ann_10.deproj, the arguments would be:
ann_ = input prefix .spec = input suffix 1 = spectrum starting number 10 = number of spectra 0. = inner radius of 1st spectrum (same units as XFLT0001) ann_ = prefix of output files .deproj = suffix of output files
Please contact Jeremy Sanders (jss) or Helen Russell (hrr27), both @ast.cam.ac.uk, for enquires or help with the code. There is also a version available which does ARF correction.
Last Modified on 2008-11-19. Written by Jeremy Sanders.