[an error occurred while processing this directive] ESAS processing of EPIC mosaic-mode observations [an error occurred while processing this directive] ESAS processing of EPIC mosaic-mode observations [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]


This thread describes how to process EPIC mosaic-mode observations and create merged background subtracted and exposure corrected images combining data from all subpointings.

This thread uses data from the observations of Fermi Bubble: ObsID 0672401301. These data are also used as the Mosaic Mode Analysis example where a script and output files are provided.

Expected Outcome

The final outcome of this thread are images of the merged data of the Fermi Bubble observation.

SAS Tasks to be Used


Useful Links

  • This thread makes use of the image display software ds9.
  • A full guide to the use of the ESAS software in SAS can be found at the SOC or at GSFC
  • Cluster analysis paper - Snowden et al. 2008, A&A, 478, 615



This thread contains a step-by-step recipe to create EPIC background subtracted and exposure corrected images from the mosaic-mode observations of the Fermi Bubble.
  1. Set up your SAS environment (following the SAS Startup Thread)

    For this example we will assume the directory structure:
    for the directory where the initial processing of the data will take place with the ODF data in the directory:

  2. Create cleaned (filtered for soft proton excesses) MOS and pn (including OOT processing) event files for your observation:

     epchain withoutoftime=true

    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.

        Limit=1.0 CCD=2 Hardness=6.235 Uncertainty=0.815
         Limit=1.0 CCD=3 Hardness=6.679 Uncertainty=0.957
         Limit=0.90 CCD=4 Hardness=3.807 Uncertainty=0.410
         Limit=1.84 CCD=5 Hardness=4.843 Uncertainty=0.496
         Limit=1.0 CCD=6 Hardness=0.000 Uncertainty=0.000 ****
         Limit=1.0 CCD=7 Hardness=7.094 Uncertainty=0.947
         Limit=1.0 CCD=2 Hardness=3.116 Uncertainty=0.296
         Limit=1.0 CCD=3 Hardness=5.197 Uncertainty=0.651
         Limit=1.0 CCD=4 Hardness=3.966 Uncertainty=0.410
         Limit=1.32 CCD=5 Hardness=5.416 Uncertainty=0.625
         Limit=1.0 CCD=6 Hardness=5.297 Uncertainty=0.722
         Limit=1.0 CCD=7 Hardness=4.739 Uncertainty=0.544

    In this case the only CCD not useful is MOS1 CCD#6, which was lost to a micrometeorite hit.

    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 mos1S001-hist.qdp, mos2S002-hist.qdp, and pnS003-hist.qdp and can be plotted using the command, for example, qdp mos1S001-hist.qdp. Figure 1 shows the light-curve screening for the MOS1 instrument.

    Figure 1: MOS1 light curve for the Fermi Bubble mosaic mode observation. This was a particularly clean observation.

  3. Run emosaic_prep to separate the observation into its subpointings which are placed in subdirectories with the prefix prep_mosaic_ and a three-digit suffix with the number of the subpointing (e.g., emosaic_prep_001). emosaic_prep needs to be run twice, one time for the normal PN events and one time for the PN OOT events. The MOS data must be deleted after the first run.

    However, before running emosaic_prep the SAS_ODF environment variable needs to be set so it points directly at the *.SAS file created by odfingest:

     setenv SAS_ODF odf/2154_0672401301_SCX00000SUM.SAS

     emosaic_prep mos1evtfile='mos1S001-clean.fits' mos2evtfile='mos2S002-clean.fits' \
      pnevtfile='pnS003-clean.fits' atthkfile='atthk.fits'

    The data from the subpointings are placed in directories with the nomenclature:


    To avoid conflicts, delete the MOS files created in the first run. They will be recreated in the second run.

     rm -f prep_mosaic*/mos*-clean*.ds

    Run the task emosaic_prep the second time, this time with the PN OOT event file.

     emosaic_prep mos1evtfile='mos1S001-clean.fits' mos2evtfile='mos2S002-clean.fits' \
      pnevtfile='pnS003-clean-oot.fits' atthkfile='atthk.fits'

  4. Run the task esprep_mosaic_time to extract the time intervals for the individual pointings (written to the file mosaic-times.txt), which are used in esas-mosaic to correct all the pointing information.

     esprep_mosaic_time atsfile=../odf/2154_0672401301_SCX00000ATS.FIT \

  5. Run the task esas-mosaic to correct the header information of the subpointings. esas-mosaic will step through the subpointing directories and run the task esprep_mosaic to make the corrections.

     esas-mosaic sublist=mosaic-times.txt m1prefix=1S001 m2prefix=2S002 pnprefix=S003

  6. Process data from the three detectors in all of the subdirectories following the methods outlined in the Image Analysis thread.


    where /fermi/0672401301/merge is the directory for the merged image processing, the prep_mosaic_* directories contain the individual subpointing image processed data. The ODF data are in the /fermi/0672401301/odf directory. For the processing point the environmental variable $SAS_CCF to the file created in the initial processing: /fermi/0672401301/proc/ccf.cif

  7. Finally, mosaic the data following the methods outlined in the Mosaic Analysis thread. The resulting images are shown in Figure 2.

    Figure 2: Merged EPIC adaptively smoothed images of
    the mosaic-mode observation of the Fermi Bubble.

Last Updated: 31 May 2013


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

[an error occurred while processing this directive]