The XMM-Newton (Ehle et al. 2005) Science Analysis System (SAS) Extended Source Analysis Software (XMM-ESAS) package described here follows the methods outlined in Snowden et al. (2008, based on the background calibrations of Kuntz & Snowden 2008) for the analysis European Photon Imaging Camera (EPIC) MOS (Turner et al. 2001) observations of extended objects and the diffuse X-ray background. XMM-ESAS was subsequently extended to include processing of pn (Strüder et al. 2001) observations. The analysis of pn data is similar to that of MOS data but has a number of added complications: needing to account for out-of-time (OOT) events, soft proton flare contamination of the corner data, and some as yet unclear interaction between those two issues.
XMM-ESAS began life as a collection of routines to allow the spatial and spectral analysis of diffuse emission filling the field of view. Some of the routines provided capabilities missing from the original SAS, such as creating the quiescent particle background spectrum for a given observation, or creating an image of the soft proton contamination. The original XMM-ESAS package consisted of a group of IDL routines (developed by Kuntz) and a number of perl scripts used to call both SAS tasks and the IDL routines in the correct order. In the second version (the initial public release), the IDL routines were replaced with FORTRAN, by Snowden, for portability (and to avoid the need for IDL licenses), and the perl scripts were cleaned, updated, and extended. Other routines were intended to provide tried and tested out-of-the-box scripts for repetitive or complex tasks, such as point source removal. As a result, XMM-ESAS had become a mixed collection of FORTRAN or C routines for new functions, and PERL routines for scripts. The third version of the package saw the FORTRAN routines and perl scripts incorporated into SAS. The fourth version (SAS V13.0) saw the conversion of the FORTRAN routines from FORTRAN 77 to FORTRAN 90/95. With the release of SAS V21.0, all the FORTRAN code is now integrated into SAS, PERL routines have been re-implemented in SAS-format FORTRAN, and most (but not all) calibration files have been incorporated into the SAS CCF. As will become apparent below, XMM-ESAS is still a work in progress. Please bear with us!