         Determine if a source is extended within a confidence interval.

Calculate the size and associated uncertainty of a photon-count source image or list of source images using the Mexican Hat Optimization (MHO) algorithm (Houck 2007). The uncertainty is a 90% confidence estimate derived from Monte Carlo trials using MARX simulated data.

If a point-spread function (PSF) image is supplied, the tool also makes a determination about whether the source is extended within the confidence interval.

The MHO algorithm looks for a source approximately centered in the image with approximate coordinates taken from an input region specifier. It then derives the parameters of the elliptical Gaussian which is most strongly correlated with the source image. The elliptical Gaussian parameters [center position (x,y), 1-sigma semi-axes (a,b) and position angle (theta)] are derived by maximizing the Mexican-Hat wavelet transform. The tool also computes sqrt((1/2)(a^2+b^2)) as an 'apparent size' estimate which is more robust than the individual semi-major and semi-minor axis values.

The tool applies the MHO algorithm to both PSF and source images, and then tests whether the two apparent sizes are consistent given the image statistics. It derives an estimate of source 'intrinsic size' as the radius (sigma) of the gaussian that, when convolved with the PSF gaussian, would have the same size as the observed source image.

The tool fits the PSF first, if it is present. The initial guess at PSF size is given by the estimated 90 percent ECF size. The fit PSF size is then added in quadrature with the value of psfblur to give the size to be compared to the source size.

The tool then fits the source image. In this case the initial guess is the size of the input source region times the value of the parameter sigmafactor.

For best results, this initial guess should be within about a factor of three of the actual source size.

When the input source data is an event file, the data are binned to create an image. The image binning size is 1 pixel or the PSF image pixel size, whichever is smaller.

The PSF and source data may be provided either as event files or images. Event data are preferred. If using an image, it is necessary to crop the image so the source centroid is at the image center to provide appropriate estimates.

The tool currently does not calculate the confidence limits on the position angle. They will always be reported as INDEF in the output:

Source Observed Size: 1.10 " @ PA 16.87 deg at pixel coords 3531.8, 3782.3 90% Confidence intervals: (1.04 -- 1.17) @ (INDEF -- INDEF)
Technical Details
Measuring Detected Source Extent Using Mexican-Hat Optimization: https://cxc.harvard.edu/csc/memos/files/Houck_source_extent.pdf
Estimating Intrinsic Source Size: https://cxc.harvard.edu/csc/memos/files/Houck_intrinsic_size.pdf
srcextent srcfile=acisf00635_000N001_r0001b_regevt3.fits outfile=acisf00635_000N001_r0001b_out3.fits psffile=acisf00635_000N001_r0001b_psf3.fits regfile=acisf00635_000N001_r0001_reg3.fits

Calculate the source, PSF, and intrinsic source size from a source event file, normalized PSF image, and a FITS region file.

srcextent srcfile=acisf00635_000N001_r0001b_regevt3.fits outfile=acisf00635_000N001_r0001b_out3.fits psffile=acisf00635_000N001_r0001b_psf3.fits regfile=ellipse.reg

Calculate the source, PSF, and intrinsic source size from a source event file, normalized PSF image, and an ASCII region file.

srcextent srcfile=acisf00635_000N001_r0001b_img3.fits outfile=acisf00635_000N001_r0001b_out3.fits psffile=acisf00635_000N001_r0001b_psf3.fits

Calculate the source, PSF, and intrinsic source size from a source image and a normalized PSF image. With no input regfile, the tool assumes that the source image is exactly centered in the input image.

srcextent srcfile=acisf00635_000N001_r0001b_regevt3.fits outfile=acisf00635_000N001_r0001b_out3.fits psffile=acisf00635_000N001_r0001b_projrays3.fits regfile=acisf00635_000N001_r0001_reg3.fits

Calculate the source, PSF, and intrinsic source size from a source event file and a PSF event file.

srcextent srcfile=acisf00635_000N001_r0001b_img3.fits outfile=acisf00635_000N001_r0001b_out3.fits psffile=acisf00635_000N001_r0001b_projrays3.fits regfile=acisf00635_000N001_r0001_reg3.fits

Calculate the source, PSF, and intrinsic source size from a source image and a PSF event file.

srcextent srcsize=35 srcfile=acisf00635_000N001_r0001b_img3.fits outfile=acisf00635_000N001_r0001b_out3.fits

Calculate the source size from a source image. With no input regfile, the tool assumes that the source image is exactly centered in the input image.

