corpileup -- read SIS event file affected by pile-up, and output pile-up-corrected spectrum
corpileup inevent outpha
This task reads an SIS event file affected by the event pile-up, estimates amounts of the pile-up, and outputs a spectrum in which pile-up effects are corrected as much as possible. Works only for 1CCD mode observations.
This program finds a point source position, discards a circular region around the source where pile-up is too significant to be corrected, estimates amount of the pile-up, and calculates the pile-up free (supposedly) energy spectrum.
This task divides the event file into many time segments, and calculates pile-up for each segment separately, so that effect of the attitude fluctuation is taken into account.
Pileup is corrected in the following manner. First, Let's assume the following conventions:
img0: raw image (affected by piled-up) img1: simulated incident image pha0: raw spectrum (affected by the pile-up) pha1: simulated incident spectrum pha2: simulated spectrum affected by the piled-up pha3: estimated spectrum of only the events causing pile-up
0. The region where flux is higher than 0.023 cnt/pixel/exposure is determined to be discarded in the following process (the flux threshold has been determined empirically).
1. img0 and pha0 are produced from the input raw event file.
2. Chip is divided into many annuli so that each annulus has approximately a constant flux level. Events for each annulus are considered separately in the following step (but combined to create spectra and images).
3. For each annulus, time order (= read-out order) of all the events from all the read-out is randomized.
4. Let's consider a particular annulus in the i-th read-out in which N events are originally detected. N events are picked up from the randomized event series (and recorded as img1 and pha1), and input on a "virtual chip", and resultant charge distributions on the chip are simulated. The on-board event detection algorithm is applied on the virtual chip.
Note that the number of the simulated events detected on the virtual chip should be less or equal to N due to pile-up. More events are picked-up from the randomized event series (and added to img1 and pha1), until N simulated events are detected. The simulated events detected on the virtual chip are recorded as pha2.
5. Repeat 4 for all the CCD read-out (each 4-sec).
6. Calculate the pure pile-up spectrum as pha3 = pha2 - pha1.
7. Correct pile-up as output-pha = pha0 - pha3. Statistical error of the output pha file is calculated assuming that events in pha0 and pha3 follow the Poisson distribution.
On the other hand, "Active Pixels" on the chip which can detect X-ray photons start from RAWX=6 and RAWY=1, and these are specified in the event file header as the TLMIN* keywords. Consequently, the lower left pixel of the RAW image created with xselect/extractor corresponds to RAWX=6 and RAWY=1. This difference has to be taken into account to precisely compare the RAW images created by corpileup and xselect.
Q. How can I start?
A. Make or obtain a calibrated and screened (hot-pixel-removed) SIS event file, only from the region you are interested (usually within some radius from a bright point source), then use this task. You may want to use the entire chip instead, in that case region selection is not needed.
Q. What kind of ARF should I use?
A. From the input event file you are going to use, create a dummy SIS spectrum only for the purpose of making ARF with ascaarf. Region selection have to be made so that the same detector region corpileup uses is selected. The source position and the radius of the discarded circle by corpileup is recorded in the HISTORY header of the output spectral file.
Q. The output psf by corpileup is strange, e.g., the peak is dull and broad. It does not reach the 0.023 cnt/pixel/exposure threshold.
A. You should suspect the source position determination. Check the source center position corpileup outputs on the screen, and compare it with the image created with other tools such as xselect. If they are significantly different, specify the correct center position with tentcenx and tentceny parameters (either in 'det' or 'sky' coordinates).
Make sure that you are using the CORRECT COORDINATE ('det','sky' or 'raw') specified with the coorsys parameter, and that the source position is given WITHOUT binning. To remove the default binning in xselect, enter 'set xybinsize 1'.
Q. "Warning. loopcounter=20 at ring **" is printed out frequently. And/or the output image has a "black hole" NOT centered on the point source, or does not have such a black hole at all.
A. Suspect the source position determination. Specify the tentative source position (tentcenx and tentceny options).
Q. My target is masked on board. Can I use this task?
A. Not now. Contact email@example.com
Q. The observation mode is FAINT. Can I use this task?
A. Yes. Use the event files after converted to the BRIGHT or BRIGHT2 mode.
Q. Telemetry is saturated. Can I use this task?
A. Yes. Be sure that the source position is determined correctly.
ver 1.0 1997/07/25 by taro kotani (firstname.lastname@example.org) ver 1.2 1997/12/02 fixed minor bugs, improved efficiency by taro kotani ver 1.3 1999/11/02 ftoolization by Ning Gan. ver 1.5 2000/01/12 final FTOOL version.