ixpestartx

Contributed by: Douglas Swartz

Latest update: May 29 2025; script checks for output files from background rejection

Previous updates: May 13 2025; includes support for use of remote CALDB

Download: file

ixpestartx is a bash shell script intended to simplify the preparation of IXPE Stokes spectra for analysis using the XSPEC spectral fitting package. Given an ObsID, a weighting scheme, a source extraction region file (in ds9 format) and optional background extraction region file, the script searches the current working directory and any subdirectories for IXPE Level 2 event files and associated attitude files corresponding to that ObsID, uses extractor (the core routine of Xselect) to extract the I, Q, and U spectra, uses ixpecalcarf to build observation-specific ancillary and modulated response files for each spectrum (using Level 1 attitude files and a 1-arcmin radius region for aperture corrections), and creates a command script to be used to initiate an XSPEC data analysis session.

Example:

1) Ensure that Heasoft is initialized in terminal:
% heainit

2) Make script executable:
% chmod +x /path/to/ixpestartx.sh

3) Run the script:
% ./ixpestartx 01004701 neff /path/to/src.reg /path/to/bkg.reg
will extract the I, Q and U spectra using neff weighting scheme for observation 01004701