srcextent srcfile=acisf00635_000N001_r0001b_regevt3.fits outfile=acisf00635_000N001_r0001b_out3.fits regfile=ellipse.reg

Calculate the source size from a source event file.

srcextent srcsize=50 srcfile=acisf00635_000N001_r0001b_psf3.fits outfile=acisf00635_000N001_r0001b_out3.fits

Calculate the PSF size from a PSF image. With no input regfile, the tool assumes that the source image is exactly centered in the input image.

srcextent srcfile="acisf00635_000N001_r0001b_regevt3.fits,acisf00635_000N001_r0002b_regevt3.fits" outfile="acisf00635_000N001_r0001b_out3.fits,acisf00635_000N001_r0002b_out3.fits" psffile="acisf00635_000N001_r0001b_psf3.fits,acisf00635_000N001_r0002b_psf3.fits" regfile="acisf00635_000N001_r0001_reg3.fits,acisf00635_000N001_r0002_reg3.fits"

Calculate the source, PSF, and intrinsic source size for each source with a stack of source event files, PSF images, and corresponding region files.

    	   Source file, FITS image or FITS event list

If a stack of files is used, the same number of files must be specified in the stack for the srcfile, outfile, psffile, and regfile parameters.

    	 Output file, FITS table

If a stack of files is used, the same number of files must be specified in the stack for the srcfile, outfile, psffile, and regfile parameters.

    	 PSF file, FITS image or FITS event list

The Chandra HRMA PSF can be simulated with ChaRT and the instrument effects, including detector pixelization, can be simulated with MARX. See the ChaRT website for more information.

If a stack of files is used, the same number of files must be specified in the stack for the srcfile, outfile, psffile, and regfile parameters.

A CSC PSF file may be used, with two image blocks, PSF and BINPSF, each with a header keyword BIN. In this case the block with the smaller value of BIN is used.

    	 Region File, ellipse or circle region, in FITS or ASCII

Required for event lists and recommended for image data. When working with image data, if the regfile is omitted, then the source of interest is assumed to be exactly centered in the input image.

ASCII-format region files may only contain CIRCLE and ELLIPSE shapes currently.

If a stack of files is used, the same number of files must be specified in the stack for the srcfile, outfile, psffile, and regfile parameters.

The size of the ellipse is multiplied by the value of the sigmafactor parameter and is used as the initial source size guess for the source data fit (unless srcsize = -1 ). The intent is to scale the ellipse to a 90 percent ECF.

    	 Source shape [gaussian,disk]

If the shape is "gaussian" the source axes include a factor of 1/sqrt(3). If the shape is "disk", the factor is sqrt(2). Both factors are derived by maximizing the correlation with the elliptical Mexican Hat function with semi-axes, a_i; see Damiani et al 1997.

    	 Estimate of x-position in sky coordinates

    	 Estimate of y-position in sky coordinates

    	 Crude estimate of source size in arcseconds.

For best results, this initial guess should be within about a factor of three of the actual source size.

A value of -1 indicates that the initial guess will use the off axis angle value given in the theta parameter to look up the 90-percent ECF size relationship.

    	 Size of image in arcseconds.

    	 Off axis angle in arcmin. Used only if imgsize = -1.

    	 Image binning factor

    	 Minimum counts inside calculated ellipse threshold

    	 Minimum counts for source file threshold

             Radio of desired sigma to wavdetect guess.

             Additional aspect blur to add in quadrature to PSF ellipse size.

The default value 0.1873 (arcseconds) is appropriate when the ECF lookup is used (srcsize = -1) and the instrument is ACIS.

    	 Clobber output file (yes/no)

    	 Verbosity setting

The effect of the PSF blurring is approximated by assuming that the Gaussian sigma values add in quadrature:

sigma_intrinsic^2 + sigma_psf^2 = sigma_observed^2

and where each value has an associated uncertainty. Solving that expression for the intrinsic source sigma:

sigma_intrinsic = sqrt (sigma_observed^2 - sigma_psf^2)

The corresponding uncertainty, delta_sigma_intrinsic, is computed from the measurement uncertainties using standard analytic error propagation methods. A source is then labeled as extended if:

sigma_intrinsic > 5 * delta_sigma_intrinsic

The threshold value is stored in the lev3_iss.par parameter file, which is a module used by srcextent; "plist lev3_iss" prints the parameter file to the screen.

See the bugs page for this tool on the CIAO website for an up-to-date listing of known bugs.

December 2023