STScI Logo

bkden xray.xspatial.detect



bkden -- determine the background density of a given region


bkden image region


BKDEN calculates the average background of an image. A simple average of the values in all 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 used as input to bepos.

The threshold is determined by calculating the probability, P, of a pixel having more that T counts, assuming the values are distributed according to Poisson statistics with a mean given by the average for the iteration. The product of P and N, the number of pixels in the region, will be required to be less than F, the number of acceptable fluctuations greater than T in the region.


image = "" prompt = Input image

Required Input Reference Image.

region = "default" prompt = Region Descriptor

Required Region from which the background density is computed. If "default" is specified, a default region is defined. The default region is (circle img_cenx img_ceny radius), where radius is the specified bkden parameter below specified in arc-minutes .

(fluctuation = 1.0) [real]

Acceptable Fluctuation, F above.

(max_iter = 3) [int]

Maximum iterations for computing bkden.

(display = 1) [int]

Display info to screen. Integer of range 0-5. The higher the number more verbose the display.

(radius = 7.5) [real]

Circle radius for default background density region in arc-minutes.

(value = 0.0) [real]

Output parameter. It is the computed background density.


1. Determine the background density. The input image, harlac24.imh, is the output of cellmap. The default region is used (a circle at the image center with a 7.5 arc-minute radius). The computed bkden is written to bkden.value (shown in the parameter list that follows).

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

xp> lpar bkden
        image = "harlac24.imh"  Input Image
       region = "default"       Region Descriptor
 (fluctuation = 1.)             Background Fluctuation
    (max_iter = 3)              Maximum Iterations
     (display = 1)              Display Level
      (radius = 7.5)            radius for default region in arc minutes
       (value = 12.855846405029) Computed bkden
        (mode = "ql")

2. Determine the background density on a user-specified region.

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

Bkden region is c 270 270 100

Bkden = 12.6001253 counts/arcmin**2




Documentation on running ldetect (a detect task which runs the 5 detect tasks in sequence). (help ldetect )

Documentation on the detect algorithms and philosophy along with limitations in (help explain_detect ).

Documentation giving an overview of the detect package and run order of tasks. (help using_detect )

Documentation on preparing image for bkden. (help cellmap )

Documentation on determining the final positions. (help bepos )

Source Code · Search Form · STSDAS