pileup_color.sl - Making a Color-coded Pileup Image

back to MIT/CXC S-Lang Packages page
back to HETG Tech-notes page
pileup_color.sl v1.0
5/31/07-dd

Summary

Pileup in the ACIS detector, when used with or without a grating, is a "local" phenomenon, that is it varies from pixel to pixel in an image depending on the local event rate. Hence for an extended source (or dispersed grating image) it is useful to make an image calibrated to indicate the observed "island rate" of events:


                       number of events in 3x3 pixel region centered on pixel x,y
 Island Rate (x,y) =   --------------------------------------------------------
                                  number of ACIS readout frames

The pileup_color.sl generates such a color-coded image from a FITS event file.

The island rate is the "Detected Counts per Frame" described in Nowak's "ABC Guide to Pileup" [.ps] and shown as the Y-axis on the middle plot of his Figure 3, reproduced at right. As this plot shows, when the detected rate is low, say below 0.15, then the incident rate is close to the detected rate; whereas for larger detected rates the effect of pileup on count rate (and the ACIS spectrum) can be significant and depends on the "alpha" parameter as well.

The color-coding of the island rate used by pileup_color is given by:

   green  = less than 0.01            tiny tiny pileup
   blue   =   between 0.01 and 0.05   slight effects, perhaps
   yellow =   between 0.05 and 0.15   small pileup corrections
   red    = more than 0.15            need to consider pileup effects
This nominal color-coding can be changed by editing the pileup_color.sl file.

The software

All that is needed is:

The header of pileup_color.sl includes these simple instructions for use:
%  To use,  start isis and load the pileup_color.sl file:
%  
% [linux] isis
%    Welcome to ISIS Version 1.4.4-2
%    ...etc...
% isis> .load pileup_color.sl
% isis>  pileup_color;
% Usage: pileup_color (fits_evt_filename, xcenter, ycenter, image_radius);

Note that this routine is also a good example of how one can make use of the various modules available in isis/S-Lang (FITS reading, histogram, image display, etc.) to do a custom analysis process.


Examples

Example images and the command and printed output from pileup_color are given below. Note that there is one image pixel for each sky pixel, hence the images get larger for larger specified radii. Very small images, e.g., looking at a 10x10 pixel range, can be "scaled" to larger image sizes using the buttons on the imdisplay pop-up controls.

The routine prints out some information about the image, of note are (i) the "max counts-pre-3x3 / frame" value giving the largest detected island rate in the image, and (ii) the "event weighted" version of this which represents the event-averaged value over the selected image. This later value can be useful to assess an overall count rate correction.

Capella with LETG-ACIS, obsid 8319


The zeroth-order is at lower slightly-left and the dispersed image extends to upper right. Note that most of the spectrum has small levels of pileup (green, blue) but that there are some higher rates (yellow) at discrete lines along the spectrum.

The printout values show a maximum local rate of 0.115 but a weighted average rate of only 0.016.

Below is a (scaled) image of the zeroth-order region only; this +/- 10 pixel region has a weighted rate of 0.054:
isis> pileup_color("/data/Chandra/Capella/acisf08319N001_evt2.fits",4090.0,4100.0, 200.0);
 Reading file:  /data/Chandra/Capella/acisf08319N001_evt2.fits
 EXPOSURE(ks) and TIMEDEL(s) values:  59.1466,  2.54104
 Selecting events ...
 max per 1x1 pixel cell: 503
 max local-counts-per-3x3-cell: 2673
 max counts-per-3x3 / frame: 0.114837
 * event-weighted counts-per-3x3 / frame: 0.0158993
 Color coding of local 3x3 regions in image: 
   black  = less than 5 events in all
   green  = less than 0.01 evts/frame
   blue   =   between 0.01 and 0.05 evts/frame
   yellow =   between 0.05 and 0.15 evts/frame
   red    = more than 0.15 evts/frame

SNR E0102 w/ACIS, obsid 6074


Ah, SNR E0102, how nice! Here the overall weighted rate is 0.054 with a ring of moderately piled pixels (yellow, observed rates 0.05 to 0.15); this level doesn't effect the overall count rate severely. Note, however, that with the spectrum dominated by counts in the ~ 0.6 to 1.0 keV range, the few percent of spurious two-piled events will tend to have pseudo energies in the 1 to 2 keV range where their presence has a relatively larger effect.
isis> pileup_color("/data/Chandra/E0102/6074/primary/acisf06074N001_evt2.fits",4150.0,4238.0, 100.0);
 Reading file:  /data/Chandra/E0102/6074/primary/acisf06074N001_evt2.fits
 EXPOSURE(ks) and TIMEDEL(s) values:  19.8447,  3.24104
 Selecting events ...
 max per 1x1 pixel cell: 137
 max local-counts-per-3x3-cell: 969
 max counts-per-3x3 / frame: 0.158257
 * event-weighted counts-per-3x3 / frame: 0.0537666
 Color coding of local 3x3 regions in image: 
   black  = less than 5 events in all
   green  = less than 0.01 evts/frame
   blue   =   between 0.01 and 0.05 evts/frame
   yellow =   between 0.05 and 0.15 evts/frame
   red    = more than 0.15 evts/frame

SNR Cas A w/ACIS, obsid 5319

The largest local rate for this Cas A observation is 0.375, well into the "heavily piled" domain, and many "red" (> 0.15) regions are visible. Even so, the overall weighted rate is ~ 0.050 indicating that many of the events are detected in low-pileup regions.
isis> pileup_color("/data/Chandra/CasA/acisf05319N001_evt2.fits", 4300.0, 3960.0, 400.0);     
 Reading file:  /data/Chandra/CasA/acisf05319N001_evt2.fits
 EXPOSURE(ks) and TIMEDEL(s) values:  42.2589,  3.04104
 Selecting events ...
 max per 1x1 pixel cell: 765
 max local-counts-per-3x3-cell: 5207
 max counts-per-3x3 / frame: 0.374707
 * event-weighted counts-per-3x3 / frame: 0.0498754
 Color coding of local 3x3 regions in image: 
   black  = less than 5 events in all
   green  = less than 0.01 evts/frame
   blue   =   between 0.01 and 0.05 evts/frame
   yellow =   between 0.05 and 0.15 evts/frame
   red    = more than 0.15 evts/frame



Please send any comments to Dan Dewey at dd@space.mit.edu.