NAME

uvotimsum - sum UVOT sky images or exposure maps

USAGE

uvotimsum infile=<filename> outfile=<filename> method=<string> pixsize=<float> expmap=<filename> exclude=<string> maskfile=<filename> weightfile=<filename> clobber=<boolean> history=<boolean> cleanup=<boolean> chatter=<integer>

DESCRIPTION

It is sometimes desirable to sum UVOT exposures to improve the signal-to-noise, or to detect faint sources. This tool simplifies summing a multiple extension FITS image file. It determines the range on the sky of the input images, checks that the input image filters match and calculates time related keywords.

The input exposures are assumed to be in SKY coordinates. No attempt is made to align individual exposures to a common frame of reference. Use uvotskycorr to do this. The output pixel size is set to "pixsize" degrees. If "pixsize" is less than or equal to zero then the output pixel size is equal to size of the largest input pixel. The user can exclude exposures using the "exclude" keyword.

Two rebinning methods are available. GRID assumes that all images are oriented in the same direction. This means that image rotations are ignored during image rebinning. XIMAGE makes no assumptions about image rotation. Both rotation and translation are performed during the rebinning.

This tool will sum exposures with different frame times. If this happens the UVOT photometry tools will not return accurate photometry of sources in the summed images

The primary output HDU contains keywords taken from the primary input HDU. The first extension of the output contains the summed image.

PARAMETERS

infile [filename]
FITS input image(s). The input extensions should have UVOT image keywords.

outfile [filename]
Name of output file.

(method = XIMAGE|GRID) [string]
Summing tool.

(pixsize = 0) [real, deg]
Output pixel size. If no positive number is specified (the default), the largest input pixel size is used.

(expmap = no) [boolean]
Sum as exposure maps? Changing the size of pixels does not affect exposure times, but does affect photon counts.

(exclude = DEFAULT) [string]
Comma delimited list of HDU names or numbers (or numbered ranges) to exclude from the sum. See the help file on filenames for a detailed description of specifying input extensions (section B.2).

The special value ASPCORR:NONE can be used to exclude extensions that do not have the ASPCORR keyword. The special value DUPEXPID can be used to exclude all but the largest of input HDUs sharing the same EXPID- this avoids including IMAGE&EVENT mode exposures twice in the sum. The special value SETTLING can be used to exclude extensions with OBS_MODE=SETTLING. The special value DEFAULT is treated as exclude=ASPCORR:NONE,DUPEXPID,SETTLING.

(maskfile = NONE) [string]
A FITS file containing one mask per extension matching the extensions in the "input" file.

The mask file can be created by running uvotexpmap with the "maskfile" parameter. The mask uses "1"s to indicate a pixel to be included in the summed image and "0"s for pixels to be excluded.

(weightfile = NONE) [string]
An ASCII file containing lines of the form
		hdu:weight

where the primary HDU is number 0 and the first extension is 1. Entries are optional- HDUs with no corresponding entry are assumed to have weight unity (1.0).

When a weight file is provided, outfile is written with EXPOSURE = 0 to indicate that photometry is not appropriate.

(clobber = no) [boolean]
Overwrite existing output file?

(clobber = no) [boolean]
Overwrite existing output file?

(history = yes) [boolean]
Write parameters to history keywords?

(clobber = no) [boolean]
Overwrite existing output file?

(cleanup = yes) [boolean]
Remove temporary files?

(chatter = 3) [enumerated integer]
Standard HEAdas chatter parameter.

EXAMPLES

1. Run uvotimsum specifying input file and output pixel size, overwriting the output file (which will be prompted for) if necessary

      uvotimsum infile=swuv.img pixsize=0.0001 clobber=yes
2. Run uvotimsum excluding HDU 3, the HDU named RALPH, and HDUs 6-14 from the output sum

      uvotimsum exclude=3,RALPH,6-14
3. Run uvotimsum to produce an exposure map corresponding to the output of example 2

      uvotimsum infile=swuv_ex.img expmap=yes exclude=3,RALPH,6-14
4. Run uvotimsum with a weightfile

Say we have an image file with two extensions and want the sum of 2.5 times the first extension and 0.5 times the second extension. Create the file weights.txt with contents

      1: 2.5
      2: 0.5
and issue the command
      uvotimsum infile=swuv_ex.img weightfile=weights.txt

SEE ALSO

farith, performs simple arithmetic operations on two images

uvotexpmap, creates UVOT exposure maps and mask files

ximage, has the ability to interactively sum images

LAST MODIFIED

August 2007