Measuring Source Extent
![[CXC Logo]](../../imgs/cxc-logo.gif)
CIAO 4.2 Science Threads
Overview
Last Update: 8 Feb 2010 - updated for CIAO 4.2: changes to the ds9 region file format menu; minor changes to screen output
Synopsis:
The srcextent tool calculates the sizes and associated errors of a photon-count source image or list of source images using the Mexican Hat Optimization (MHO) algorithm (Houck 2007). The uncertainty from a 90% confidence estimate derived from Monte Carlo trials using MARX simulated data is also reported.
Read this thread if:
you want to determine if a source is extended.
Contents
- Get Started
- Creating the Source Region File
- Run srcextent
- Run srcextent without a PSF
- Examining the Output
- Parameter files:
- History
- Images
Get Started
Sample ObsID used: 635 (ACIS-I, RHO OPH CORE)
File types needed: evt2
Simulate a PSF (optional)
A PSF may be used in runnning srcextent. The tool fits the PSF first, if it is present, and uses the result as an initial guess to guide fitting on the source image.
The Chandra HRMA PSF can be simulated with ChaRT and the instrument effects, including detector pixelization, can be simulated with MARX. Instructions on how to run ChaRT and MARX to create a PSF FITS file are available in the ChaRT threads.
Creating the Source Region File
We need to define a source region to use as input to the tool. To do this, first display the image:
unix% ds9 acisf00635N003_evt2.fits &
In this example, we chose a source on ACIS-I1 (ccd_id=1), as shown in Figure 1.
To save the regions, follow these steps:
- Region → Save Regions... → Save As "src.reg".
- After choosing "OK" in the region filename dialog, a format dialog is opened. Set the format to "CIAO" and the coordinate system to "Physical".
The resulting region file looks like:
unix% more src.reg # Region file format: CIAO version 1.0 circle(3531,3781,20)
Run srcextent
The event file, PSF file, and region are the only inputs necessary to run srcextent:
unix% punlearn srcextent unix% pset srcextent srcfile=acisf00635N003_evt2.fits unix% pset srcextent outfile=extent.fits unix% pset srcextent psffile=psf.fits unix% pset srcextent regfile=src.reg
Running the tool with verbose=3 prints the results to the screen:
unix% srcextent verbose=3 Source file, FITS image or FITS events list (acisf00635N003_evt2.fits): PSF file, FITS image or FITS events list (optional) (psf.fits): Region File, ellipse or circle, in FITS or ASCII (required for events list) (src.reg): Output file, FITS table (extent.fits): Results for Source 1 Source Observed Size: 1.10 " @ PA 16.62 deg at pixel coords 3531.8, 3782.3 90% Confidence intervals: (1.04 -- 1.17) @ (INDEF -- INDEF) PSF Observed Size: 1.22 " @ PA 11.00 deg at pixel coords 3531.1, 3781.0 90% Confidence intervals: (1.20 -- 1.24) @ (INDEF -- INDEF) Estimated Intrinsic Size: 0.00 " @ PA 0.00 deg 90% Confidence intervals: (INDEF -- INDEF) @ (INDEF -- INDEF) Source is not extended at 90% confidence
An estimated intrinsic size of 0 " means that there is no evidence of extent given the errors, i.e. the source is pointlike. As the screen output reports, this source is not extended within a 90% confidence interval. Note that "PA" stands for "position angle."
The "@ (INDEF -- INDEF)" portion of the output represents the confidence limits on the position angle. The tool currently does not calculate these limits, so they will always be INDEF.
The contents of the parameter file may be checked with plist srcextent.
Run srcextent without a PSF
To compare how the output changes, srcextent run again, without the PSF file:
unix% pset srcextent psffile="" unix% pset srcextent outfile=extent_nopsf.fits unix% srcextent verbose=3 Source file, FITS image or FITS events list (acisf00635N003_evt2.fits): PSF file, FITS image or FITS events list (optional) (): Region File, ellipse or circle, in FITS or ASCII (required for events list) (src.reg): Output file, FITS table (extent_nopsf.fits): Results for Source 1 Source Observed Size: 1.23 " @ PA 179.98 deg at pixel coords 3531.6, 3782.2 90% Confidence intervals: (1.17 -- 1.30) @ (INDEF -- INDEF)
Since the PSF information was not available, a determination about the extent is not reported.
The contents of the parameter file may be checked with plist srcextent.
Examining the Output
In addition to being printed to the screen, the source extent information is saved in the output FITS file. Whether or not a source is extended is recorded as a boolean in the EXTENT_FLAG column of the output file, as are the ellipse parameters reported to the screen (e.g. major and minor axes and the confidence limits). This example uses the file from the first run of srcextent:
unix% dmlist extent.fits"[cols EXTENT_FLAG, X, Y, MAJOR_AXIS, MINOR_AXIS, POS_ANGLE]" data -------------------------------------------------------------------------------- Data for Table Block TABLE -------------------------------------------------------------------------------- ROW EXTENT_FLAG X Y MAJOR_AXIS MINOR_AXIS POS_ANGLE 1 0 3531.8221900025 3782.2606693038 0 0 0
Recall that this source was determined to not be extended (EXTENT_FLAG=0), so the major and minor axis and the position angle are all 0.
Parameters for /home/username/cxcds_param/srcextent.par srcfile = acisf00635N003_evt2.fits Source file, FITS image or FITS events list outfile = extent.fits Output file, FITS table psffile = psf.fits PSF file, FITS image or FITS events list (optional) regfile = Region File, ellipse or circle, in FITS or ASCII (required for events list) (shape = gaussian) source shape [gaussian,disk] (srcsize = 0) crude estimate of source size (imgsize = 0) size of image (binfactor = 0) image binning factor (mincounts = 15) minimum counts threshold inside ellipse (minthresh = 6) minimum counts threshold for source file (clobber = no) clobber output file (verbose = 3) verbosity setting (mode = ql)
Parameters for /home/username/cxcds_param/srcextent.par srcfile = acisf00635N003_evt2.fits Source file, FITS image or FITS events list outfile = extent_nopsf.fits Output file, FITS table psffile = PSF file, FITS image or FITS events list (optional) regfile = src.reg Region File, ellipse or circle, in FITS or ASCII (required for events list) (shape = gaussian) source shape [gaussian,disk] (srcsize = 0) crude estimate of source size (imgsize = 0) size of image (binfactor = 0) image binning factor (mincounts = 15) minimum counts threshold inside ellipse (minthresh = 6) minimum counts threshold for source file (clobber = no) clobber output file (verbose = 3) verbosity setting (mode = ql)
History
20 Apr 2009 | New for CIAO 4.1.2 |
08 Feb 2010 | updated for CIAO 4.2: changes to the ds9 region file format menu; minor changes to screen output |