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.2 as
of 2016-05-24, fixing problems with recent pyfits versions) or
the previous version. The
program is a Python script, so
requires Python to be
installed. It also depends on
libraries to be present. Download the script somewhere and mark it as
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 (jsanders) or Helen Russell (hrr27), @mpe.mpg.de and @ast.cam.ac.uk, respectively, for enquires or help with the code.Last Modified on 2016-05-24. Written by Jeremy Sanders.