sources (version 2.2)

You can also look at:
This routine finds X-ray sources from the summed images and exposure maps. The positions and extraction radii for the sources are determined in a four step process:
  1. Smooth the summed sky and exposure maps with the vsmooth STOOL. This does a variable size boxcar smoothe using the minimum square box containing at least 50 events. An identical filter is applied to the counts image and to the exposure map. The results are divided to produce a smoothed, exposure-corrected image. Pixels with 0 exposure are assigned a pixel value of 0. Note that each combination of instrument (SIS or GIS) and image resolution (256 or possibly 64 for the GIS), has three images corresponding to "lo" (<2keV), "hi" (>2keV) and "all" energy bands.

  2. Detect sources in the smoothed images. This is done using the ascasource STOOL which reports the center pixel of each source along with two radii. The first is the minimum radius which will include the entire source, and the second is the maximum radius which will avoid confusion with other sources and the background. Sources are detected with the following algorithm:
    1. Locate the 20 brightest local peaks in the image. A local peak is a pixel which is as bright or brighter than the eight pixels surrounding it.
    2. Examine the peaks to see if they are distinct and significant in the following way. Choose the brightest peak. For each of the other peaks, compare the intensity of the lower peak to the minimum intensity along the line segment connecting the peaks. Delete the lower peak if it is less than 2.5 times brighter than the trough separating it from the brighter peak. Repeat this for the second brightest surviving peak, etc.
    3. Determine the maximum extraction radius. For each source calculate the distance to the lowest point along a straight line to each other source. Set the maximum radius to the nearest such trough.
    4. Determine the radial distribution of azimuthally averaged intensity around each source. Pixels with zero intensity are not included in the average. The lowest intensity in the radial distrubution is taken as the background flux.
    5. Delete all sources whose peak intensity is less than four times the background intensity.
    6. Determine the "suggested" extraction radius. This is the minimum radius at which the azimuthally averaged intensity is more than 1/5 of the peak intensity and more than twice the background intensity. The suggested radius is never greater than the maximum radius.

  3. Determine the extraction radius for each source. The default extraction radius is 6 arc minutes for GIS and 4 arc minutes for SIS. If the suggested radius is less than the default radius (true for point sources), use the default radius. Otherwise, use the suggested radius. In no case is the extraction radius larger than the maximum radius.

  4. Reconcile the sources detected in the three energy bands and eliminate duplicates. This is done by giving a list of all source positions and radii to the sift_sources STOOL. The sources are listed in order of decreasing intensity with all the "all" energy band sources listed first, followed by the "hi" energy sources, and the "lo" energy sources. sift_sources does the following:
    1. Take the first source in the list.
    2. Examine all the other sources in the list.
    3. If the second source is within the extraction radius of the first source, eliminate it.
    4. If the extraction radii of the two sources overlap, reduce the radius of the second source so that they just touch.
    5. Repeat these steps for each of the remaining sources.

After the sources are detected, their positions, radii, and total counts are stored in FITS format source catalogs.

Finally, this routine creates SAOimage/xselect style region filters for each extracted source. The sources are detected in sky coordinates, but the region filters must be in detector coordinates in order for spectra to be extracted properly. The conversion from sky to detector coordinates is done in the sky2det utility routine. sky2det calculates the mean detector coordinate position of the events within a given radius of the peak in sky cordinates. First a radius of 2 pixels is tried. If there are no events within that radius (e.g. a dim extended source or one not in the field of view of one detector), then the conversion is retried using the extraction radius. If there are no events within the extraction radius, this routine gives an error and does not produce a region filter. Note that there are separate region filters for individual instruments, since the conversion from sky to detector coordinates may not be the same for the two SISs or GISs. The routine also creates "source 0" region files which exclude all the detected sources. Note that the exclusion radius is never smaller than the standard (4 or 6 arc minute) radius.

FTOOLS called:

  1. fcreate
  2. fdump
  3. fmodhead
STOOLS called:
  1. ascasource
  2. colorpic
  3. counts_in_circle
  4. equals
  5. pix2sky
  6. sift_sources
  7. vsmooth
Utilities called:
  1. exception
  2. ftool_test
  3. generate_filename
  4. log_entry
  5. milestone
  6. parse_filename
  7. read_bintable
  8. read_fits_keyword
  9. read_parfile
  10. setup_parfile
  11. sky2det
  12. stool_test