Extract XMM-Newton Data (extract-xmm
)#
Pipeline module to extract and group XMM-Newton EPIC (PN, MOS1, MOS2) spectra.
- Automates the standard SAS (Science Analysis System) workflow:
Build
CCF
, ingest theODF
, and setSAS
environment variables.Locate the
PPS
directory alongside theODF
and prepare event files.Extract source and background spectra.
Generate response files (RMF/ARF) and group spectra for PN, MOS1, and MOS2.
Move final grouped spectra to the specified output directory.
Caution
The user running this script must make sure that PPS
and ODF
directory have the same parent directory, e.g.,
OBSID
├── PPS/
└── ODF/
- Positional arguments:
ODF_DIR
: Path to the XMM-Newton ODF directory.source.reg
: Source region in physical coordinates (filename or literal physical “circle(x,y,r)”).Note
Keep in mind that the region files or literal can only be in circle(x, y, r) or annulus(x, y, r_in, r_out). Also for literal, must be in string or “quoted”.
PNbkg.reg
: PN background region in physical coordinates (filename or literal).MOS1bkg.reg
: Optional MOS1 background region in physical coordinates (defaults toPNbkg.reg
if omitted).MOS2bkg.reg
: Optional MOS2 background region in physical coordinates (defaults toPNbkg.reg
if omitted).OUTDIR
: Destination for grouped spectra in physical coordinates (defaul toPPS
directory).
- Options:
- --help
Show help message
- Usage formula:
>>> extract-xmm <ODF_DIR> <source.reg> <PNbkg.reg> [MOS1bkg.reg] [MOS2bkg.reg] [OUTDIR]
- Usage examples:
>>> extract-xmm ./0882480901/odf/ sou_PN_physical.reg bkg_PN_physical.reg \ ... bkg_MOS1_physical.reg bkg_MOS2_physical.reg ./0882480901 >>> extract-xmm ./0882480901/odf/ sou_physical.reg bkg_physical.reg
- Requirements:
SAS (Science Analysis System) must be installed.
PPS
andODF
directory must have the same parent directory