BINADAPT

Description:

binadapt combines the different components of an image to produce background subtracted and exposure corrected image for either a single exposure or all exposures of a single ObsID. The components must have been previously merged using the task combimage. Once combined, the resulting image can be binned and/or adaptively smoothed. In adaptive smoothing, for each unmasked pixel, the program will average neighboring pixels within a circle of increasing radius until a selected number of counts (weighted by a triangular weighting function) (smoothcounts) is reached. The original pixel is then given the weighted average surface brightness for the pixels within the circle. Images can also be binned by binfactor pixels before smoothing. In the cases where the components are just combined, or combined and binned, both the rate and the uncertainty in the rate are produced. It is assumed that adaptively smoothed images are not suitable for quantitative analysis, so no uncertainty image is produced for them. Some other diagnostic files are also produced.

Requirements:

20ptThe current location should be the working directory.

20ptAll of the files to be used for all of the instruments must be previously created. These include event images, exposure images, background images (QPB, SP, and SWCX), and mask images. The task combimage must have been successfully run for the exposures for the data from multiple exposures to be used.

Calling Parameters:

20ptprefix – Either the input instrument and exposure ID (1S001, etc.) for a single instrument or “comb” for the combination of instruments of a given obsid.

20ptelow – The lower energy limit (used for constructing the input and output file names).

20ptehigh – The upper energy limit (used for constructing the input and output file names).

20ptwithpartbkg – If true, subtract the quiescent particle background.

20ptwithspbkg – If true, subtract the soft proton flare background.

20ptwithswcxbkg – If true, subtract the SWCX background.

20ptwithmask – If true, use an extra mask to remove regions with low exposure, bright sources, etc..

20ptmaskfile – The file name for an image to provide additional masking as controlled by withmask. The mask images must be the same size and projection as the other images.

20ptwithbinning – If true output is binned by binfactor pixels.

20ptbinfactor – Number of pixels by which to bin.

20ptwithsmoothing – If true output is adaptively smoothed.

20ptsmoothcounts – The weighted number of counts to accumulate for the smoothing (e.g., 50).

20ptmaskthresh – The scale factor for excluding regions from the smoothing (e.g., 0.02) based on a mask image. In the default mode the average exposure is calculated and then any pixel with exposure less than fraction*average value is excluded. Output:

20ptcomb-adaptimsky-350-1100.fits – adaptively smoothed rate image.

20ptcomb-radfilt-350-1100.qdp – QDP file containing the radial profile. Created for all calls to binadapt.

20ptcomb-rateimsky-350-1100.fits – combined rate image. Not produced if withsmoothing is true.

20ptcomb-sigimsky-350-1100.fits – uncertainty in the rate image. Not produced if withsmoothing is true.

20ptcomb-size-350-1100.qdp – QDP file containing a histogram of the radii needed to accumulate smoothcount counts. Produced only if withsmoothing is true.

20ptcomb-sizeimsky-350-1100.fits – image showing the radii required to accumulate smoothcount counts. Produced only if withsmoothing is true.

Examples:

Combining but doing nothing else:
binadapt prefix=comb elow=350 ehigh=1100 withpartbkg=true withswcxbkg=true
withspbkg=true withmask=false withbinning=false withsmoothing=false smoothcounts=50

Combining and binning only:
binadapt prefix=comb elow=350 ehigh=1100 withpartbkg=true withswcxbkg=true
withspbkg=true withmask=false withbinning=true binfactor=4
withsmoothing=false

Combining and smoothing only:
binadapt prefix=comb elow=350 ehigh=1100 withpartbkg=true withswcxbkg=true
withspbkg=true withmask=false withbinning=false
withsmoothing=true smoothcounts=50

Combining, binning, and then smoothing:
binadapt prefix=mos1S001 elow=350 ehigh=1100 withpartbkg=true withswcxbkg=true
withspbkg=true withmask=false withbinning=true binfactor=4
withsmoothing=true smoothcounts=50