STScI Logo

using_detect xray.xspatial.detect


NAME · USAGE · DESCRIPTION

NAME

detect -- package of source detect tasks

USAGE

This document describes the tasks available in the detect package.

DESCRIPTION


This writeup is intended to introduce User's to the set of prototype 
Detect tasks installed in PROS and show the path in which tasks 
are run. 

The Detect we have written is a local detect.  A series of 5 tasks, 
Cellmap, Snrmap, Lpeaks, Bkden, and Bepos will prepare and scan your 
data for sources and write the detected positions to a table file. 
Imcontour/Tvimcontour can read the table and display the sources.
A utility task detmkreg will make a region file of sources that can
be 'read' in SAOIMAGE.  A new task, lmatchsrc has also been added to
the detect package.  Lmatchsrc consolidates detections from one or more
runs of ldetect into unique sources in a field.  

Documentation is available for each task by typing help <taskname>. 
A detailed document is available by typing 'help explain_detect' that
discusses the algorithms, suggestions for choosing parameters, pointers
in interpreting results, and limitations of the detect package.

-------------------------------------------------------------------------
To Run Local Detect:
--------------------

LDETECT runs the detect tasks (CELLMAP, SNRMAP,  LPEAKS,  BKDEN,
and   BEPOS)   for   a   single  detect  cell  size  and  threshold.
Intermediate files are saved.  
-------------------------------------------------------------------------

de> ldetect
qpoe file : xdata$rh110267.qp
Output table root: harlac24
ROSAT HRI Cellsize in arcsecs - 6|9|12|24|36|48: 24

... Running Cellmap ...

xdata$rh110267.qp[bl=16] -> harlac24.imh
add harlac24.imh,cellsize = 24
harlac24.imh updated
xdata$rh110267.qp

... Running Snrmap ...

Convolving 3x3 cells

Convolving 5x5 cells

Calculating Snrmap with equation:

snrmap=(1.7777*cell3-frame)/((1.7777**2*cell3+oframe)**0.5)

Writing Snrmap Image:
harlac24_snr.imh

... Running Lpeaks ...

src#  logx    logy     physx     physy    cellx/y     snr
---------------------------------------------------------

   1  149.00  177.00   2384.00   2832.00   24   24     5.954
   2  146.00  276.00   2336.00   4416.00   24   24    30.197

Writing to Output file:  harlac24_ruf.tab

... Running Bkden ...

Bkden region is circle 256.00 256.00 7.50'


Bkden = 12.8558464 counts/arcmin**2

... Running Bepos ...

*** PI bands must be Respecified with input QPOE ***


Input Qpoe: xdata$rh110267.qp
bkden = 12.8558464 (cts/sq arc-min), 0.0008928 (cts/sq pixel)


2 Rough Position(s) Input

 src#      ra            dec       physx    physy  cellcnts framecnts snr
---------------------------------------------------------------------------
   1    22:08:38.4    45:31:24.2   2380.1   2829.1      95      67     5.3
   2    22:08:41.4    45:44:33.4   2323.5   4407.7    1506     394    31.8

Writing 2 Sources to Output file:  harlac24_pos.tab

-------------------------------------------------------------------------
To Run Individual Tasks: 
-------------------------------------------------------------------------
Step 1:
-------
CELLMAP copies a qpoe file and creates an image with a specified cell 
size.  Each image pixel represent 1/3 of the detect cell in size.  If, 
after blocking the image size is > 512x512 pixels the image is 
subsectioned and the center 512x512 image is written out.  

Depending on the Mission and Instrument (ROSAT HRI|PSPC, Einstein HRI|IPC) 
of the input qpoe the User is prompted with detect cell size choices in 
which we have computed the prf constants alpha and beta.  (alpha is the 
integral of the psf over the detect cell, & beta is the integral of the 
psf over the detect cell + background cell). 
-------------------------------------------------------------------------

