[an error occurred while processing this directive] Creation of EPIC ESAS spectral analysis files for a cluster radial profile [an error occurred while processing this directive] Creation of EPIC ESAS spectral analysis files for a cluster radial profile [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]

Introduction

This thread describes how to create EPIC spectral and response files for a complicated multi-region analysis combining data from the three instruments.

This thread uses data from the observation of Abell 1795, ObsID 0097820101, which is also used as the Spectral Analysis example where a script and output files are provided.

Expected Outcome

The final outcome of this thread is the spectral analysis of the radial profile of the cluster of galaxies Abell 1795 with ten annuli.

SAS Tasks to be Used

Prerequisites

Useful Links

  • This thread makes use of the image display software ds9 and the spectral fitting tool Xspec
  • A full guide to the use of the ESAS software in SAS can be found here or here
  • Cluster analysis paper - Snowden et al. 2008, A&A, 478, 615

Caveats




Procedure

This thread contains a step-by-step recipe to create EPIC background and source spectra and response files from all three instruments.
  1. Set up your SAS environment (following the SAS Startup Thread)
  2. Create cleaned (filtered for soft proton excesses) MOS and pn (including OOT processing) event files for your observation:

     epchain
     epchain withoutoftime=true
     emchain
     pn-filter
     mos-filter

    Note that mos-filter will indicate which CCDs are operating in an anomalous mode (the line with the corresponding CCD would be marked by **** in that case. In the the example below all CCDs are fine). These CCDs should be excluded in downstream processing.

     1S003
         Limit=1.0 CCD=2 Hardness=7.556 Uncertainty=1.547
         Limit=1.0 CCD=3 Hardness=8.333 Uncertainty=2.079
         Limit=0.90 CCD=4 Hardness=3.982 Uncertainty=0.595
         Limit=1.73 CCD=5 Hardness=2.182 Uncertainty=0.240
         Limit=1.0 CCD=6 Hardness=5.741 Uncertainty=1.197
         Limit=1.0 CCD=7 Hardness=6.226 Uncertainty=1.205
     2S004
         Limit=1.0 CCD=2 Hardness=3.615 Uncertainty=0.566
         Limit=1.0 CCD=3 Hardness=5.629 Uncertainty=1.032
         Limit=1.0 CCD=4 Hardness=9.391 Uncertainty=2.060
         Limit=1.0 CCD=5 Hardness=4.460 Uncertainty=0.698
         Limit=1.0 CCD=6 Hardness=7.500 Uncertainty=1.702
         Limit=1.0 CCD=7 Hardness=6.677 Uncertainty=1.286

    The diagnostic plots created by the filtering tasks should also be examined as they provide an indication of the quality of the data. These have names like mos1S003-hist.qdp, mos2S004-hist.qdp, and pnS005-hist.qdp and cam be plotted using the command, for example, qdp mos1S003-hist.qdp. Figure 1 shows the light-curve screening for the MOS1 instrument.

    Figure 1: MOS1 light curve for the Abell 1795 observation. Notice the residual variation of the nominally good data which indicates the possible existence of residual soft proton contamination.

  3. Run source detection and make point-source masks. Note that in this and many tasks below, the exposure ID must be explicitly noted. This is done by the prefixm, prefixp, and prefix parameters.

     cheese prefixm='1S003 2S004' prefixp=S005 scale=0.5 rate=1.0 dist=40.0 \
       clobber=0 elow=400 ehigh=7200

  4. Examine the MOS soft band images to confirm that the indicated CCDs are operating in an anomalous state, or that any other CCDs are doing so, and verify that the point-source (cheese) masks look reasonable.

    Figure 2: MOS1 (left) and MOS2 (right) images in the soft (0.2-1.0 keV) band. Note the excess counts in the upper left CCD in the MOS1 image most noticeable in the unexposed (to the sky) upper left corner. Displayed by the command: ds9 *soft* &.

    Figure 3: MOS1 (left), MOS2 (middle), and pn (right) cheese masks. Displayed by the command: ds9 *cheese* &

  5. It is quite often useful to create and image of the entire field of view, with and without point sources, to get a perspective on the observation. In this section a simplified version of the ESAS Imaging thread is provided with minimal comments. For a more extensive discussion see the ESAS Imaging thread and the XMM-ESAS Cookbook.

    Use mos-spectra and pn-spectra to create the required intermediate images with point sources included.

     mos-spectra prefix=1S003 caldb=/PATH/esascaldb region=reg.txt mask=0 \
       elow=400 ehigh=7200 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos-spectra prefix=2S004 caldb=/PATH/esascaldb region=reg.txt mask=0 \
       elow=400 ehigh=7200 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=pn-reg.txt \
       mask=0 elow=400 ehigh=7200 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

    Use mos_back and pn_back to create the quiescent particle background (QPB) spectra and images (in detector coordinates).

     mos_back prefix=1S003 caldb=/PATH/esascaldb diag=0 elow=400 ehigh=7200 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/PATH/esascaldb diag=0 elow=400 ehigh=7200 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     pn_back prefix=S005 caldb=/PATH/esascaldb diag=0 elow=400 ehigh=7200 \
      quad1=1 quad2=1 quad3=1 quad4=1

    Use rot-im-det-sky to transform the QPB images in detector coordinates into sky coordinates.

     rot-im-det-sky prefix=1S003 mask=0 elow=400 ehigh=7200 mode=1
     rot-im-det-sky prefix=2S004 mask=0 elow=400 ehigh=7200 mode=1
     rot-im-det-sky prefix=S005 mask=0 elow=400 ehigh=7200 mode=1

    comb combines the MOS1, MOS2, and pn images, as well as images from multiple exposures. Since the spectra and images were created with point sources, comb must be run using the cheese masking. Note that the soft proton background is not removed for this image. First create the images with point sources.

     comb caldb=/software/XMM/CCF/esas withpartcontrol=1 withsoftcontrol=0 withswcxcontrol=0 \
      elowlist=400 ehighlist=7200 mask=0 ndata=3 prefixlist="1S003 2S004 S005"

    adapt adaptively smooths the image.

     adapt smoothingcounts=50 thresholdmasking=0.02 detector=0 binning=2 elow=400 ehigh=7200 \
      withpartcontrol=yes withsoftcontrol=no withswcxcontrol=0

    Do it again, this time excluding point sources.

      comb caldb=/software/XMM/CCF/esas withpartcontrol=1 withsoftcontrol=0 withswcxcontrol=0 \
       elowlist=400 ehighlist=7200 mask=1 prefixlist="1S003 2S004 S005"


      adapt smoothingcounts=50 thresholdmasking=0.02 detector=0 binning=2 elow=400 ehigh=7200 \
       withpartcontrol=yes withsoftcontrol=no withswcxcontrol=0


      mv adapt-400-7200.fits adapt-400-7200-nps.fits

    Display the smoothed images.

      ds9 adapt-400-7200-ps.fits adapt-400-7200-nps.fits &

    Figure 4 shows the final adaptively smoothed, QPB subtracted, and exposure corrected images with and without point sources excluded.

    Figure 4: Abell 1795 adaptively smoothed, particle background subtracted, and exposure corrected image in the 0.4-7.2 keV band with point sources (left) and point sources excluded (right).

    Get rid of some intermediate files before starting on the spectral analysis part of the thread.

     rm -f *-obj-im.fits *obj-im-sp-det.fits *exp-im.fits *mask-im.fits *obj.pi \
      *obj-oot.pi *rmf *arf

  6. Use xmmselect to find the detector coordinates of the center of the cluster for each of the three detectors. Use these coordinates to create the region selection expressions for the annuli. This is a bit tedious. For this thread the annuli are: 0-30", 30-60", 60-120", 120-180", 180-240", 240-300", 300-420", 420-540", 540-720", and 720-840". The region files used below have names starting with reg1, reg2, and reg3 for the MOS1, MOS2, and pn detectors, respectively. Note that the units are 0.05 arc seconds.

     reg1-0-30.txt: &&((DETX,DETY) IN circle(201.0,-219.0,600))
     reg1-30-60.txt: &&((DETX,DETY) IN circle(201.0,-219.0,1200))&&!((DETX,DETY) IN circle(201.0,-219.0,600))
     reg1-60-120.txt: &&((DETX,DETY) IN circle(201.0,-219.0,2400))&&!((DETX,DETY) IN circle(201.0,-219.0,1200))
     reg1-120-180.txt: &&((DETX,DETY) IN circle(201.0,-219.0,3600))&&!((DETX,DETY) IN circle(201.0,-219.0,2400))
     reg1-180-240.txt: &&((DETX,DETY) IN circle(201.0,-219.0,4800))&&!((DETX,DETY) IN circle(201.0,-219.0,3600))
     reg1-240-300.txt: &&((DETX,DETY) IN circle(201.0,-219.0,6000))&&!((DETX,DETY) IN circle(201.0,-219.0,4800))
     reg1-300-420.txt: &&((DETX,DETY) IN circle(201.0,-219.0,8400))&&!((DETX,DETY) IN circle(201.0,-219.0,6000))
     reg1-420-540.txt: &&((DETX,DETY) IN circle(201.0,-219.0,10800))&&!((DETX,DETY) IN circle(201.0,-219.0,8400))
     reg1-540-720.txt: &&((DETX,DETY) IN circle(201.0,-219.0,14400))&&!((DETX,DETY) IN circle(201.0,-219.0,10800))
     reg1-720-840.txt: &&((DETX,DETY) IN circle(201.0,-219.0,16800))&&!((DETX,DETY) IN circle(201.0,-219.0,14400))
     reg2-0-30.txt: &&((DETX,DETY) IN circle(39.5,-26.0,600))
     reg2-120-180.txt: &&((DETX,DETY) IN circle(39.5,-26.0,3600))&&!((DETX,DETY) IN circle(39.5,-26.0,2400))
     reg2-180-240.txt: &&((DETX,DETY) IN circle(39.5,-26.0,4800))&&!((DETX,DETY) IN circle(39.5,-26.0,3600))
     reg2-240-300.txt: &&((DETX,DETY) IN circle(39.5,-26.0,6000))&&!((DETX,DETY) IN circle(39.5,-26.0,4800))
     reg2-300-420.txt: &&((DETX,DETY) IN circle(39.5,-26.0,8400))&&!((DETX,DETY) IN circle(39.5,-26.0,6000))
     reg2-30-60.txt: &&((DETX,DETY) IN circle(39.5,-26.0,1200))&&!((DETX,DETY) IN circle(39.5,-26.0,600))
     reg2-420-540.txt: &&((DETX,DETY) IN circle(39.5,-26.0,10800))&&!((DETX,DETY) IN circle(39.5,-26.0,8400))
     reg2-540-720.txt: &&((DETX,DETY) IN circle(39.5,-26.0,14400))&&!((DETX,DETY) IN circle(39.5,-26.0,10800))
     reg2-60-120.txt: &&((DETX,DETY) IN circle(39.5,-26.0,2400))&&!((DETX,DETY) IN circle(39.5,-26.0,1200))
     reg2-720-840.txt: &&((DETX,DETY) IN circle(39.5,-26.0,16800))&&!((DETX,DETY) IN circle(39.5,-26.0,14400))
     reg3-0-30.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,600))
     reg3-120-180.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,3600))&&!((DETX,DETY) IN circle( 59.0, -147.5,2400))
     reg3-180-240.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,4800))&&!((DETX,DETY) IN circle( 59.0, -147.5,3600))
     reg3-240-300.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,6000))&&!((DETX,DETY) IN circle( 59.0, -147.5,4800))
     reg3-300-420.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,8400))&&!((DETX,DETY) IN circle( 59.0, -147.5,6000))
     reg3-30-60.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,1200))&&!((DETX,DETY) IN circle( 59.0, -147.5,600))
     reg3-420-540.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,10800))&&!((DETX,DETY) IN circle( 59.0, -147.5,8400))
     reg3-540-720.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,14400))&&!((DETX,DETY) IN circle( 59.0, -147.5,10800))
     reg3-60-120.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,2400))&&!((DETX,DETY) IN circle( 59.0, -147.5,1200))
     reg3-720-840.txt: &&((DETX,DETY) IN circle( 59.0, -147.5,16800))&&!((DETX,DETY) IN circle( 59.0, -147.5,14400))

  7. Use mos-spectra and pn-spectra to create the intermediate spectra that are used by mos_back and pn_back to create the QPB spectra for the regions of interest and their associated RMF and ARF files. MOS CCDs affected by anomalous states should be deselected (this is done by the ccd# parameters). MOS1 CCD6 should be deselected if the observation took place after the meteorite damage (See Section 3.3 of the XMM-Newton Users Handbook). Currently the tasks require the path to the additional CalDB files required for XMM-ESAS (in this case, /PATH/esascaldb). As images are not of interest, the energy selection parameters are set to 0. In order to avoid overwriting important files, the processing of an individual region should be done together and the files renamed.

    Skip to the end of the this section.

     mos-spectra prefix=1S003 caldb=/PATH/esascaldb region=reg1-0-30.txt mask=1 \
       elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/PATH/esascaldb diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-0-30.pi
     mv mos1S003-back.pi mos1S003-back-0-30.pi
     mv mos1S003.rmf mos1S003-0-30.rmf
     mv mos1S003.arf mos1S003-0-30.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-0-30.fits
     specgroup spectrumset=mos1S003-obj-0-30.pi mincounts=100 rmfset=mos1S003-0-30.rmf \
       arfset=mos1S003-0-30.arf backgndset=mos1S003-back-0-30.pi \
       groupedset=mos1S003-obj-0-30-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-0-30.txt\
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-0-30.pi
     mv mos2S004-back.pi mos2S004-back-0-30.pi
     mv mos2S004.rmf mos2S004-0-30.rmf
     mv mos2S004.arf mos2S004-0-30.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-0-30.fits
     specgroup spectrumset=mos2S004-obj-0-30.pi mincounts=100 rmfset=mos2S004-0-30.rmf \
       arfset=mos2S004-0-30.arf backgndset=mos2S004-back-0-30.pi \
       groupedset=mos2S004-obj-0-30-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-0-30.txt mask=1 \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-0-30.pi
     mv pnS005-obj.pi pnS005-obj-0-30.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-0-30.pi
     mv pnS005-back.pi pnS005-back-0-30.pi
     mv pnS005.rmf pnS005-0-30.rmf
     mv pnS005.arf pnS005-0-30.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-0-30.fits
     specgroup spectrumset=pnS005-obj-0-30.pi mincounts=100 rmfset=pnS005-0-30.rmf \
       arfset=pnS005-0-30.arf backgndset=pnS005-back-0-30.pi \
       groupedset=pnS005-obj-0-30-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-30-60.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-30-60.pi
     mv mos1S003-back.pi mos1S003-back-30-60.pi
     mv mos1S003.rmf mos1S003-30-60.rmf
     mv mos1S003.arf mos1S003-30-60.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-30-60.fits
     specgroup spectrumset=mos1S003-obj-30-60.pi mincounts=100 rmfset=mos1S003-30-60.rmf \
       arfset=mos1S003-30-60.arf backgndset=mos1S003-back-30-60.pi \
       groupedset=mos1S003-obj-30-60-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-30-60.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-30-60.pi
     mv mos2S004-back.pi mos2S004-back-30-60.pi
     mv mos2S004.rmf mos2S004-30-60.rmf
     mv mos2S004.arf mos2S004-30-60.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-30-60.fits
     specgroup spectrumset=mos2S004-obj-30-60.pi mincounts=100 rmfset=mos2S004-30-60.rmf \
       arfset=mos2S004-30-60.arf backgndset=mos2S004-back-30-60.pi \
       groupedset=mos2S004-obj-30-60-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-30-60.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-30-60.pi
     mv pnS005-obj.pi pnS005-obj-30-60.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-30-60.pi
     mv pnS005-back.pi pnS005-back-30-60.pi
     mv pnS005.rmf pnS005-30-60.rmf
     mv pnS005.arf pnS005-30-60.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-30-60.fits
     specgroup spectrumset=pnS005-obj-30-60.pi mincounts=100 rmfset=pnS005-30-60.rmf \
       arfset=pnS005-30-60.arf backgndset=pnS005-back-30-60.pi \
       groupedset=pnS005-obj-30-60-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-60-120.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-60-120.pi
     mv mos1S003-back.pi mos1S003-back-60-120.pi
     mv mos1S003.rmf mos1S003-60-120.rmf
     mv mos1S003.arf mos1S003-60-120.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-60-120.fits
     specgroup spectrumset=mos1S003-obj-60-120.pi mincounts=100 rmfset=mos1S003-60-120.rmf \
       arfset=mos1S003-60-120.arf backgndset=mos1S003-back-60-120.pi \
       groupedset=mos1S003-obj-60-120-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-60-120.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 \
       ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-60-120.pi
     mv mos2S004-back.pi mos2S004-back-60-120.pi
     mv mos2S004.rmf mos2S004-60-120.rmf
     mv mos2S004.arf mos2S004-60-120.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-60-120.fits
     specgroup spectrumset=mos2S004-obj-60-120.pi mincounts=100 rmfset=mos2S004-60-120.rmf \
       arfset=mos2S004-60-120.arf backgndset=mos2S004-back-60-120.pi \
       groupedset=mos2S004-obj-60-120-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-60-120.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-60-120.pi
     mv pnS005-obj.pi pnS005-obj-60-120.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-60-120.pi
     mv pnS005-back.pi pnS005-back-60-120.pi
     mv pnS005.rmf pnS005-60-120.rmf
     mv pnS005.arf pnS005-60-120.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-60-120.fits
     specgroup spectrumset=pnS005-obj-60-120.pi mincounts=100 rmfset=pnS005-60-120.rmf \
       arfset=pnS005-60-120.arf backgndset=pnS005-back-60-120.pi \
       groupedset=pnS005-obj-60-120-grp.pi

    Skip to the end of the this section.

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-120-180.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-120-180.pi
     mv mos1S003-back.pi mos1S003-back-120-180.pi
     mv mos1S003.rmf mos1S003-120-180.rmf
     mv mos1S003.arf mos1S003-120-180.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-120-180.fits
     specgroup spectrumset=mos1S003-obj-120-180.pi mincounts=100 rmfset=mos1S003-120-180.rmf \
       arfset=mos1S003-120-180.arf backgndset=mos1S003-back-120-180.pi \
       groupedset=mos1S003-obj-120-180-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-120-180.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-120-180.pi
     mv mos2S004-back.pi mos2S004-back-120-180.pi
     mv mos2S004.rmf mos2S004-120-180.rmf
     mv mos2S004.arf mos2S004-120-180.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-120-180.fits
     specgroup spectrumset=mos2S004-obj-120-180.pi mincounts=100 rmfset=mos2S004-120-180.rmf \
       arfset=mos2S004-120-180.arf backgndset=mos2S004-back-120-180.pi \
       groupedset=mos2S004-obj-120-180-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-120-180.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-120-180.pi
     mv pnS005-obj.pi pnS005-obj-120-180.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-120-180.pi
     mv pnS005-back.pi pnS005-back-120-180.pi
     mv pnS005.rmf pnS005-120-180.rmf
     mv pnS005.arf pnS005-120-180.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-120-180.fits
     specgroup spectrumset=pnS005-obj-120-180.pi mincounts=100 rmfset=pnS005-120-180.rmf \
       arfset=pnS005-120-180.arf backgndset=pnS005-back-120-180.pi \
       groupedset=pnS005-obj-120-180-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-180-240.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-180-240.pi
     mv mos1S003-back.pi mos1S003-back-180-240.pi
     mv mos1S003.rmf mos1S003-180-240.rmf
     mv mos1S003.arf mos1S003-180-240.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-180-240.fits
     specgroup spectrumset=mos1S003-obj-180-240.pi mincounts=100 rmfset=mos1S003-180-240.rmf \
       arfset=mos1S003-180-240.arf backgndset=mos1S003-back-180-240.pi \
       groupedset=mos1S003-obj-180-240-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-180-240.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-180-240.pi
     mv mos2S004-back.pi mos2S004-back-180-240.pi
     mv mos2S004.rmf mos2S004-180-240.rmf
     mv mos2S004.arf mos2S004-180-240.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-180-240.fits
     specgroup spectrumset=mos2S004-obj-180-240.pi mincounts=100 rmfset=mos2S004-180-240.rmf \
       arfset=mos2S004-180-240.arf backgndset=mos2S004-back-180-240.pi \
       groupedset=mos2S004-obj-180-240-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-180-240.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-180-240.pi
     mv pnS005-obj.pi pnS005-obj-180-240.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-180-240.pi
     mv pnS005-back.pi pnS005-back-180-240.pi
     mv pnS005.rmf pnS005-180-240.rmf
     mv pnS005.arf pnS005-180-240.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-180-240.fits
     specgroup spectrumset=pnS005-obj-180-240.pi mincounts=100 rmfset=pnS005-180-240.rmf \
       arfset=pnS005-180-240.arf backgndset=pnS005-back-180-240.pi \
       groupedset=pnS005-obj-180-240-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-240-300.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-240-300.pi
     mv mos1S003-back.pi mos1S003-back-240-300.pi
     mv mos1S003.rmf mos1S003-240-300.rmf
     mv mos1S003.arf mos1S003-240-300.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-240-300.fits
     specgroup spectrumset=mos1S003-obj-240-300.pi mincounts=100 rmfset=mos1S003-240-300.rmf \
       arfset=mos1S003-240-300.arf backgndset=mos1S003-back-240-300.pi \
       groupedset=mos1S003-obj-240-300-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-240-300.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-240-300.pi
     mv mos2S004-back.pi mos2S004-back-240-300.pi
     mv mos2S004.rmf mos2S004-240-300.rmf
     mv mos2S004.arf mos2S004-240-300.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-240-300.fits
     specgroup spectrumset=mos2S004-obj-240-300.pi mincounts=100 rmfset=mos2S004-240-300.rmf \
       arfset=mos2S004-240-300.arf backgndset=mos2S004-back-240-300.pi \
       groupedset=mos2S004-obj-240-300-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-240-300.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-240-300.pi
     mv pnS005-obj.pi pnS005-obj-240-300.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-240-300.pi
     mv pnS005-back.pi pnS005-back-240-300.pi
     mv pnS005.rmf pnS005-240-300.rmf
     mv pnS005.arf pnS005-240-300.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-240-300.fits
     specgroup spectrumset=pnS005-obj-240-300.pi mincounts=100 rmfset=pnS005-240-300.rmf \
       arfset=pnS005-240-300.arf backgndset=pnS005-back-240-300.pi \
       groupedset=pnS005-obj-240-300-grp.pi

    Skip to the end of the this section.

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-300-420.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-300-420.pi
     mv mos1S003-back.pi mos1S003-back-300-420.pi
     mv mos1S003.rmf mos1S003-300-420.rmf
     mv mos1S003.arf mos1S003-300-420.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-300-420.fits
     specgroup spectrumset=mos1S003-obj-300-420.pi mincounts=100 rmfset=mos1S003-300-420.rmf \
       arfset=mos1S003-300-420.arf backgndset=mos1S003-back-300-420.pi \
       groupedset=mos1S003-obj-300-420-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-300-420.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-300-420.pi
     mv mos2S004-back.pi mos2S004-back-300-420.pi
     mv mos2S004.rmf mos2S004-300-420.rmf
     mv mos2S004.arf mos2S004-300-420.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-300-420.fits
     specgroup spectrumset=mos2S004-obj-300-420.pi mincounts=100 rmfset=mos2S004-300-420.rmf \
       arfset=mos2S004-300-420.arf backgndset=mos2S004-back-300-420.pi \
       groupedset=mos2S004-obj-300-420-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-300-420.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-300-420.pi
     mv pnS005-obj.pi pnS005-obj-300-420.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-300-420.pi
     mv pnS005-back.pi pnS005-back-300-420.pi
     mv pnS005.rmf pnS005-300-420.rmf
     mv pnS005.arf pnS005-300-420.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-300-420.fits
     specgroup spectrumset=pnS005-obj-300-420.pi mincounts=100 rmfset=pnS005-300-420.rmf \
       arfset=pnS005-300-420.arf backgndset=pnS005-back-300-420.pi \
       groupedset=pnS005-obj-300-420-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-420-540.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-420-540.pi
     mv mos1S003-back.pi mos1S003-back-420-540.pi
     mv mos1S003.rmf mos1S003-420-540.rmf
     mv mos1S003.arf mos1S003-420-540.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-420-540.fits
     specgroup spectrumset=mos1S003-obj-420-540.pi mincounts=100 rmfset=mos1S003-420-540.rmf \
       arfset=mos1S003-420-540.arf backgndset=mos1S003-back-420-540.pi \
       groupedset=mos1S003-obj-420-540-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-420-540.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-420-540.pi
     mv mos2S004-back.pi mos2S004-back-420-540.pi
     mv mos2S004.rmf mos2S004-420-540.rmf
     mv mos2S004.arf mos2S004-420-540.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-420-540.fits
     specgroup spectrumset=mos2S004-obj-420-540.pi mincounts=100 rmfset=mos2S004-420-540.rmf \
       arfset=mos2S004-420-540.arf backgndset=mos2S004-back-420-540.pi \
       groupedset=mos2S004-obj-420-540-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-420-540.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-420-540.pi
     mv pnS005-obj.pi pnS005-obj-420-540.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-420-540.pi
     mv pnS005-back.pi pnS005-back-420-540.pi
     mv pnS005.rmf pnS005-420-540.rmf
     mv pnS005.arf pnS005-420-540.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-420-540.fits
     specgroup spectrumset=pnS005-obj-420-540.pi mincounts=100 rmfset=pnS005-420-540.rmf \
       arfset=pnS005-420-540.arf backgndset=pnS005-back-420-540.pi \
       groupedset=pnS005-obj-420-540-grp.pi

     mos-spectra prefix=1S003 caldb=/software/XMM/CCF/esas region=reg1-540-720.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-540-720.pi
     mv mos1S003-back.pi mos1S003-back-540-720.pi
     mv mos1S003.rmf mos1S003-540-720.rmf
     mv mos1S003.arf mos1S003-540-720.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-540-720.fits
     specgroup spectrumset=mos1S003-obj-540-720.pi mincounts=100 rmfset=mos1S003-540-720.rmf \
       arfset=mos1S003-540-720.arf backgndset=mos1S003-back-540-720.pi \
       groupedset=mos1S003-obj-540-720-grp.pi

     mos-spectra prefix=2S004 caldb=/software/XMM/CCF/esas region=reg2-540-720.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-540-720.pi
     mv mos2S004-back.pi mos2S004-back-540-720.pi
     mv mos2S004.rmf mos2S004-540-720.rmf
     mv mos2S004.arf mos2S004-540-720.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-540-720.fits
     specgroup spectrumset=mos2S004-obj-540-720.pi mincounts=100 rmfset=mos2S004-540-720.rmf \
       arfset=mos2S004-540-720.arf backgndset=mos2S004-back-540-720.pi \
       groupedset=mos2S004-obj-540-720-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-540-720.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-540-720.pi
     mv pnS005-obj.pi pnS005-obj-540-720.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-540-720.pi
     mv pnS005-back.pi pnS005-back-540-720.pi
     mv pnS005.rmf pnS005-540-720.rmf
     mv pnS005.arf pnS005-540-720.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-540-720.fits
     specgroup spectrumset=pnS005-obj-540-270.pi mincounts=100 rmfset=pnS005-540-720.rmf \
       arfset=pnS005-540-720.arf backgndset=pnS005-back-540-720.pi \
       groupedset=pnS005-obj-540-720-grp.pi

     mos-spectra prefix="1S003" caldb=/software/XMM/CCF/esas region=reg1-720-840.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=1S003 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos1S003-obj.pi mos1S003-obj-720-840.pi
     mv mos1S003-back.pi mos1S003-back-720-840.pi
     mv mos1S003.rmf mos1S003-720-840.rmf
     mv mos1S003.arf mos1S003-720-840.arf
     mv mos1S003-obj-im-sp-det.fits mos1S003-sp-720-840.fits
     specgroup spectrumset=mos1S003-obj-720-840.pi mincounts=100 rmfset=mos1S003-720-840.rmf \
       arfset=mos1S003-720-840.arf backgndset=mos1S003-back-720-840.pi \
       groupedset=mos1S003-obj-720-840-grp.pi

     mos-spectra prefix="2S004" caldb=/software/XMM/CCF/esas region=reg2-720-840.txt \
       mask=1 elow=0 ehigh=0 ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mos_back prefix=2S004 caldb=/software/XMM/CCF/esas diag=0 elow=0 ehigh=0 \
       ccd1=1 ccd2=1 ccd3=1 ccd4=1 ccd5=1 ccd6=1 ccd7=1

     mv mos2S004-obj.pi mos2S004-obj-720-840.pi
     mv mos2S004-back.pi mos2S004-back-720-840.pi
     mv mos2S004.rmf mos2S004-720-840.rmf
     mv mos2S004.arf mos2S004-720-840.arf
     mv mos2S004-obj-im-sp-det.fits mos2S004-sp-720-840.fits
     specgroup spectrumset=mos2S004-obj-720-840.pi mincounts=100 rmfset=mos2S004-720-840.rmf \
       arfset=mos2S004-720-840.arf backgndset=mos2S004-back-720-840.pi \
       groupedset=mos2S004-obj-720-840-grp.pi

     pn-spectra prefix=S005 caldb=/software/XMM/CCF/esas region=reg3-720-840.txt \
       mask=1 elow=0 ehigh=0 pattern=4 quad1=1 quad2=1 quad3=1 quad4=1

     pn_back prefix=S005 caldb=/XMM/sas/CCF/esas diag=0 elow=0 ehigh=0 \
       quad1=1 quad2=1 quad3=1 quad4=1

     mv pnS005-obj-os.pi pnS005-obj-os-720-840.pi
     mv pnS005-obj.pi pnS005-obj-720-840.pi
     mv pnS005-obj-oot.pi pnS005-obj-oot-720-840.pi
     mv pnS005-back.pi pnS005-back-720-840.pi
     mv pnS005.rmf pnS005-720-840.rmf
     mv pnS005.arf pnS005-720-840.arf
     mv pnS005-obj-im-sp-det.fits pnS005-sp-720-840.fits
     specgroup spectrumset=pnS005-obj-720-840.pi mincounts=100 rmfset=pnS005-720-840.rmf \
       arfset=pnS005-720-840.arf backgndset=pnS005-back-720-840.pi \
       groupedset=pnS005-obj-720-840-grp.pi

  8. Because of XMM's finite PSF, if there are strong spectral gradients the spectrum in one region can be significantly affected by the spectrum in a neighboring region. The creation and use of cross arfs provides a means of addressing this cross-talk. Use arfgen and evselect to create cross arfs for the spectral analysis. evselect is first run to create an instrument map. Some care must be taken in choosing the pixel size of the image as arfgen computation time scale as the number of pixels but if the pixels are too coarse the ARF will be underestimated. Generally, the ARF will reach its asymptotic limit about the time it reached infinite computation time. After the detector map has been created, arfgen can be run for the appropriate ARFs - the smaller the region is, the finer the detector map should be. Also, not that arfgen in the cross-arf mode can be run for the appropriate ARF for a given region on its own.

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=50 ycolumn=DETY yimagebinsize=50 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-0-30-0-30.arf spectrumset=mos1S003-obj-0-30.pi \
       crossreg_spectrumset=mos1S003-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-0-30-30-60.arf spectrumset=mos1S003-obj-30-60.pi \
       crossreg_spectrumset=mos1S003-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-0-30-60-120.arf spectrumset=mos1S003-obj-60-120.pi \
       crossreg_spectrumset=mos1S003-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-30-60-30-60.arf spectrumset=mos1S003-obj-30-60.pi \
       crossreg_spectrumset=mos1S003-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-30-60-0-30.arf spectrumset=mos1S003-obj-0-30.pi \
       crossreg_spectrumset=mos1S003-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-30-60-60-120.arf spectrumset=mos1S003-obj-60-120.pi \
       crossreg_spectrumset=mos1S003-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=50 ycolumn=DETY yimagebinsize=50 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-0-30-0-30.arf spectrumset=mos2S004-obj-0-30.pi \
       crossreg_spectrumset=mos2S004-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-0-30-30-60.arf spectrumset=mos2S004-obj-30-60.pi \
       crossreg_spectrumset=mos2S004-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-0-30-60-120.arf spectrumset=mos2S004-obj-60-120.pi \
       crossreg_spectrumset=mos2S004-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-30-60-30-60.arf spectrumset=mos2S004-obj-30-60.pi \
       crossreg_spectrumset=mos2S004-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-30-60-0-30.arf spectrumset=mos2S004-obj-0-30.pi \
       crossreg_spectrumset=mos2S004-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-30-60-60-120.arf spectrumset=mos2S004-obj-60-120.pi \
       crossreg_spectrumset=mos2S004-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=50 ycolumn=DETY yimagebinsize=50 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-0-30-0-30.arf spectrumset=pnS005-obj-0-30.pi \
       crossreg_spectrumset=pnS005-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-0-30-30-60.arf spectrumset=pnS005-obj-30-60.pi \
       crossreg_spectrumset=pnS005-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-0-30-60-120.arf spectrumset=pnS005-obj-60-120.pi \
       crossreg_spectrumset=pnS005-obj-0-30.pi crossregionarf=yes withrmfset=yes r\
       mfset=pnS005-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-30-60-30-60.arf spectrumset=pnS005-obj-30-60.pi \
       crossreg_spectrumset=pnS005-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-30-60-0-30.arf spectrumset=pnS005-obj-0-30.pi \
       crossreg_spectrumset=pnS005-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-30-60-60-120.arf spectrumset=pnS005-obj-60-120.pi \
       crossreg_spectrumset=pnS005-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       cxcolumn=DETX ximagebinsize=70 ycolumn=DETY yimagebinsize=70 squarepixels=yes \
       cimagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-0-30-120-180.arf spectrumset=mos1S003-obj-120-180.pi \
       ccrossreg_spectrumset=mos1S003-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       crmfset=mos1S003-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       cdetmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       cmodelootcorr=no

     arfgen arfset=mos1S003-30-60-120-180.arf spectrumset=mos1S003-obj-120-180.pi \
       ccrossreg_spectrumset=mos1S003-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       crmfset=mos1S003-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       cdetmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       cmodelootcorr=no

     arfgen arfset=mos1S003-60-120-60-120.arf spectrumset=mos1S003-obj-60-120.pi \
       ccrossreg_spectrumset=mos1S003-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       crmfset=mos1S003-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       cdetmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       cmodelootcorr=no

     arfgen arfset=mos1S003-60-120-0-30.arf spectrumset=mos1S003-obj-0-30.pi \
       ccrossreg_spectrumset=mos1S003-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       crmfset=mos1S003-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       cdetmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       cmodelootcorr=no

     arfgen arfset=mos1S003-60-120-30-60.arf spectrumset=mos1S003-obj-30-60.pi \
       crossreg_spectrumset=mos1S003-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-60-120-120-180.arf spectrumset=mos1S003-obj-120-180.pi \
       crossreg_spectrumset=mos1S003-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=70 ycolumn=DETY yimagebinsize=70 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-0-30-120-180.arf spectrumset=mos2S004-obj-120-180.pi \
       crossreg_spectrumset=mos2S004-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-30-60-120-180.arf spectrumset=mos2S004-obj-120-180.pi \
       crossreg_spectrumset=mos2S004-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-60-120-60-120.arf spectrumset=mos2S004-obj-60-120.pi \
       crossreg_spectrumset=mos2S004-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-60-120-0-30.arf spectrumset=mos2S004-obj-0-30.pi \
       crossreg_spectrumset=mos2S004-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-60-120-30-60.arf spectrumset=mos2S004-obj-30-60.pi \
       crossreg_spectrumset=mos2S004-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-60-120-120-180.arf spectrumset=mos2S004-obj-120-180.pi \
       crossreg_spectrumset=mos2S004-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       mxcolumn=DETX ximagebinsize=70 ycolumn=DETY yimagebinsize=70 squarepixels=yes \
       mimagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-0-30-120-180.arf spectrumset=pnS005-obj-120-180.pi \
       mcrossreg_spectrumset=pnS005-obj-0-30.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

     arfgen arfset=pnS005-30-60-120-180.arf spectrumset=pnS005-obj-120-180.pi \
       mcrossreg_spectrumset=pnS005-obj-30-60.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

     arfgen arfset=pnS005-60-120-60-120.arf spectrumset=pnS005-obj-60-120.pi \
       mcrossreg_spectrumset=pnS005-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

     arfgen arfset=pnS005-60-120-0-30.arf spectrumset=pnS005-obj-0-30.pi \
       mcrossreg_spectrumset=pnS005-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-0-30.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

     arfgen arfset=pnS005-60-120-30-60.arf spectrumset=pnS005-obj-30-60.pi \
       mcrossreg_spectrumset=pnS005-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-30-60.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

     arfgen arfset=pnS005-60-120-120-180.arf spectrumset=pnS005-obj-120-180.pi \
       mcrossreg_spectrumset=pnS005-obj-60-120.pi crossregionarf=yes withrmfset=yes \
       mrmfset=pnS005-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       mdetmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       mmodelootcorr=no

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=100 ycolumn=DETY yimagebinsize=100 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-120-180-120-180.arf spectrumset=mos1S003-obj-120-180.pi \
       crossreg_spectrumset=mos1S003-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

    arfgen arfset=mos1S003-120-180-60-120.arf spectrumset=mos1S003-obj-60-120.pi \
       crossreg_spectrumset=mos1S003-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-120-180-180-240.arf spectrumset=mos1S003-obj-180-240.pi \
       crossreg_spectrumset=mos1S003-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=100 ycolumn=DETY yimagebinsize=100 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-120-180-120-180.arf spectrumset=mos2S004-obj-120-180.pi \
       crossreg_spectrumset=mos2S004-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-120-180-60-120.arf spectrumset=mos2S004-obj-60-120.pi \
       crossreg_spectrumset=mos2S004-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-120-180-180-240.arf spectrumset=mos2S004-obj-180-240.pi \
       crossreg_spectrumset=mos2S004-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=100 ycolumn=DETY yimagebinsize=100 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-120-180-120-180.arf spectrumset=pnS005-obj-120-180.pi \
       crossreg_spectrumset=pnS005-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-120-180-60-120.arf spectrumset=pnS005-obj-60-120.pi \
       crossreg_spectrumset=pnS005-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-60-120.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-120-180-180-240.arf spectrumset=pnS005-obj-180-240.pi \
       crossreg_spectrumset=pnS005-obj-120-180.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=150 ycolumn=DETY yimagebinsize=150 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-180-240-180-240.arf spectrumset=mos1S003-obj-180-240.pi \
       crossreg_spectrumset=mos1S003-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-180-240-120-180.arf spectrumset=mos1S003-obj-120-180.pi \
       crossreg_spectrumset=mos1S003-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-180-240-240-300.arf spectrumset=mos1S003-obj-240-300.pi \
       crossreg_spectrumset=mos1S003-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=150 ycolumn=DETY yimagebinsize=150 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-180-240-180-240.arf spectrumset=mos2S004-obj-180-240.pi \
       crossreg_spectrumset=mos2S004-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-180-240-120-180.arf spectrumset=mos2S004-obj-120-180.pi \
       crossreg_spectrumset=mos2S004-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-180-240-240-300.arf spectrumset=mos2S004-obj-240-300.pi \
       crossreg_spectrumset=mos2S004-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=150 ycolumn=DETY yimagebinsize=150 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-180-240-180-240.arf spectrumset=pnS005-obj-180-240.pi \
       crossreg_spectrumset=pnS005-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-180-240-120-180.arf spectrumset=pnS005-obj-120-180.pi \
       crossreg_spectrumset=pnS005-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-120-180.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-180-240-240-300.arf spectrumset=pnS005-obj-240-300.pi \
       crossreg_spectrumset=pnS005-obj-180-240.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=200 ycolumn=DETY yimagebinsize=200 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-240-300-240-300.arf spectrumset=mos1S003-obj-240-300.pi \
       crossreg_spectrumset=mos1S003-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-240-300-180-240.arf spectrumset=mos1S003-obj-180-240.pi \
       crossreg_spectrumset=mos1S003-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-240-300-300-420.arf spectrumset=mos1S003-obj-300-420.pi \
       crossreg_spectrumset=mos1S003-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=200 ycolumn=DETY yimagebinsize=200 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-240-300-240-300.arf spectrumset=mos2S004-obj-240-300.pi \
       crossreg_spectrumset=mos2S004-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

    arfgen arfset=mos2S004-240-300-180-240.arf spectrumset=mos2S004-obj-180-240.pi \
       crossreg_spectrumset=mos2S004-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-240-300-300-420.arf spectrumset=mos2S004-obj-300-420.pi \
       crossreg_spectrumset=mos2S004-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=200 ycolumn=DETY yimagebinsize=200 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-240-300-240-300.arf spectrumset=pnS005-obj-240-300.pi \
       crossreg_spectrumset=pnS005-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-240-300-180-240.arf spectrumset=pnS005-obj-180-240.pi \
       crossreg_spectrumset=pnS005-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-180-240.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-240-300-300-420.arf spectrumset=pnS005-obj-300-420.pi \
       crossreg_spectrumset=pnS005-obj-240-300.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=250 ycolumn=DETY yimagebinsize=250 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-300-420-300-420.arf spectrumset=mos1S003-obj-300-420.pi \
       crossreg_spectrumset=mos1S003-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-300-420-240-300.arf spectrumset=mos1S003-obj-240-300.pi \
       crossreg_spectrumset=mos1S003-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-300-420-420-540.arf spectrumset=mos1S003-obj-420-540.pi \
       crossreg_spectrumset=mos1S003-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=250 ycolumn=DETY yimagebinsize=250 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-300-420-300-420.arf spectrumset=mos2S004-obj-300-420.pi \
       crossreg_spectrumset=mos2S004-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-300-420-240-300.arf spectrumset=mos2S004-obj-240-300.pi \
       crossreg_spectrumset=mos2S004-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-300-420-420-540.arf spectrumset=mos2S004-obj-420-540.pi \
       crossreg_spectrumset=mos2S004-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=250 ycolumn=DETY yimagebinsize=250 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-300-420-300-420.arf spectrumset=pnS005-obj-300-420.pi \
       crossreg_spectrumset=pnS005-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-300-420-240-300.arf spectrumset=pnS005-obj-240-300.pi \
       crossreg_spectrumset=pnS005-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-240-300.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-300-420-420-540.arf spectrumset=pnS005-obj-420-540.pi \
       crossreg_spectrumset=pnS005-obj-300-420.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=300 ycolumn=DETY yimagebinsize=300 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-420-540-420-540.arf spectrumset=mos1S003-obj-420-540.pi \
       crossreg_spectrumset=mos1S003-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits\
       modelootcorr=no

     arfgen arfset=mos1S003-420-540-300-420.arf spectrumset=mos1S003-obj-300-420.pi \
       crossreg_spectrumset=mos1S003-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-420-540-540-720.arf spectrumset=mos1S003-obj-540-720.pi \
       crossreg_spectrumset=mos1S003-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=300 ycolumn=DETY yimagebinsize=300 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-420-540-420-540.arf spectrumset=mos2S004-obj-420-540.pi \
       crossreg_spectrumset=mos2S004-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-420-540-300-420.arf spectrumset=mos2S004-obj-300-420.pi \
       crossreg_spectrumset=mos2S004-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-420-540-540-720.arf spectrumset=mos2S004-obj-540-720.pi \
       crossreg_spectrumset=mos2S004-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=300 ycolumn=DETY yimagebinsize=300 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-420-540-420-540.arf spectrumset=pnS005-obj-420-540.pi \
       crossreg_spectrumset=pnS005-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-420-540-300-420.arf spectrumset=pnS005-obj-300-420.pi \
       crossreg_spectrumset=pnS005-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-300-420.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-420-540-540-720.arf spectrumset=pnS005-obj-540-720.pi \
       crossreg_spectrumset=pnS005-obj-420-540.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=350 ycolumn=DETY yimagebinsize=350 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-540-720-540-720.arf spectrumset=mos1S003-obj-540-720.pi \
       crossreg_spectrumset=mos1S003-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-540-720-420-540.arf spectrumset=mos1S003-obj-420-540.pi \
       crossreg_spectrumset=mos1S003-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-540-720-720-840.arf spectrumset=mos1S003-obj-720-840.pi \
       crossreg_spectrumset=mos1S003-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=350 ycolumn=DETY yimagebinsize=350 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-540-720-540-720.arf spectrumset=mos2S004-obj-540-720.pi \
       crossreg_spectrumset=mos2S004-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-540-720-420-540.arf spectrumset=mos2S004-obj-420-540.pi \
       crossreg_spectrumset=mos2S004-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-540-720-720-840.arf spectrumset=mos2S004-obj-720-840.pi \
       crossreg_spectrumset=mos2S004-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=350 ycolumn=DETY yimagebinsize=350 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-540-720-540-720.arf spectrumset=pnS005-obj-540-720.pi \
       crossreg_spectrumset=pnS005-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-540-720-420-540.arf spectrumset=pnS005-obj-420-540.pi \
       crossreg_spectrumset=pnS005-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-420-540.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-540-720-720-840.arf spectrumset=pnS005-obj-720-840.pi \
       crossreg_spectrumset=pnS005-obj-540-720.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

    Skip to the end of the this section.

     evselect table=mos1S003-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=400 ycolumn=DETY yimagebinsize=400 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos1S003-720-840-720-840.arf spectrumset=mos1S003-obj-720-840.pi \
       crossreg_spectrumset=mos1S003-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     arfgen arfset=mos1S003-720-840-540-720.arf spectrumset=mos1S003-obj-540-720.pi \
       crossreg_spectrumset=mos1S003-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos1S003-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos1S003-clean.fits \
       modelootcorr=no

     evselect table=mos2S004-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=400 ycolumn=DETY yimagebinsize=400 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=mos2S004-720-840-720-840.arf spectrumset=mos2S004-obj-720-840.pi \
       crossreg_spectrumset=mos2S004-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     arfgen arfset=mos2S004-720-840-540-720.arf spectrumset=mos2S004-obj-540-720.pi \
       crossreg_spectrumset=mos2S004-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=mos2S004-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=mos2S004-clean.fits \
       modelootcorr=no

     evselect table=pnS005-clean.fits:EVENTS ignorelegallimits=yes imageset=detmap.ds \
       xcolumn=DETX ximagebinsize=400 ycolumn=DETY yimagebinsize=400 squarepixels=yes \
       imagebinning=binSize withimageset=yes

     arfgen arfset=pnS005-720-840-720-840.arf spectrumset=pnS005-obj-720-840.pi \
       crossreg_spectrumset=pnS005-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-720-840.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

     arfgen arfset=pnS005-720-840-540-720.arf spectrumset=pnS005-obj-540-720.pi \
       crossreg_spectrumset=pnS005-obj-720-840.pi crossregionarf=yes withrmfset=yes \
       rmfset=pnS005-540-720.rmf extendedsource=yes modelee=no withbadpixcorr=yes \
       detmaptype=dataset detmaparray=detmap.ds badpixlocation=pnS005-clean.fits \
       modelootcorr=no

  9. At this point all of the XMM spectra (source and background) and calibration files (RMF and ARF) files have been created for the spectral fitting process. However, it must be remembered that there are other background components besides the QPB which still contribute to the source spectrum: the cosmic X-ray background and possibly solar wind charge exchange (typically only the OVII and OVIII lines are critical) and soft proton events. Each of these three background components can be addressed as part of the fitting process. For example (in pseudo Xspec terms):

     Model = cosmic + swcx + sp + source
       = (apec + wabs*(apec + apec + pow) + (gauss + gauss) + (pow) + (source)
       -> con

    Unfortunately, the fitting is more complicated than this. In Xspec V12.0 and higher, the soft proton component must be added as a separate model as it requires a separate diagonal response file. The cosmic background component needs to be constrained, which can be accomplished by simultaneously fitting a ROSAT All-Sky Survey (RASS) spectrum of the off-source background. The RASS spectrum and associated response file can be obtained using the HEASARC X-ray Background Tool. As extended emission is being studied (or you wouldn't be looking at this script), the various spectra need to be normalized to the same solid angle, per square arc minute, which is useful as the RASS spectra come in those units. A second constant scale factor can be added to the model and allowed to float to account for residual calibration discrepancies. Finally, additional Gaussian lines must be added to the model to account for the instrumental fluorescent lines associated with the QPD but are not in the model QPB spectra (the lines are so bright that the residual gain variation of an observation will cause significant residuals).

     Model = cosmic + swcx + sp + source
       = (apec + wabs*(apec + apec + pow) + (gauss + gauss) + (pow) + (source)
       -> (gauss + gauss + gauss + gauss + gauss + gauss + gauss) +
          con*con(gauss + gauss + apec + wabs*(apec + apec + pow) + source)

    To further complicate the model setup, all the spectra should be fit simultaneously to maximize the available constraints, e.g., the cosmic and SWCX background are the same for all XMM-Newton spectra and some parameters of the fluorescent line and SP background can be linked. This is all discussed to a much greater extent in the XMM-ESAS Cookbook.

    A sample Xspec XCM file for these data can be found here. Figure 5 shows the results of the fit.

    Figure 5: Spectral fit of the radial profile spectra of Abell 1795.


Last Updated: 30 May 2013



Caveats

For information about known issues, refer to the ESAS Warnings and Watchouts pages.



[an error occurred while processing this directive]