file: /nfs/spectra/d2/GtoHAK/CasA/pileup_020104/README.txt Purpose ------- Estimate the event rate per 3x3 pixel island in an ACIS image to assess pileup level. (Here we do it for the zeroth-order image of the HETGS Cas A observation, obsid 1046.) Procedure summary ----------------- Make an image using all events (i.e. unfiltered by grade, etc. For large files the first 1 million events, say, can be used, "#row .le. 1000000" as long as the resulting TIME or EXPOSURE is correct for the shortened event list). Boxcar smooth the image by a 3x3 boxcar. The values at each pixel in this smoothed image are then equal to: (Number of events in local 3x3 region centered on this pixel) / 9 Find the value above expected if there were 1/10 event per frame per 3x3 island. Actual values well less than this value are relatively unpiled; values approaching or exceeding this have relevant pileup. This "10% pileup" number is given for the observation by: "10% pileup" number = 1/9 x 0.1 x number of frames = 1/9 x 0.1 x (max(TIME)-min(TIME))/TIMEDEL Example on Cas A: HETGS Zeroth-order image ------------------------------------------- - Select the first 1 million events from the evt1 or evt1a file: [unix] fselect Name of FITS file and [ext#][...] acisf01046_000N001_evt1a.fits Name of output FITS file[...] acisf01046_000N001_N1M_evt1a.fits - Use IDL to find the true time range and number of frames in this subset of events: IDL> evts = mrdfits('acisf01046_000N001_N1M_evt1a.fits',1) MRDFITS: Binary table. 26 columns by 1000000 rows. IDL> print, min(evts.time) 1.0719868e+08 IDL> print, max(evts.time) 1.0720491e+08 IDL> print, max(evts.time) - min(evts.time) 6232.4773 IDL> print, (max(evts.time) - min(evts.time)) / 3.24104 1922.9869 There are 1923 frame times in this set of events. The "10% pileup" number when 3x3 smoothed is thus: 1/9 x 0.1 x 1923 = 21.3667 - Create an image of the desired region [unix] dmcopy Input dataset/block specification (): acisf01046_000N001_N1M_evt1a.fits[events][bin x=3700:4520,y=3770:4320] Output dataset name (): acisf01046_000N001_N1M_img.fits - 3x3 boxcar smooth the image [unix] fboxcar datatype = e clobber = yes Input FITS image to be fit[...] acisf01046_000N001_N1M_img.fits Output FITS image[...] acisf01046_000N001_N1Mbc3x3_img.fits X dimension of box[3] 3 Y dimension of box[3] 3 - Use ds9 to display the smoothed image and look for values that are near or above the 21.4 value calculated above... [unix] ds9 acisf01046_000N001_N1Mbc3x3_img.fits & Used color settings of "invert" and "sls" and "print"ed the image to a .ps file, e.g., CasA_zo_pileup.ps . Using the cursor to inspect pixel values corresponding to the colors in this image show that: Yellow is at about a value of 8.5, or a "4% pileup" rate. Orange and Red regions are less than this level and so are at most only slightly piled up. Green has values around 13-14 and Blue to Black regions have values of 17 to 23.9 and so they are roughly at the "10% pileup" level (of 21.4.) Note that this example is for the HETGS zeroth-order: the non-grating Cas A observations will have pileup rates of 30% or higher in the high-rate regions!