de> cellmap
Input xray Qpoe: xdata$rh110267.qp
Output xray image : harlac24
ROSAT HRI Cellsize in arcsecs - 6|9|12|24|36|48: 24

xdata$rh110267.qp[bl=16] -> harlac24.imh
add harlac24.imh,cellsize = 24
harlac24.imh updated
xdata$rh110267.qp
de>

-------------------------------------------------------------------------
Step 2:
-------
SNRMAP generates an image of net counts signal-to-noise at detect sub-cell
resolution from an input image of raw counts at the same resolution (the
output of cellmap).  

-------------------------------------------------------------------------

de> snrmap
Input xray image : harlac24.imh
Output snrmap image [root_snr.imh]: harlac24

Convolving 3x3 cells

Convolving 5x5 cells

Calculating Snrmap with equation:

snrmap=(1.7777*cell3-frame)/((1.7777**2*cell3+oframe)**0.5)

Writing Snrmap Image:
harlac24_snr.imh
de>

-------------------------------------------------------------------------
Step 3:
-------
LPEAKS finds local peaks in an image (the output from snrmap) above 
threshold. In the event of adjacent, or equal values above threshold, 
lpeaks chooses the first value it encounters. lpeaks was adapted from 
LVS's peakdet program.
-------------------------------------------------------------------------

de> lpeaks
Input Snrmap Image: harlac24_snr.imh
Output Rough Positions Table: harlac24

src#  logx    logy     physx     physy    cellx/y     snr
---------------------------------------------------------

   1  149.00  177.00   2384.00   2832.00   24   24     5.954
   2  146.00  276.00   2336.00   4416.00   24   24    30.197

Writing to Output file:  harlac24_ruf.tab
de>

-------------------------------------------------------------------------
Step 4:
-------
BKDEN calculates the average background of an image blocked at detect
sub-cell resolution (output of cellmap).  A simple average of the values 
in all detect cells in the region of interest is calculated and cells 
greater than a threshold are rejected.  This step is repeated for all
unrejected cells untils either no further cells are rejected or a maximum 
number of iterations has been reached.  The final average background is
in counts/arcmin**2.  The value is written to the bepos parameter 
bepos.bkden.  A default region is used if one is not specified by the user.
-------------------------------------------------------------------------

de> bkden
Input Image: harlac24.imh
Region Descriptor (default):

Bkden region is circle 256.00 256.00 7.50'


Bkden = 12.8558464 counts/arcmin**2
de>

-------------------------------------------------------------------------
Step 5:
-------
BEPOS reads the rough positions table (output by lpeaks).  The data 
at the rough position is resampled at full resolution, and if the snr 
of the source meets the snr_thresh (default is 2.75) a source position 
is written to the output file, else it is rejected.
 
The algorithm uses the liklihood ratio parameter technique (cf. preprint 
by w. cash, and memos by s. murray, ssm-102-78 and ssm-103-78).  The 
method was used for the Einstein IPC and given in detail in SAO Special 
Report 393 by Harnden, Fabricant, Harris,  and Schwarz.  It is also 
implemented in the ROSAT HRI level 1 system.
-------------------------------------------------------------------------

xp> bepos

*** PI bands must be Respecified with input QPOE ***

Input qpoe file: xdata$rh110267.qp
Field background density in cts/arcmin**2 (12.855846405029):
Input rough pos table: harlac24_ruf.tab
Output bepos table file: .

Input Qpoe: xdata$rh110267.qp
bkden = 12.8558464 (cts/sq arc-min), 0.0008928 (cts/sq pixel)


2 Rough Position(s) Input

 src#      ra            dec       physx    physy  cellcnts framecnts snr
---------------------------------------------------------------------------
   1    22:08:38.4    45:31:24.2   2380.1   2829.1      95      67     5.3
   2    22:08:41.4    45:44:33.4   2323.5   4407.7    1506     394    31.8

Writing 2 Sources to Output file:  ./harlac24_pos.tab

-------------------------------------------------------------------------

Search Form · STSDAS