The Neil Gehrels Swift Observatory

Making BAT Sky Images

1. Overview:

This thread describes how to make a sky image from BAT event data using the 'batbinevt' and 'batfftimage' tasks.

Read this thread if you want to: Make wide field BAT sky images.

Last update: 2007-07-17

2. Introduction

While the BAT does not have focussing optics, it is possible to create sky images using the task batfftimage. This task combines a detector plane image and information about the coded aperture pattern to reconstruct the sky flux at each point in the field of view. Sky images have the same flux units as all other mask weighted counts values.

The steps of this procedure are: (1) make a source detector plane image using batbinevt; (2) optionally make a background detector plane image; and finally (3) to make a sky image using batfftimage.

3. Prerequisites

For example, let's assume we are interested in the burst GRB 050713A, in particular to produce an image of the "flare" from time 142921843 (MET) to 142921868 (MET).

4. Change into Event Directory

Change directories to the location of the event data.

cd 00145675000/bat/event

5. Make a Detector Plane Image

A Detector Plane Image (DPI) is a map of the counts (or count rate) in each detector as it is layed out geographically in the detector plane. This map is the input to the deconvolution software.

Issue the following command,

  batbinevt infile=sw00145675000bevshsp_uf.evt.gz outfile=flare.dpi outtype=DPI \
    timedel=0.0 timebinalg=u tstart=142921843 tstop=142921868 \
    energybins=14-150 outunits=RATE weighted=NO ecol=ENERGY \
    detmask=../hk/sw00145675000bcbdq.hk.gz clobber=YES 

where

The result should be a single detector plane image. It is also possible to select multiple time ranges or multiple energy bands. batfftimage will automatically process these to produce sky images in multiple slices.

6. Making a Background Detector Plane Image

Making a background detector plane image is optional, but it will increase the sensitivity of the image when bright sources are present. If possible, the background interval should be made from data with similar background levels and for a longer duration than the source image.

Use the same procedure as above to create a DPI file during a time range when you know there is no source emission. Let us call that file "bkg.dpi".

NOTE: if the background or bright sources are known to have varied significantly between the time of the source and background DPIs, there may be little or no benefit to making a background file.

Advanced usage: if bright sources are known to be present in the image, it is possible to use the batclean task to create a background map which removes many systematic artifacts. This is usually not necessary for images with exposures less than 100 seconds.

7. Making a Sky Image

A sky image is created from a DPI using the 'batfftimage' task. Issue the following command,

 batfftimage infile=flare.dpi outfile=flare.img attitude=../../auxil/sw00145675000sat.fits.gz \
  bkgfile=bkg.dpi detmask=../hk/sw00145675000bcbdq.hk.gz clobber=YES

where

The result is a BAT sky image. If valid spacecraft attitude data was used, then the sky image should automatically have celestial coordinates (WCS keywords) attached.

You may use your favorite FITS image viewer to examine the image (for example FV or DS9).

batfftimage-ptsrc.png
Figure 1. Bright point source in a BAT sky image.

Figure 1 shows the appearance of a typical bright point source in a BAT sky image.

8. Caveats

The spacecraft attitude may have changed during the accumulation interval of your DPI. You must carefully filter out spacecraft slew data and use only steady pointed attitude information, or the celestial coordinate system will be erroneous.

9. Making a Partial Coding Image

As described elsewhere, the BAT has a large field of view with a large variation in sensitivity. The partial coding map describes the fraction of the detector array which is illuminated by each point on the sky. To make a partial coding map, issue the following command,

 batfftimage infile=flare.dpi outfile=flare.pcodeimg attitude=../../auxil/sw00145675000sat.fits.gz \
  bkgfile=bkg.dpi detmask=../hk/sw00145675000bcbdq.hk.gz clobber=YES pcodemap=YES

Note that the only change from the previous call is to use the parameter "pcodemap=YES", and to change the output file name.

10. Modifications