CHANDRA
detect
1.0 User Guide
CIAO
Software Release V1.1; 17 December 1999
A. Dobrzycki, H. Ebeling, K. Glotfelty, P. Freeman, F. Damiani, M. Elvis, &
T. Calderwood
Document Version 1.1; 17 December 1999
CHANDRA X-Ray Center
Smithsonian Astrophysical Observatory60 Garden Street Cambridge, MA 02138
USA
Additional Sources of Help with detect
Contributors xiii
Preface and Acknowledgements xv
I
An Introduction to
detect
1
1 A Quick Tour ofdetect 3
1.1 Introduction . . . 3
1.2 Common Features . . . 5
1.3 ASCDS Setup . . . 5
1.4 Manipulation of input parameters . . . 6
1.5 On-line HELP . . . 6
1.6 Sliding cell: celldetect . . . 6
1.7 Wavelet — Chicago: wavdetect . . . 7
1.8 Wavelet — Palermo . . . 7
1.9 Voronoi Tessellation & Percolation: vtpdetect . . . 7
1.10 Checklist of basic decisions . . . 8
II
detect
Cookbook
9
2 Runningdetect 11
2.1 SimulatedChandra data . . . 11
2.2 Sliding cell: celldetect . . . 11
2.2.1 Key parameters to consider . . . 14
2.2.2 Example of ACIS-S (back illuminated chip) for the simulated field . . . 15
2.2.3 Evaluation . . . 17
2.3 Wavelet — Chicago: wavdetect . . . 17
2.3.1 Key parameters to consider . . . 19
2.3.2 Example: The simulated ACIS-S field . . . 20
2.3.3 Evaluation . . . 24
2.4 Wavelet — Palermo . . . 24
2.4.1 Key parameters to consider . . . 24
2.4.2 Example . . . 24
2.4.3 Evaluation . . . 24
2.5 Voronoi Tessellation & Percolation: vtpdetect . . . 24
2.5.1 Key parameters to consider . . . 26
2.5.2 Example: An HRC version of the simulated field . . . 26
2.5.3 Evaluation . . . 28
2.6 Recipe for overplotting detections on images using SAOtng . . . 28
2.6.1 Recipe . . . 28
2.6.2 Notes and Options . . . 30
3 Comparison of detect Methods 31 3.1 Factors affecting performance and runtimes . . . 31
3.1.1 celldetect . . . 31
3.1.2 wavdetect . . . 31
3.2 Sample runtimes . . . 32
4 False Detection Rates in celldetect 35 4.1 Introduction . . . 35 4.2 Description of Simulations . . . 35 4.3 celldetectSettings . . . 36 4.4 Results . . . 36 4.5 Summary . . . 37 4.6 Appendix . . . 41
4.6.1 SNR Threshold Values vs. Off Axis Angle Data . . . 41
4.6.2 Fitted Function Coefficients . . . 42
4.7 References . . . 42
III
detect
Theory
45
5 Sliding Cell - CELLDETECT 47 5.1 Algorithm overview . . . 475.2 Algorithm details . . . 47
5.2.1 Background estimated from the background frame . . . 48
5.2.2 Background estimated from the background map or background value with known uncertainty . . . 49
5.2.3 Background estimated from the background map or background value, with negligible uncertainty . . . 49
5.3 Detect cell size . . . 49
5.4 Background frame . . . 50
5.5 Tool output options . . . 50
5.5.1 All detections . . . 51
5.5.3 Centroids of events in detect cells . . . 51
5.6 References . . . 52
6 Wavelets — Chicago 53 6.1 Source Detection Using Wavelet Functions . . . 53
6.2 Basic Algorithm . . . 54
6.3 Source Pixel Identification . . . 55
6.3.1 Background Estimation . . . 55
6.3.2 Correlation Image . . . 56
6.3.3 Error Estimation . . . 58
6.4 The Source List . . . 59
6.4.1 Constructing the Source List . . . 59
6.4.2 Source Properties . . . 62
6.5 The Mexican Hat (MH) Function . . . 64
6.6 Solutions to Integrals Involving the MH Function . . . 65
6.6.1 Analytic Integration of the MH Function . . . 65
6.6.2 Analytic Fourier Transform of the MH Function . . . 67
6.7 Computation of Threshold Correlation Values . . . 68
6.8 Default Background Map . . . 70
6.8.1 The Default Normalized Background . . . 70
7 Wavelets — Palermo 73 7.1 A Quick Guide to PWAVDETECT . . . 73
7.1.1 Introduction . . . 73
7.1.2 Overview . . . 74
7.1.3 PWAVDETECT Input Parameters and Files . . . 74
7.1.5 A Simple Example . . . 76
7.1.6 Additional Notes . . . 77
8 Voronoi Tessellation & Percolation 79 8.1 Introduction . . . 79
8.2 Description of the algorithm by simulation data . . . 80
8.2.1 The Voronoi tessellation . . . 81
8.2.2 The inverse area distribution . . . 81
8.2.3 The percolation . . . 83
8.2.4 The suppression of fake sources . . . 85
8.2.5 Comparison of input and obtained source characteristics . . . 87
8.3 Application to ROSAT X-ray data . . . 88
8.4 Conclusions . . . 88
IV
detect
Reference Manual
91
9 detect Tools: Input Parameters & Data Products 93 9.1 celldetect . . . 939.1.1 celldetect: Input parameter file - with default values . . . 93
9.1.2 celldetect: Input parameter description . . . 95
9.1.3 celldetect: Data products description . . . 99
9.2 wavdetect: The Chicago Wavelet package . . . 101
9.2.1 wavdetect: Input parameter file - with default values . . . 101
9.2.2 wavdetect: Input parameter description . . . 103
9.2.3 wavdetect: Data products description . . . 109
9.3 Wavelet — Palermo . . . 114
9.3.2 Input parameter description . . . 114
9.3.3 Data products description . . . 114
9.4 vtpdetect . . . 114
9.4.1 vtpdetect: Input parameter file - with default values . . . 114
9.4.2 vtpdetect: Input parameter description . . . 115
9.4.3 vtpdetect: Data products description . . . 119
10 Acronym List 121
2.1 Simulated Field for Testing . . . 12
2.2 Simulated Sources for HRC . . . 13
2.3 Celldetect for ACIS-S . . . 18
2.4 Wavdetect reconstructed image . . . 25
2.5 VTP Source Detections . . . 29
4.1 False detection rates for whole field of viewACIS-I . . . 38
4.2 False detection rates forHRC-I, inner region . . . 39
4.3 False detection rates forHRC-I, outer region . . . 40
5.1 Sample plot of the detect cell size as a function of the off-axis angle for HRC-I. . . 50
8.1 vtp cells . . . 82 8.2 vtp flux distribution . . . 84 8.3 vtp simulated data . . . 86 8.4 vtp detections . . . 87 8.5 NO FIGURE AVAILABLE . . . 87 8.6 NO FIGURE AVAILABLE . . . 88 8.7 NO FIGURE AVAILABLE . . . 88 ix
1.1 detectOptions . . . 4
3.1 Sample runtimes fordetecttools . . . 32
4.1 ACIS-I:SNR thresholds, as a function of off axis angle, for three exposure times. The false source rates are per fourACIS-Ichips. . . 41 4.2 HRC-I: SNR thresholds, as a function of off axis angle, for three exposure times. The false
source rates are per fullHRC-Ifield of view. . . 42 4.3 Coefficients for best fits to Eq. 4.1, for three exposure times. The false source rates are per
full field of view (0.08 deg2forACIS-I, 0.25 deg2 forHRC-I). . . . 43
Adam Dobrzycki Co-ordinating Scientist (CXC); [email protected] Harald Ebelinga VTP Scientist (University of Hawaii); [email protected] Peter Freemana Wavelet Scientist (SAO); [email protected] Vinay Kashyapb Wavelet Scientist (SAO); [email protected]
Francesco Damianic Wavelet Scientist (Palermo Observatory); [email protected] Kenny Glotfelty VTP Software Developer (CXC); [email protected]
Tom Calderwood Celldetect & Wavelet Software Developer (CXC); [email protected] D. E. Harris Editor, DETECT User Guide; [email protected]
B. Wilkes Editor in Chief, Software Guides; [email protected] A. Prestwich Document Series Production (CXC); [email protected] Joan Flanagan Document Series Production (CXC); [email protected] R. Kilgard Document Series Production (CXC); [email protected]
a.Beta-test scientist.
b.formerlyCXCBeta-test scientist at the University of Chicago, now at SAO. c.volunteer Beta-test scientist.
TheChandra detectUser Guide is intended to assist astronomers in detecting significant features within the data returned by NASA’sChandraX-ray Observatory (previously known as the Advanced X-ray Astrophysics Facility or ‘AXAF’).
TheChandramirrors have an angular resolution some 10 times finer than any previous X-ray telescope. As a result it has become clear that no single method for the detection of X-ray sources will be adequate. With Chandra complex source structure will be far more commonly seen than ever before; moreover extended sources will be spread over more resolution elements, making low surface brightness objects hard to detect; finally, theChandrapoint spread function degrades in the outer regions of the field of view.
To respond to these needs theCXChas provided the ‘detect’ package. This software contains a set of three basic source detection methods each of which is best suited to detecting a different type of source.
The three basic methods are the ‘sliding cell’ technique (familiar from the Einsteinand ROSATmissions), and the relatively unfamiliar ‘wavelet’ and ‘VTP’ source detection methods. VTP is good at finding low surface brightness and irregularly shaped sources; wavelets are good for point source detection, being able to effectively resolve sources in crowded fields, and can also be used for analyzing extended sources; while the sliding cell methods are robust ways of finding more isolated point sources.
detectand theChandra detectUser Guide were developed by a team at theChandraScience Center (CXC) at the Smithsonian Astrophysical Observatory together with collaborators at the University of Chicago, the University of Hawaii, and the Osservatorio Astronomico G.S. Vaiana (Palermo).
This Guide is designed to serve as an introduction, users’ guide, and reference manual to detect. Please address any comments or suggestions to Adam Dobrzycki at [email protected].
We gratefully acknowledge the aid and support of various members of the Chandra project including the Mission Support Team, the Beta Testers, and the Data Systems group.
Adam Dobrzycki Harald Ebeling Peter Freeman
1998 December
An Introduction to
detect
A Quick Tour of
detect
1.1
Introduction
The detection of significant features in 2D images is at the heart of much of astronomy, as well as of other areas of science. Xray astronomy poses some special challenges large sparse arrays, Poisson statistics -that mandate specially developed methods for source detection. Moreover the extremely small beam area of theChandramission will resolve tight clusters of sources from what was previously seen only as a blob, and will render extended low surface brightness sources hard to find.
The CXC has responded to these needs by providing the detect package. This consists of three types of algorithm, each tailored to address the different source detection problems that the user of Chandra data will encounter. Table 1.1 gives a concise listing of the tools.
In this section, we provide a brief description of each tool and the most minimal instructions on how to run the software. Chapter 2 contains the more extensive discussion needed for general use with examples for each method and a short discussion of the primary parameters. For a complete description of all parameters and the data products, see chapter 9.
Cell Detect
The best known detection algorithm for X-ray images is the ‘sliding cell’ method developed for use with the Einstein Observatory images and also employed by the standard processing ofROSAT data. This method was tailored to optimize the detection of unresolved sources and had two variants, ‘local detect’ and ‘map detect’. In the former, the background is estimated in a frame around the detect cell and in the latter, a background map is required. The observed data may be cleaned of strong sources to generate the background map or a background map may be constructed from a collection of other data. Each of these methods has limitations, the most obvious perhaps is the difficulty of detecting resolved sources and estimating their parameters (e.g. size, intensity, etc). celldetectis good at detecting unresolved sources for a wide variety of data (e.g. images that are oversampled; those with dominating background levels; and those covering a very large area compared to the size of the resolution element). The current implementation provides for the option of a cell size which increases with off-axis distance and has been generalized so that at a future date, the detection cell will not have to be a tophat: it may be a user supplied function or the Point Spread Function (PSF).
Table 1.1: detect Options
Method Strengths Weaknesses
celldetect 1. Long heritage (Einstein,ROSAT); well under-stood.
1. Requires fine tuning of parameters for ex-tended sources.
2. Good for faint point sources, outside crowded fields.
2. Divides extended sources into multiple point sources.
3. Has difficulty separating closely spaced point sources.
wavdetect 1. Separates closely spaced point sources. 1. Slower than celldetect. 2. Finds extended sources well.
pwavdetect
vtpdetect 1. Finds faint low surface brightness features. 1. Combines closely spaced point sources. 2. Extended sources found as single source in
visually ’correct’ way, regardless of their actual shape.
2. Combines diffuse emission with embedded point sources.
3. Slow for more than≈ 105 photons.
Wavelet Detect
The wavelet detect method is conceptually similar to that of the sliding cell, in that the localized wavelet function is correlated with the data to create a correlation image. The wavelet function (aka ‘kernel’) that is used is the Marr, or ‘Mexican Hat,’ wavelet function (section 6.5), which has a positively valued quasi-Gaussian core surrounded by a negatively valued annulus; the overall normalization is zero. The annulus is itself convolved with the data to determine the background at each pixel, and background and correlation values are compared so as to determine which pixels are associated with sources. A point source is most easily detected when a wavelet function of similar size to the PSF is used; since the PSF size varies markedly over the field of view, putative source lists are made at a number of scales, which are then combined to yield a final source list with estimated locations, count rates, etc. Two separate wavelet packages are provided, the ‘Chicago’ version and the ‘Palermo’ version (the names refer to the location where they were developed). The Chicago system is fully supported by theCXC, whereas the Palermo code is supplied by F. Damiani, who assumes full responsibility for its maintenance.
Voronoi Tessellation and Percolation (VTP)
A quite different approach is used by the VTP method. The tessellation constructs a convex Voronoi cell around each occupied pixel and assigns fluxes to them based on the number of photons in the pixel, the cell area, and the effective exposure time at the pixel location. Thus background photons have large cells and low fluxes associated with them, whereas source photons are characterized by small cells and high fluxes. The flux at which the observed cumulative distribution of fluxes for the selected region begins to deviate from the one expected for random Poissonian noise is used as a threshold to discriminate between background events and pixels that may belong to sources. Pixels with associated fluxes exceeding the threshold are passed to a non-parametric percolation algorithm that groups adjacent high-flux pixels into sources. The advantage of VTP is that no assumptions are made about the geometrical properties of the sources and that very extended sources are detected as significant without a single pixel in the image being required to feature a photon count significantly different from the background. Therefore, VTP is particularly well suited for resolved sources of low surface brightness and potentially irregular shape. The main disadvantage of the algorithm is that it tends to produce blends when run with a low flux threshold on crowded fields.
1.2
Common Features
A critical aspect of all the methods is to determine the threshold for the significance of a detection, and generally this has relied on Monte Carlo simulations. A common choice for the threshold level is that which would provide one false detection per observation (e.g. ∼10−6 for one 1024x1024 ACIS chip).
All of the detect algorithms in this package require substantial resources in computer memory and cpu’s. While we have not yet mounted a major benchmarking project, we include a few comments in chapter 3 to give some idea of performance.
1.3
ASCDS Setup
If you need to obtain and install the software, the instructions are given in the first chapter ofA Beginner’s Guide to the CIAO. If you are at the CXC, you should follow the instructions to be found at:
http://icxc.harvard.edu/soft/docs/docs.htm
You can check success with a command like:
unix:which wavdetect
which should result in something like:
/home/ascds/DS.release/bin/wavdetect
Anything resembling:
wavdetect: Command not found.
would be an indication that your unix environment does not see the detect tools. If that happens, before anything else, try:
unix:rehash
and try again.
NB: If you encounter problems with other common tools like IRAF or ’ftools’, we recommend using a particular window for ASCDS software only. Some implementations of the ASCDS software environment sets paths to these tools, and thus when a tool is invoked in this window, the ASCDS version will be accessed. The resulting tool may not behave normally.
1.4
Manipulation of input parameters
To display a parameter file, type:unix:plist celldetect
You can set individual parameters one at a time: e.g. unix:pset vtpdetect infile=foo.fits,
or (with the value in quotes),
unix:pset wavdetect scales= "1.0 2.0 4.0 8.0 16.0"
You can also specify parameters on the command line; e.g.
unix:celldetect infile="myinput.fits" outfile="myoutfile.fits"
1.5
On-line HELP
To display a help file for a task, type (e.g.), unix:ahelp vtpdetect
1.6
Sliding cell:
celldetect
To see how celldetect is run, choose an input file which is an array of size 2048×2048 or smaller. Sample data files are included with the software release.
The following parameters must be set: infile=your-input-filename
outfile=your-desired-output-filename
Edit the parameter file withpsetand then runcelldetect:
unix:pset celldetect infile = "myinputfile" unix:pset celldetect outfile = "myoutputfile" unix:celldetect
The output ofcelldetectis a list of sources containing a number of output parameters which are mostly self explanatory. Further details of thecelldetectoutput are given in section 9.1.3.
1.7
Wavelet — Chicago:
wavdetect
To experiment with wavdetect, we suggest testing it on a field which has both unresolved and extended sources.
You will need to provide filenames forinfile,outfile,scellfile,imagefile,defnbkgfile.
Check that your paths are properly set and enter the required parameters.
unix:which wavdetect
/home/ascds/DS.release/bin/wavdetect unix:pset wavdetect infile = myinput unix:pset wavdetect outfile = myout unix:pset wavdetect scellfile = mycell unix:pset wavdetect imagefile = myimage
unix:pset wavdetect defnbkgfile = mybackground
If your data have an associated exposure image, replace ’none’ with the appropriate file name (expfile). Also check your choice ofscales. Review your selection withplistif you wish, and run the program:
unix:wavdetect
The output consists of images (e.g. the background map and a reconstruction of detected sources) and lists containing source information. Details ofwavdetect data products are given in section 9.2.3 and details of the algorithms are given in Chapter 6.
1.8
Wavelet — Palermo
NB: SOFTWARE NOT YET AVAILABLE.1.9
Voronoi Tessellation & Percolation:
vtpdetect
To testvtpdetect, choose an image that contains extended sources of low surface brightness. The image can be large but should be dominated by unoccupied pixels unless memory and CPU time limitations are not an issue. As for the other examples, usepsetto input the required parameters. Set theinfileandoutfile names.
unix:which vtpdetect
/home/ascds/DS.release/bin/vtpdetect unix:pset vtpdetect infile = myin
unix:pset vtpdetect outfile = myout
Then run the program at different flux thresholds (by setting the input parameter scaleto values other than one) to vary the sensitivity to very low surface brightness emission and the frequency of blends in the resulting source list.
unix:vtpdetect
The output source list is described in section 9.4.3; details ofvtpdetectare given in Chapter 8.
1.10
Checklist of basic decisions
For alldetectprograms:• specify input file (parameter: infile)
• specify output file (parameter: outfile)
• consider limitations on size of data or image
celldetect
• choose method of background estimation: LDETECT, background map, or fixed value (parameters: bkgfile,bkgvalue,bkgerrvalue)
• choose method of cellsize: fixed or match to PSF (parameter: fixedcell)
• choose s/n threshold (parameter: thresh)
• decide on content of source list: report all cells above threshold; only the cell with the largest SNR in a continguous group; or the centroid of the distribution (parameters: findpeaksandcentroid)
wavdetect
• select scales for wavelet function (parameter: scales)
• match s/n threshold to data size (parameter: sigthresh)
vtpdetect
detect
Cookbook
Running
detect
In this chapter we describe a simulated Chandraobservation and then show how to run each of the detect tasks. The data files used in the examples accompany the software so that users can reproduce our results or experiment with different input parameters. See Chapter 9 for a complete listing of parameters and output products.
2.1
Simulated
Chandra
data
Since thedetect tools are designed for the analysis ofChandra X-ray Observatory data, we test them using simulated ACIS and HRC data produced with the MARX simulator. The critical elements of detection algorithms are how well close sources can be recovered, the ability to find extended sources, and the separation of unresolved sources within extended emission. The field we constructed is shown in Figures 2.1 and 2.2 for the HRC.
The simulation contains a background corresponding to a 30 ks exposure and has 6 repetitions of a linear array of sources. The basic array consists of 6 unresolved sources of the same intensity. From the first source, the following 5 are spaced at 0.5, 4, 5, 10 and 30 arcsec. Sixty arcsec from the last of these 6 sources, the pattern is repeated, but at the position of the last source, an additional extended source is added. The extended source is a Gaussian with a sigma of 2500. At right angles to this line of sources, at a distance of 6000and 12000, the pattern is repeated in two additional rows. In the first of the three rows, the unresolved sources have approximately 200 counts each (depending on the detector and off-axis distance) and the extended source has about 2500 counts. For the second row, the unresolved sources are much weaker with ≈30 counts each (the extended source intensity does not change). The last row is the same as the middle row except that the unresolved sources are changed to discs with a diameter of 100.
2.2
Sliding cell:
celldetect
TheCXCversion of this method is based on theEinsteinandROSATcodes but contains enhancements to improve performance, particularly forChandradata. The standard approach is used: the cell jumps by 1/3
Figure 2.1: An HRC version of the simulated field used for demonstration of detect algorithms. This is a block 4 version to show the complete grid of sources. The circle shows the approximate position of the aim point.
Figure 2.2: At full HRC resolution, the basic grid of sources is shown for the simulated field. The distance between the first and last sources is 3000.
of its size, and candidate detections are flagged wherever the net counts exceeds the desired s/n threshold. Future options will include the use of functions other than the “top hat” and the use of exposure maps is also planned.
2.2.1
Key parameters to consider
infile,outfile,kernelThe input file,infile, can be either an event list or an image (IRAF/.imh file or a FITS file with primary array). The current maximum size allowed for an image is 2048×2048, but an event list may occupy a larger spatial region. For data sets larger than 2048x2048,celldetectutilizes the “recursive blocking scheme”: first the inner 2048x2048 pixel region of the data set is searched for sources, then the inner 4096x4096 pixel region (excluding the part already analyzed) is blocked by 2 and searched for sources, then the inner 8192x8192 is blocked by 4, etc. For each consecutive search the part that has already been searched for sources in higher resolution is removed from analysis, so that for each region on the data set just one blocking factor is used.
It is necessary to provide a name for the output file. The parameterkernelcan take on the values of ’default’ (output format same as input file), ’fits’, or ’iraf’ (.imh files and qpoe files).
bkgvalue,bkgfile
In general, the first problem is to choose a method of determining an estimate of the background counts in the detect cell. If a reliable background map is available, one is able to detect extended sources which are devoid of significant brightness gradients.
The options for background in the current code include a constant (user supplied value, bkgvalue), a background map (also supplied by the user, bkgfile), and the standard “Ldetect” (local detect) method which uses a detect cell surrounded by a frame so that the background can be estimated locally. Providing a non-zero value forbkgvalueor a string other than ‘none’ forbkgfileare the switches which turn off local detect.
For Ldetect, the size of the background frame is calculated from the size of the detect cell size, by multiplying it by√2 and then rounding it up or down to the closest number of the same parity as the detect cell size. In that way two goals are achieved: first, the area of the background frame is roughly the same as the area of the detect cell, and second, the background frame is centered on the same location as the detect frame. If a background map is provided, then the background value will be obtained from that map by using the same pixels as the detect cell.
fixedcell,cellfile
The cell size can be chosen as a hard parameter (fixedcell, in pixels) or the code will compensate for the larger Point Spread Function (PSF) off-axis by increasing the size of the cell with off-axis distance (see Figure 5.1 for a plot of the cellsize as a function of off-axis distance). We plan to have a library of PSFs for many different detector/mirror combinations, but at present, theChandraHRC and ACIS detectors are the sole combinations. Therefore, if you want to test the tool on data other than that fromChandra, you should supply a value for fixedcell which is 1, or an integer evenly divisible by 3.
If a filename is provided for the parametercellfile, then one or more images are created having as pixel values the detect cell size at that pixel location.
As is well known, local detect methods are not very useful for significantly extended sources. To overcome this limitation, one should either setfixedcellto a size sufficient to match the expected size of an extended source or employ a background map (or fixed value for the background) so as to avoid the use of local detect.
thresh
The detection threshold,thresh, is the signal to noise cutoff, and should be set to a value of 3 or 4 for first attempts.
findpeaks,centroid
If the parameter findpeaks=no, then the source list will consist of all detection cells which exceeded the s/n threshold. Iffindpeaks=yes, adjacent detections are recognized as a single source and the cell with the largest s/n is that which appears in the source list. Ifcentroid=yes, the source list will be based on the source centroid and additionally the major and minor axes of the events distribution are calculated as well as the position angle of the major axis.
See sections 9.1.2 and 9.1.3 for a complete description of parameters and data products.
2.2.2
Example of ACIS-S (back illuminated chip) for the simulated field
We edit the parameter with pset. We put a spatial filter on the input filename to cut down on computer time looking at empty regions. We specify a filename forcellfileso as to be able to evaluate the increase in cellsize off-axis. Finally we setlog=yes in order to have a record of the run.
unix: pset celldetect infile = "chip7img1023_sim1.fits[123:630,109:614]" unix: pset celldetect outfile = sim1srcout.fits
unix: pset celldetect cellfile = "cellmap_sim1" unix: pset celldetect log = yes
unix: plist celldetect
Parameters for /home/user/ascds_iraf/uparm/celldetect.par
#
# celldetect parameter file #
#
# input #
infile = chip7img1023_sim1.fits[123:630,109:614] Input file #
# output #
outfile = sim1srcout.fits Output source list #
# output options #
(clobber = yes) Overwrite exiting outputs? #
# output content/format options #
(thresh = 3) Source threshold (findpeaks = yes) Find local peaks?
(centroid = yes) Compute source centroids? #
# detect cell size parameters #
(fixedcell = 0) Fixed cell size to use (0 for variable cell) (xoffset = INDEF) Offset of x axis from data center
(yoffset = INDEF) Offset of y axis from data center (eband = 1.4967) Energy band
(eenergy = 0.8) Encircled energy of PSF
(psftable = ))echo $ASCDS_CALIB/psfsize.fits -> /home/ascds/DS.daily/data/psfsize.fits) Table of PS (cellfile = cellmap_sim1) Output cell size image stack name
#
# background parameters #
(bkgfile = ) Background file name (bkgvalue = 0) Background count/pixel (bkgerrvalue = 0) Background error #
# exposure map (not implemented at present) #
(expfile = ) Exposure map file name #
# using defaults is recommended here #
(convolve = no) Use convolution?
(snrfile = ) SNR output file name (for convolution only) (stall = no) Stall for debugger?
#
# run log verbosity and content #
(verbose = 2) Log verbosity level
(log = yes) Make a celldetect.log file? #
# mode #
(mode = ql)
unix: celldetect
Input file (chip7img1023_sim1.fits[123:630,109:614]): Output source list (sim1srcout.fits):
Warning: Keyword ORIGIN is not in the header. Warning: Keyword CREATOR is not in the header. Warning: Keyword RE....
unix: less celldetect.log
input file: chip7img1023_sim1.fits[123:630,109:614] output file: sim1srcout.fits
creating cell size table reading data image
creating candidate source list cell size 3
cell size 6 cell size 9
Writing out cell file: cellmap_sim1
We examine the output file with dmlist or ftools/fv and write out the source table to an ASCII file. The results are shown in Figure 2.3. If we had set verbose to 4, we would have obtained also a file called celldetect.reg which would have the regions defined by the detections.
2.2.3
Evaluation
celldetectfor images is presently limited to work on datasets of size 2048 or less. However, for events files, recursive blocking is employed so that larger areas can be handled.
celldetect can utilize the variable kernel procedure only if the following keywords are present in the file: TELESCOP, INSTRUME, DETNAM, GRATING, RA NOM, and DEC NOM. OnlyChandradetectors are supported at present. If any of the keywords is missing,celldetectcannot calculate the appropriate cell size; fixedcellneeds to be used.
A general problem of the sliding cell method arises in the wings of the PSF of strong sources. Statistical fluctuations of source counts sometimes produce a large number of spurious detections in this situation. However, if the cell size is a good match to the PSF, this effect should be mitigated.
Future planned enhancements include:
• Options for use of an exposure map
• Implementation of a generalized function in place of the sliding cell
2.3
Wavelet — Chicago:
wavdetect
In its most general form, the wavelet detect method correlates the data with a wavelet function which has limited spatial extent and overall normalization zero. Each pixel’s correlation value is compared with the expected distribution of values (computable from the estimate of the background); if the value is an extreme outlier within this distribution, the pixel is assumed to be associated with a source. The implementation provided inwavdetectuses the so-called ‘Mexican Hat’ function (see 6.5), which has a positively valued quasi-Gaussian core surrounded by a negatively valued annulus. This is a reasonable function for mirrors/detectors which are characterized by a quasi-Gaussian PSF, and will work effectively even for pathological PSFs.
Figure 2.3: The ACIS-S rendition of our simulated field with ellipses showing thecelldetectresults. The size of the ellipses has been increased by a factor of 8 for clarity: their actual size is somewhat smaller than the black core of the source distribution. As expected, the close pairs with separations of 1 and 0.5 arcsec are not resolved and the three sources of large extent are not detected.
There are two parts to the wavdetect code. The first, wtransform, convolves the data with the wavelet function for however many scales are chosen. The resulting correlation maps are used by the second part, wrecon, to construct a final source list and estimate various parameters for each source. For a complete description of the parameters and the data products, see sections 9.2.2 and 9.2.3.
Each part may be run separately but the recommended procedure is to use the script, wavdetect, which runs them sequentially. It is not possible to run wavdetect, and then one or more additional runs with wrecon because the wavdetect script automatically deletes the intermediate files. For this reason, if you anticipate the need to make several runs ofwrecon, you should start withwtransform, notwavdetect. A few parameters differ between wavdetect and wtransform/wrecon, e.g. xscales, yscales in place of scales, thereby providing the option to deviate from circular symmetry.
2.3.1
Key parameters to consider
Here we discuss the key parameters. A description of all parameters is given in section 9.2.2.
infile,outfile,scellfile,imagefile,defnbkgfile
Filenames are required for all of these parameters. outfilecontains the detected source list while the last three are images for the source cells, a reconstructed image, and a normalized (i.e. flat-fielded) background image.
expfile
This is the name of the file containing the exposure map. If an exposure map which matches the image is available, it should be used. If there is no exposure map, a dummy array is substituted with each pixel set to one. Thus to obtain true countrates, the user must divide the output values by the exposure time. The program should, in the future, read the exposure time from the FITS headers ifexptime= 0. This does not eliminate the need for the parameter, as some flexibility is needed for older satellite datasets.
scales
Thescales parameter determines how many (scaled) transforms will be computed. For a simple test you might enter "2.0 4.0"for this parameter. If that test is successful, try again with scales‘‘1.0 2.0 4.0 8.0 16.0’’. For a more extensive run you might like to try the √2 series: "1.0 1.414 2.0 2.828 4.0 5.657 8.0 11.314 16.0". Remember to use quote marks at the begining and end of a series of numbers which have embedded spaces.
The primary concern is to match the first scale size to the PSF. Once that is done (e.g. blocking an over-sampled image), one decides how many scaled wavelets to use. To some extent, choices are based on the computing resources at hand. In practice, one must not have too many pixels and too many scale sizes. Data structures for a 512x512 image use up 36 Mb. A 2048x2048 images requires over 300 Mb. Datasets that do not fit in physical memory will page heavily to disk and processing will run very slowly. Scale sizes larger than 32 allocate excessive memory because it is necessary to pad the image with surrounding zeros. Specification of scales larger than 32 can quickly bring even respectable computers to their knees. Common choices are 512x512 arrays and 5 to 9 scales where each scale is a factor of 2 or√2 larger than the preceeding one.
of the wavelet. The resulting ‘correlation maps’ are then examined for regions where the intensity is larger than some threshold, and the final source list is constructed from a comparison of the different scale runs.
Note that the units for scales are pixels and the value of scales is the radius of the Mexican hat (The Mexican hat function crosses zero at√2×radius).
exptime
This is the length of time over which the field was observed, in seconds. If set to zero, the value will either be taken from the FITS header (if set), or, failing that, estimated by averaging over exposure map pixel values at the center of the field. Otherwise, enter the field value in seconds.
mask
If a mask is desired, it may be specified here either as a circle (c x y r - all in pixels) or a rectangle (r x1 y1 x2 y2, where x1,y1 locate the lower left corner and x2,y2 define the upper right corner). The mask descriptors are left very simplistic (circle, rectangle) because DataModel should eventually be the preferred method of creating filtered datasets.
maxiter
The minimum number of iterations for cleaning sources from the data (to estimate the background map) is 2. Increasing this number will increase the method’s source detection sensitivity, but may not increase it enough to justify the increased computation time. More iterations are generally needed for large wavelet scales (e.g. 16 pixels in aROSAT512x512 PSPC field).
sigthresh
This is the significance threshold for source detection. A good value to use is the inverse of the total number of pixels, e.g. ∼10−6for a 1024x1024 field. This is equivalent to stating that the expected number of false sources per field is one. If larger arrays are used without decreasing
sigthresh, you will start to increase the probability of detecting false sources. Likewise, if smaller arrays are used, this parameter may be increased.
bkgsigthresh
This parameter specifies a significance for cleansing data from the image to compute the background map. As it does not effect source detection, this parameter may be set to a more liberal value than sigthresh (e.g. 10−2 or 10−3); this will help reduce the effect of weak undetectable sources on the background map calculation.
2.3.2
Example: The simulated ACIS-S field
For this example, we use the same simulation employed for celldetect (Figure 2.3). We set the following parameters.
infile= chip7img1023 sim1.fits[123:630,109:614]
sourcefile= wav srcout sim1.fits scellfile= wav scell.fits
imagefile= wav imgout sim1.fits defnbkgfile= wav defnbk.fits scales=”1.0 2.0 4.0 8.0 16.0”
We check the parameters withplistand then run:
unix: plist wavdetect
Parameters for /home/user/ascds_iraf/uparm/wavdetect.par
#
# parameter file for wavdetect #
#
# input #
infile = chip7img1023_sim1.fits[123:630,109:614] Input file name #
# output #
outfile = wav_srcout_sim1.fits Output source list file name scellfile = wav_scell.fits Output source cell image file name imagefile = wav_imgout_sim1.fits Output reconstructed image file name defnbkgfile = wav_defnbk.fits Output normalized background file name #
# output options #
(clobber = yes) Overwrite existing outputs?
(kernel = default) Output file format (fits|iraf|default) (interdir = .) Directory for intermediate outputs # ######################################################################### # # wtransform parameters # # # optional input #
(bkginput = none) Input background file name (bkgerrinput = ) Input background error file name #
# output info #
(outputinfix = ) Output filename infix #
# output content options #
(sigthresh = 1e-06) Threshold significance for output source pixel list (bkgsigthresh = 0.001) Threshold significance when estimating bkgd only #
# exposure info #
(exptime = 0) Exposure time (if zero, estimate from map itself (expfile = ) Exposure map file name (blank=none)
(expthresh = 0.1) Minimum relative exposure needed in pixel to analyze it #
# background #
(bkgtime = 0) Exposure time for input background file #
# scales #
(scales = 1.0 2.0 4.0 8.0 16.0) wavelet scales (pixels) #
# mask #
(mask = none) Mask to place on input image #
# iteration info #
(maxiter = 2) Maximum number of source-cleansing iterations (iterstop = 0.0001) Min frac of pix that must be cleansed to continue #
# end of wtransform parameters # ######################################################################## ######################################################################## # # wrecon parameters # # # PSF size parameters #
(xoffset = INDEF) Offset of x axis from optical axis (yoffset = INDEF) Offset of y axis from optical axis
(eband = 1.4967) Energy band
(eenergy = 0.393) Encircled energy of PSF
(psftable = ))echo $ASCDS_CALIB/psfsize.fits -> /home/ascds/DS.daily/data/psfsize.fits) Table of PS #
# end of wrecon parameters #
######################################################################## #
# using defaults is recommended here #
(stall = no) Stall for debugger? #
#
(log = no) Make a log file? (verbose = 2) Log verbosity # # mode # (mode = ql) unix: wavdetect starting wavdetect running wtransform
input file: chip7img1023_sim1.fits[123:630,109:614] exposure file:
correlation maxima output stack: ./wd_srclist_stk correlation image output stack: ./wd_correl_stk normalized background output stack: ./wd_nbkg_stk plain background output stack: none
threshold output stack: none The exposure file is:
Map is multiplied by time factor 0.000000
Quick exposure corrections computed at each iteration, with full correction at the end
The exposure threshold for sources is: 0.100000 Normalized background error image will be output. No mask
output source list stack: ./wd_srclist_stk output correlation stack: ./wd_correl_stk
output normalized background stack: ./wd_nbkg_stk Warning: Keyword ORIGIN is not in the header. Warning: Keyword CREATOR is not in the header.
...(many lines of dialogue)...
Warning: Keyword HISTNUM is not in the header. Computing flux image for scale pair [8.00,8.00] Warning: Keyword HISTNUM is not in the header. Computing flux image for scale pair [16.00,16.00] Warning: Keyword HISTNUM is not in the header. At Scale Pair 1
At Scale Pair 2 At Scale Pair 3 At Scale Pair 4 At Scale Pair 5
Number of sources in list: 24
Warning: Keyword HISTNUM is not in the header. Warning: Keyword HISTNUM is not in the header. Creating source image.
Warning: Keyword HISTNUM is not in the header. wavdetect done!
The FITS files are all primary images and can be examined with the tool of your choice (e.g. SAOtng). Some of the error maps are FITS extension images (in the file containing the image associated with the error map).
As expected for the undersampled ACIS, the close pairs with separations of 0.5 and 1” were not resolved. Also, since the FWHM of the large Gaussians is 117 pixels, these were not detected at all. The final source list contains 24 detections, 8 in each column (see Figure 2.4).
2.3.3
Evaluation
Since the code requires substantial computer resources, it is wise to prepare the data file by blocking the data if required. We recommend data which are not oversampled, so the input file should have a pixel size such that there are no more than 3 to 5 pixels for the FWHM of the PSF. The image should not be too large; 512x512 pixels is a good starting point. A small area and a limited number of scales is recommended for testing your choice of parameters.
2.4
Wavelet — Palermo
[NB: this is a placeholder]2.4.1
Key parameters to consider
2.4.2
Example
2.4.3
Evaluation
2.5
Voronoi Tessellation & Percolation:
vtpdetect
Tessellation is the process of dividing the total area of the image into cells by constructing a cell about each event position (see Figure 8.1). The number of photons at a given pixel location doesn’t matter. The area of each cell is a measure of the density of events. For VTP it is thus advantageous to use an oversampled image. Computer time increases with the number of occupied pixels rather than with the number of pixels; thus it is efficient for sparsely populated data and is well suited to event files.
Percolation then follows by creating bonds between those cells that are above the noise level and which are not further away from each other than some distance. This “friends-of-friends” type algorithm establishes the group of cells which comprise a source.
For the flux calculation, the area of the Voronoi cell around the pixel where the photons were detected is equally divided between the multiple photons. Pixels that have a value≥imgminare converted into a pseudo event list so instead of 1 cell with area A with N photons, there are N cells with area A/N with 1 photon each.
Figure 2.4: The reconstructed image produced by wavdetect. 5 scales were used, from 1 to 16. The grey scale is logarithmic: the black regions have an intensity of≈300 times greater than the extended envelopes.
The tessellation process has essentially no free parameters but the user must decide how the background will be estimated. These parameters are discussed in section 9.4.
2.5.1
Key parameters to consider
Most of the parameters can be left at their default values until the user has gained some experience with vtpdetect. For a detailed description of the input parameters, see section 9.4.2.
infile,expfile,outfile
The input file can be either an events file (a FITS file with a binary extension table or an IRAF/qpoe file) or an image file (a FITS primary array or an IRAF/.imh file). Note however that the FITS primary array must not be a floating point array. VTP only knows how to convert an image that is an integer type: byte (BITPIX=8) short (BITPIX=16) or long (BITPIX=32).
If an exposure map is available, it should be used. VTP works in fluxes and if there are significant exposure deviations, VTP needs this information to work properly.
The output file will be a FITS file with a binary table extension containing the source list; at a later date, an IRAF/tablefile will also be an output option. For the FITS file, an easy conversion to ASCII is afforded by the datamodel tool, “dmlist” or the FTOOLS task ’fv’. See section 9.4.3 for a description of the source list.
limit
As for the case for the Chicago wavelet parametersigthresh, the user may wish to changelimitdepending on the size and population of the field. The default value is 10−6; but if there are significantly less than a million events,limitmay be increased accordingly.
scale
vtpdetect is essentially scale free in the usual sense of the word. Here, scale is actually a scale factor and refers to the intensity, not the spatial size. This somewhat counter-intuitive usage arises because the algorithm figures out the threshold to distinguish between background and source events (based on the area of the Voronoi cell). Ifscaleis left to its default value of one, the threshold remains as calculated by the code; settingscaleto something>1 will tend to de-blend sources while loosing faint sources. Setting it to <1 will tend to blend source while picking out fainter sources.
2.5.2
Example: An HRC version of the simulated field
We start with a FITS primary image of the central region, containing the simulated field. We use all the defaults in the parameter file, specifying only the input file and the output file:
unix: plist vtpdetect
#
# parameters for vtpdetect #
#
# inputs -- can either be an image or table #
infile = hrci2800img_sim1.fits Input file name expfile = none Exposure map file name #
# output #
outfile = vtp_srcout.fits Source list output file name #
# processing parameters #
scale = 1 Threshold scale factor
limit = 1e-06 Max. probability of being a false source coarse = 10 Minimum number of events per source maxiter = 10 Maximum number of iterations to allow #
# SAOImage region file root name #
(regroot = none) Root name for verbose output region files (edge = 2) How close to edge of field to reject events (superdo = no) Perform Super Voronoi Cell procedure
#
# probably use defaluts for these... #
(maxbkgflux = 0.8) Maximum normalized background fluxto fit (mintotflux = 0.8) Minimum total flux fit range
(maxtotflux = 2.6) Maximum total flux fit range (mincutoff = 1.2) Minimum total flux cutoff value (maxcutoff = 3) Maximum total flux cutoff value
(fittol = 1e-06) Tolerance on Possion fit
(fitstart = 1.5) Initial background fit starting scale factor #
# user setable parameters #
(clobber = yes) Overwrite if file exists (verbose = 0) Debug level
(logfile = stderr) Debug file name (kernel = fits) Output format #
# mode #
(mode = ql)
unix: which vtpdetect
/home/ascds/DS.daily/bin/vtpdetect unix: vtpdetect
Exposure map file name (none):
Source list output file name (vtp_srcout.fits): Threshold scale factor (0) (1):
Max. probability of being a false source (0:1) (1e-06): Minimum number of events per source (0) (10):
Maximum number of iterations to allow (0:100) (10): ....etc
This attempt produced 8 detections. In each row, there was a single detection roughly centered on the first 5 sources, and then the sixth source was also detected. The repeated pattern in the lower part of each row resulted in no detections except for one large source representing a blend of the three extended sources (and their embedded discrete sources). There was also a spurious detection toward the bottom of the field.
We then tried changing limit to 0.0001 since we have of order 104 photons in the simulation. We also
increasedscaleto 6. We used the events file rather than the image version, thereby improving the statistics for the background threshold calculation.
The results of the run on the events file is shown in Figure 2.5. The source detections are essentially the same as those found on the image file, although the spurious detection did not occur.
2.5.3
Evaluation
The primary limitations arise from computer resources: processing time increases with the number of cells (i.e. non-zero pixels). Thus data which are dominated by a high background will take much longer to run than sparsly populated data.
2.6
Recipe for overplotting detections on images using SAOtng
It may be desirable to evaluate the results of thedetecttools by plotting the detections on the data. There are probably many methods to obtain the desired product; the following is based on SAOtng and although it is not particularly elegent, it may prove useful.2.6.1
Recipe
Step 1 - Produce an ASCII version of your output source list.
Each of thedetect tools contains a table with x/y and the size of the error ellipse of the detection. If your output file is in fits format, then use the tool of your choice (e.g. ftools/fv or CIAOprism) to produce an ASCII table containing x, y, (sky coordinates) and SIG MINOR, SIG MAJOR, and INCL ANGLE (or whatever the corresponding columns are called). If you use ’fdump’, you will get the whole table, but you can then use an editor to remove the unwanted columns and headers.
Figure 2.5: The result of runningvtpdetecton the simulation (events file). We have used the output columns of the source list, SIG MAJOR, SIG MINOR, and INCL ANGLE to define the ellipses shown. The image has been blocked by a factor of 4.
Use an editor so that your file looks like: ellipse 774.9454 1427.8674 9.5728 29.4706 45.1704 ellipse 914.4147 1286.3557 7.5922 8.3127 136.9659 ellipse 1093.8292 1751.2312 6.2448 25.9294 136.3404 ellipse 1238.9987 1609.5455 3.8667 4.0351 82.1375 ellipse 1417.4048 2073.6267 7.8257 25.3913 46.8608 ellipse 1560.5229 1934.1431 4.4130 7.1731 54.7692 ellipse 1666.3142 1108.9272 122.2970 386.6931 132.7598 ellipse 1715.0039 748.5468 14.0293 28.0040 2.1779
The resulting columns of this ’region’ file are (1) ’ellipse’, (2) X, (3) Y, (4) SIG MINOR, (5) SIG MAJOR, and (6) INCL ANGLE.
Another way to obtain a region file:
echo "physical" > my.reg
fdump source_file STDOUT x,y,sig_minor,sig_major,incl_angle -
prhead-pagewidth=132 page- | tail +5 | awk ’{print "ellipse ",$2,$3,$4,$5,$6}’ >> my.reg
Step 3 - Display your image and send the region file to SAOtng
Load your image into a frame of SAOtng (or DS9) and then execute the following command:
unix: cat my.reg | xpaset SAOtng regions
where ‘my.reg’ is the name of the ASCII regions file, and ‘SAOtng’ is the device name; it could have another name such as ’saotng’. You can check it by reading the top margin of the SAOtng window.
2.6.2
Notes and Options
Forcelldetect, a region file can be produced during the running of the program ifverboseis set to 4. Similar options may be added to the other tools at a future date.
If the ellipses are too small to be seen, the following AWK command will increase the size of the ellipses by a factor of 10:
awk ’{print $1,$2,$3,$4*10,$5*10,$6}’ < my.reg > my_1.reg
Note that the order of the columns is to have the minor axis before the major axis. This is because SAOtng uses a different definition of position angle than that defined by thedetecttools.
If you prefer other shapes and the use of other columns (e.g. rectangles with X ERR and Y ERR), feel free to improvise!
Comparison of
detect
Methods
In this chapter we provide comparative results for the various tools. At the time of this writing, a detect tool testing project is underway. All three tools will be run on the same simulated data sets, aiming at calibrating and cross-calibrating the tools. Future releases of the manual will contain the summary of the results. In the present version we concentrate on tool runtimes.
3.1
Factors affecting performance and runtimes
3.1.1
celldetect
The primary factor that influences the runtime ofcelldetectis the size of the data set. Two secondary factors are the number of cell sizes to examine and the actual number of detected sources.
3.1.2
wavdetect
The three most important factors that affect the runtime ofwavdetectare: (1) the size of the data set, (2) number of wavelet scales, and (3) number of background cleansing iterations. The first two factors influence both wtransform and wrecon, the third only affects wtransform. An additional factor is the size of the wavelet: for large scales the data set needs to be padded, so the size of the data gets augmented artificially.
The current version ofwavdetectuses a lot of computer memory. At present, 1024×1024 pixels should be considered the practical limit for the size of the input data set on typical machines.
3.1.3
vtpdetect
The runtime of vtpdetectdoes not depend on the spatial size of the data set, but depends on many other factors and is rather unpredictable. The most important factors are the number of unique photon locations
Size Nevt Approximate run time [min:sec]
[pixel] celldetect wavdetect vtpdetect
Short exposure, bkg+sources
512×512 400 0:25 3:45 (3:00+0:45) 0:03 1024×1024 1300 0:50 11:40 (9:30+2:10) 0:05
2048×2048 3800 2:00 — 0:16
32768×32768 110000 8:50 — 9:40
Long exposure, bkg only
512×512 1800 0:25 3:35 (2:55+0:40) 0:15 1024×1024 7300 0:50 11:30 (9:30+2:00) 0:50
2048×2048 28000 2:00 — 1:40
32768×32768 1100000 8:50 — —
Table 3.1: Sample runtimes for the three tools on a Sun Ultra-1 with a 167 MHz processor and 124 MB of RAM. Forvtpdetect and wavdetect, actual runtimes will normally be longer than indicated in the table because only one scale size was used in wavdetect and only one background iteration was used in both vtpdetectand wavdetect. The “recursive blocking scheme” (see section 2.2.1) was used incelldetect runs for 32k×32k data. Values in parentheses forwavdetectindicate the time used bywtransformandwrecon. and overall number of events.
vtpdetectwill run quickly if the number of photons is low and there is a high contrast between background and sources. In the opposite scenario — when one has a large number of photons and a large number of faint sources — the vtpdetect run can be very long, since fitting background becomes an arduous task. In these situations, our tests have shown thatvtpdetectbecomes very slow if the observation contains more than
∼105photons. This number should be considered the practical limit for running the tool on such data sets.
3.2
Sample runtimes
To give the reader a rough idea on the performance, we ran all three tools on various subsets of two simulated HRC-I observations. One simulation contained a set of sources on top of a flat background, the other contained only a flat background, but for a 10 times longer exposure, i.e. containing roughly 10 times more background events.
Table 3.1 shows the runtimes on a Sun Ultra 1 with a 167 MHz processor and 124 MB of RAM. The same runs on a Sun SPARCstation 5 with 70 MHz CPU and 64 MB of RAM were∼3 times slower.
Table 3.1 clearly shows that runtimes of celldetect and wavdetect are not affected by the increase in the number of events and the major factor is the size of the data set. In the case of vtpdetect the number of events is the primary factor;vtpdetectslows down considerably if the number of events is large.
An important thing to keep in mind is that in the runs reported in Table 3.1 only one wavelet scale was analyzed for wavdetect, and only one background iteration was performed for both wavdetect (where it matters only forwrecon) andvtpdetect. To a first approximation, the time required for execution ofwrecon
and vtpdetect increases linearly with the number of iterations. Also, each additional scale in wavdetect increases the runtime by roughly the same amount of time.
False Detection Rates in
celldetect
4.1
Introduction
In order to study the rates of false source detections from celldetect, the tool was run on sets of simulated Chandradata that contained only a background-like component. This chapter is provided mainly for users performing statistical analysis of of source detections; it describes the simulations, the celldetectparameter settings used, and the results.
4.2
Description of Simulations
SimulatedChandradata containing only a background-like component were created with MARX (see Refer-ence 1). Three sets of simulations, each having a different exposure time, were produced for theACIS-Iand HRC-Idetectors. The 10ks and 30ks sets each contained 99 simulations. The 100ks set contained 75 simula-tions forACIS-Iand 50 forHRC-I(longer exposure times require longercelldetectrun times and greater disk space, which necessitated fewer simulations). Although the 100ks set contained fewer simulations, the sta-tistical significance of thecelldetectresults is not diminished, since these simulations proportionally yielded more detected sources.
The simulations used a monochromatic source (1.49 keV), with a uniform disk distribution of angular extent greater than the detector field of view. The flux of the disk source was set such that the total detected count rate was ∼7.2×10−7 events s−1pixel−1 forACIS-I, and∼3.7×10−8 events s−1pixel−1 forHRC-I. These background rate assumptions are expected on-orbit values based on theScience Instrument Calibration Report for the AXAF CCD Imaging Spectrometer (ACIS)(see Reference 2), and theHRC Ground Calibration Final Report (see Reference 3).
The use of a monochromatic disk as the sole source of photons is a simplifying approximation to the expected true background in two ways: (1) such simulations are vignetted, but the true background will contain both a vignetted external component and a non-vignetted internal detector background component, and (2) the true background’s vignetted external component will be non-monochromatic. However, we found that radial profiles of counts vs. off axis angle matched to within∼1-2% those obtained for a number of other simulations
that had both an external component with a realistic energy spectrum (based on Rosat data), and a flat internal component. This is expected since vignetting is a strong function of energy, but adding a flat component makes relative vignetting smaller, and at 1.49 keV (near which both detectors have their peak effective areas) these effects tend to offset one another. Given that the predicted background count rate assumptions used for the simulations are ± ∼10%, the ∼1-2% effects caused by this study’s simplifying approximations should be acceptable. In addition, usage of monochromatic simulations provided for simpler and faster simulation generation.
4.3
celldetect
Settings
celldetectwas run on these simulations using default settings. By default,celldetectuses:
1. a variable detect cell size, which increases with off axis distance as the point spread function (PSF) also increases.
2. an encircled energy value of 0.80, which indicates the encircled energy fraction of the PSF that the detect cell must contain.
3. the local detect method of estimating background, which takes the detect cell background from a region surrounding the detect cell.
4. the findpeaks=yes setting, which recognizes adjacent detections as a single source.
5. the centroid=yes setting, which calculates the source centroid for the detection source list.
Please see Chapter 5 for further information regarding thecelldetect algorithm; please see Chapter 9.1 for further information regarding thecelldetectdefault parameter settings.
4.4
Results
It is important to keep in mind that since the simulated data contained only a background-like component, all detections are false sources.
Traditionally, the false source rate is expressedper field of view. The field of view is defined here as the whole detector for HRC-I(which is equivalent to ∼0.25 deg2), and as four imaging chips in ACIS(∼0.08 deg2).
The rates considered here are: 0.1 (crosses), 1 (circles), and 10 (triangles) false sources per field of view.
The distribution of the SNR values of the false sources was examined, in order to establish SNR threshold values for given rates of false sources. The procedure was as follows: for each exposure time and for each false source detection rate (0.1, 1, or 10 false sources per field of view), and for each off axis angle bin, the considered false source rate was scaled by the area of that bin and multiplied by the number of simulations. This yielded the number of “allowed” false source detections for that region in all simulations combined. The SNR values of all false source detections in that bin were sorted, and the SNR value of the last “allowed” source was identified. This is the SNR threshold value data point for that bin.
This calculation, which introduces angular dependence to the SNR threshold value for a particular false source detection rate, provides for a uniform distribution of false sources over the entire detector field of view.
We found that the SNR threshold for false sources grows with off axis angle (see Figures 4.1, 4.2, and 4.3). This effect is expected since the photon statistics in random simulations improve as the size of the detect cell grows with off axis position. Note, however, that the data begin to flatten at large off axis angles. This is due to mirror vignetting, which causes a reduction in the number of photons in the outer regions of the field of view. This in turn results in poorer photon statistics, and thus a flattening of SNR threshold values vs. off axis angle at larger off axis angles. This is especially prominent inHRC-I, which has a larger field of view thanACIS-I(see Figure 4.3).
Figures 4.1, 4.2, and 4.3 show the SNR threshold that will yield a particular false source detection rate as a function of the off axis angle, for three exposure times (10ks, 30ks, and 100ks).
The tabular data for Figures 4.1, 4.2, and 4.3 may be found in Section 4.6.1.
Please note that SNR threshold quoted here is the formal SNR as defined in Chapter 5, Eq. 5.7. It should not be mistaken for source “significance.” The SNR threshold in the center of the image is quite low, especially for low exposure times. This is expected since the background inChandraobservations is very low and the expected number of background counts in small cells in the center of the image is effectively zero. Virtually all false sources identified in the center of the image for low exposure times have no counts in their background regions.
The SNR threshold dependence on the off-axis angle can be well approximated with the following simple function:
SNR threshold = (A+Bθ)(1−Cθ2) (4.1) whereθis the off axis angle, andA,B, andCare the function coefficients. With no vignetting present, the linear component would suffice, since in such a case SNR would grow as square root of number of counts, and the growth of the PSF – and of the detect cell area – is close to quadratic (see Fig. 5.1). With vignetting present, the equation had to be modified by multiplicative component, which we empirically found to be parabolic.
Fitted curves using the function from Eq. 4.1 are shown on Figures 4.1, 4.2, and 4.3 as dashed lines for the rate of 0.1, as solid lines for the rate of 1.0, and as dotted lines for the rate of 10.0 false sources per field of view. The fitted values of the function coefficientsA, B, andC are shown in Table 4.3 in Section 4.6.2.
Equation 4.1 works especially well for off axis angles lower than 10 arcmin (i.e. for the part of the data where PSF sizes are small; see Figures 4.1 and 4.2). This region corresponds to the entire field of view of all four ACIS-Ichips, and the inner portion ofHRC-I. In this region, fit residuals never exceed 0.1 in SNR threshold. The fit residuals are within 0.2 in SNR threshold for theHRC-Iwhole field of view (see Figure 4.3).
4.5
Summary
The data and curves in Figures 4.1, 4.2, and 4.3 should be utilized in the following way: if from acelldetect run on the entireACIS-IorHRC-Ifield of view the user selects only those sources that lie above the curve corresponding toN false sources per field of view, then the user can expect to haveN false detections among
Figure 4.1: ACIS-IWhole Field of View(i.e. four imaging chips): The figure illustrates the SNR threshold that will yield a particular false source detection rate, as a function of the off axis angle. The rates shown are: 0.1 (cross symbol; best fit overlay dashed line), 1 (circle symbol; best fit overlay solid line), and 10 (triangle symbol; best fit overlay dotted line) false sources per field of view. The data and the best fit function coefficients may be found in Section 4.6.
Figure 4.2:HRC-IInner Region Only: The figure illustrates the SNR threshold that will yield a particular false source detection rate, as a function of the off axis angle. The rates shown are: 0.1 (cross symbol; best fit overlay dashed line), 1 (circle symbol; best fit overlay solid line), and 10 (triangle symbol; best fit overlay dotted line) false sources per field of view. The data and the best fit function coefficients may be found in Section 4.6.
Figure 4.3: HRC-I Whole Field of View: The figure illustrates the SNR threshold that will yield a particular false source detection rate, as a function of the off axis angle. The rates shown are: 0.1 (cross symbol; best fit overlay dashed line), 1 (circle symbol; best fit overlay solid line), and 10 (triangle symbol; best fit overlay dotted line) false sources per field of view. The data and the best fit function coefficients may be found in Section 4.6.