subby

NAME

subby -- replace masked regions and optionally do weighted stacking of images


USAGE

subby [flags] images

add a false
julian j false
kappa k 0.0
radius r 4.0
tresh t 0.1
verbose v 0


PARAMETERS

add = false
If true, the images are added in a weighted way after replacement of masked regions. The weights are taken from the header of the input images. The procedure is the same as used in the task adder (nondominant nonvalid pixels and errorpixels) but the error in the outputframe is calculated properly.
julian = false
Only useful in combination with add = true. If julian = true, julian dates and exposure times of the images are taken from the header of the input images in order to calculate an mean julian date and a total integration time for the combined image. The resulting values are written to the header of the output added image and the output errorframe.
kappa = 0.0
If not "0" a kappa-sigma-clipping is done for each pixel using this value. Outliers are not used for replacement.
radius = 4.0
The parameters of the PSF are read from the header of each image. In order to compare the seeing conditions a analytic moffat PSF-profile is constructed and the flux within a circular surface specified by radius is compared. This comparison decides which of the images fits best to which and thus by what should be replaced.
tresh = 0.1
The parameters of the PSF are read from the header of each image and the relative differece in flux within a specified surface area is maesured. For a certain image only these images are used for replacement which show a relative flux difference less than tresh.
verbose = 0
Verbose level. If verbose >= 1, for each input image two additional output files are written namely a table containing the information how many pixels have been replaced (s... + ".tab") and an image (ms-...) showing out of which of the input images the pixels have been taken for replacement.

DESCRIPTION

The task subby replaces masked regions (image value == 0 or error value <= 0.) in order to conserve the shape of the PSF when combining the images later. Saturated pixels (error value = -1) are dominant, so they are not replaced. For each image it is checked which of the other images has the most similar PSF. In order to do this, the PSF informations are read from the input images and thec PSFs are compared within a specified radius. The result of the PSF-comparison is printed on the screen.
After the order of match is determined for each of the input images masked pixels are replaced by the value of the next best image having a valid pixel. Only images showing a relative PSF-difference lower than tresh are valid for replacement. Also if the kappa-flag is used, a kappa-sigma-clipping is done for each pixel and outliers are marked as nonvalid for replacement. Note that the replacement is done unscaled, so it only makes sense, if all of the input images are on the same photometric level. For each of the input image an output image and an output error image is created.
If the add-flag is used, the images are added in a weighted way after replacement of masked regions. The weights are taken from the header of the input images. The procedure is the same as used in the task adder (nondominant bad pixels and errorpixels) but the error in the outputframe is calculated properly. If the julian-flag is used in addition, julian dates and exposure times of the images are taken from the header of the input images in order to calculate an mean julian date and a total integration time for the combined image. The resulting values are written to the header of the output added image and the output errorframe.
If verbose >= 1, for each input image two additional output files are written namely a table containing the information how many pixels have been replaced (s... + ".tab") and an image (ms-...) showing out of which of the input images the pixels have been taken for replacement.


OUTPUT

s...
partly replaced output images
e.s...
errorframes of partly replaced output images

optional (if add-flag is used):

a...
output added image; only if the add-flag is used
e.a...
output errorframe of added image; only if the add-flag is used

If verbose >= 1:
ms-...
output images which show by which image pixels are replaced
s... + ".tab"
output tables which show how many pixels have been replaced by which image

EXAMPLE

subby -a -j stars_*.fits


Task index
This task was implemented by A. Riffeser and J. Koppenhöfer
Dokumentation maintained by J. Koppenhöfer
This file was last time updated on 3 Mar 2005