BINADAPTMERGE

Description:

binadaptmerge combines the different components of an image to produce background subtracted and exposure corrected image for either a mosaic of multiple ObsIDs. The components must have been previously merged using the task mosaicmerge. 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.

If the image is being adaptively smoothed, then there may be a desire to “fill in” the small gaps left due to chips gaps and the like. For each “fill” pass, any pixel that is zero, but has at least three adjacent pixels that are non-zero, will be replaced with the average of the surrounding non-zero pixels. The fill procedure is meant for cosmetic use only.

Requirements:

20ptThe current location should be the working directory with the mosaicked images.

20ptmosaicmerge must have been successfully run for the components to be used.

Calling Parameters:

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

20ptehighlist – 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.

20ptfill – Number of “filling” passes in the case of adaptively smoothing. Output:

20ptmerged-adapt-350-1100.fits – an adaptively smoothed rate image. Produced only if withsmoothing is true.

20ptmerged-radfilt-350-1100.qdp – a QDP file containing the radial profile. Produced for all call to this program.

20ptmerged-rate-350-1100.fits – the rate (image). Produced only if withsmoothing is false.

20ptmerged-sigma-350-1100.fits – the uncertainty in the rate (image). Produced only if withsmoothing is false. Here the philosophy is that an adaptively smoothed image is not suitable for quantitative analysis, so an uncertainty image is otiose.

20ptmerged-size-350-1100.fits – an image showing the radius required to accumulate smoothcount counts. Produced only if withsmoothing is true.

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

Example:

Combining but doing nothing else:
binadaptmerge elowlist='350' ehighlist='1100' withpartbkg=yes withspbkg=true
withswcxbkg=true withmask=false maskfile=mosaic-cheeset.fits
withbinning=false withsmoothing=false fill=0

Combining, binning, and then smoothing:
binadaptmerge elowlist='350' ehighlist='1100' withpartbkg=yes withspbkg=true withswcxbkg=true withmask=false maskfile=mosaic-cheeset.fits
withbinning=true withsmoothing=true smoothcounts=50 fill=0